vSphere Client on Windows 7

For the last few days I’ve been trying to install vSphere Client to manage a ESXi 4.0 server but it kept failing when it got to .Net J# on the installed. So I went online and downloaded the newest version I could, Update 1, which also failed. By this point I was getting rather annoyed as my work laptop is Windows 7, But as I was at home with a Windows XP desktop I’d thought I’d give it a go on that knowing that it will install.

It installed without a hitch on Windows XP. I navigated my way to the installation directory and copied it over the network to my latop. Annoying vSphere Client started straight away which leads me to believe that the installer is the fault and not the installed software.

To recap:
1. Install vSphere Client on non Windows 7 computer
2. Copy installation directory onto Windows 7 computer
3. Get on with the work you’ve been trying to do with VMware Go all this time.

Jon~

Qt on Mac (10.4)

I’ve been hanging out on the Meego IRC channel and Meego uses Qt for it’s applications, for this reason I’ve installed Qt on my mac. You can download Qt from here. I had to make one change to the source file in order to get it to compile.
Continue reading ‘Qt on Mac (10.4)’

Red Hat Enterprise Linux 6 Beta + Grub 2

Yesterday I downloaded and installed RHEL 6 Beta but I didn’t install the boot loader. I already have Grub 2 installed and set up on my laptop with my other distros and Windows. RHEL 6 Beta uses Grub (Legacy) and this handles graphics different to Grub 2. I’ve been using LFS and CLFS for a while now for development so it’s been a while since I’ve used a full distro, with GUI and wireless an other very nice features (like the spell checker I’m using in FireFox).

Below is the Grub 2 configuration file I use to boot RHEL 6 Beta. I’m assuming you already have Grub 2 installed.

# Begin /boot/grub/grub.cfg

set gfxmode="1280x800x32" # Your resolution
set gfxpayload=keep
insmod gfxterm # Load modules
insmod vbe 

set default=0
set timeout=5
set root=(hd0,3) # Your boot partition

menuentry "Red Hat Enterprise Linux 6 Beta" {
  linux /vmlinuz-2.6.32-19.el6.x86_64 root=/dev/sda9 # Your root device
  initrd /initramfs-2.6.32-19.el6.x86_64.img
}

# End /boot/grub/grub.cfg

It took me about a day to work this out so I hope this helps you.

Jon~

C++ Aggregation Assocation

Hello all. I created the program at the bottom as a test as I was having problems with Aggregation Assocation in my assignment. The program below has the person class that we created in the last post but now it also has a new link class with two functions. The first function sets the pointer to the person, the second increases the person’s age by one. You can see that I have commented out the orginal command that sets the person’s age.

A pointer is a link to the RAM address of something else, in this case a instance of the person class. You access a pointer’s public functions / variables by the -> symbol. So pointer->setValue(newValue) would run the setValue function of what the pointer is connected too.

A Aggregation Assocation is a connection between two classes that do not own one another. For example a pet belongs to it’s owner but a student does not belong to a school as student and school are both independant entities that are connected.

This is something I did quickly and thought I’d stick online so if you have any questions leave a comment and I’ll get back to you.

#include <iostream>
#include <string>

using namespace std;

class person
{
  private:
    int age;
    string name;

  public:
    // Constructors
    person();
    person(string newName, int newAge);

    // Accessors
    string getName() { return name; };
    int getAge() { return age; };
    // datatype getVariable() { return variable; };

    // Mutators
    void setName(string newName);
    void setAge(int newAge);
    // void setVariable(datatype newVariable);

};

person::person()
{
  name = "Stranger";
  age = 100;
}

person::person(string newName, int newAge)
{
  name = newName;
  age = newAge;
}

void person::setName(string newName)
{
  name = newName;
}

void person::setAge(int newAge)
{
  age = newAge;
}

///////////////////////////////////////////////////
class pointerClass
{
  private:
    person *link; // pointer to a person

  public:
    void setLink(person * newLink); // set the pointer to a person you've created
    void incAge(); // increase their age by one

};

// set the pointer to a person you've created
void pointerClass::setLink(person * newLink)
{
  link = newLink;
}

// Increse their age by one.
void pointerClass::incAge()
{
  int temp = link->getAge(); //get Age
  // cout << "temp: " << temp << endl; // output orginal age
  link->setAge(++temp); // inc and set new age.
  // cout << "temp: " << temp << endl; // output new age
}

///////////////////////////////////////////////////
int main()
{
  pointerClass myLink;
  person steve("Steve", 20);
  myLink.setLink(&steve);
  cout << steve.getAge() << endl;
  // steve.setAge(21);
  myLink.incAge();
  cout << steve.getAge() << endl;
}

A simple CPP program

Hello everyone. This semester I’ve been the learning CPP (C++ / CXX) programming language and I thought I’d write a simple program in order to help out some of my friends. This program has one class; person. This class contains two private variables called name and age, these have the associated accessors and mutators.

Lets start the program, first we need to include the iostream library, we will also include the string library. They handle the input and output and give us the ability to use strings respectively. I personally thing using strings is easier and neater than using char arrays. We also have to declare our namespace.
Continue reading ‘A simple CPP program’

Apache user support in Tiger

Last time we showed you how to install Apache 2.2 on OS X Tiger. This time we will show you how to add user directory support to it.

Assuming you installed Apache to /usr/local/apache2 then you need to look at a file called httpd-userdir.conf in /usr/local/apache2/conf/extra. This is the file that tells Apache where there user’s directory is and what directory inside it is the public_html one. Open this file up in a text editor of your choice. There are only two lines you need to edit.

UserDir public_html
<Directory "/home/*/public_html">

This is the default config for Apache but this is designed for linux systems. To make this work on OS X you need to change these lines to the below.

UserDir Sites
<Directory "/Users/*/Sites">

You will notice that public_html has been changed to Sites. If you look in your home directory this folder will be here. We also changed /home to /Users because this is what OS X uses for the user’s directories.

The last thing you need to do is to enable the user directory support in the main httpd.conf file. It will be in /usr/local/apache2/conf. Look for the below line and simply remove the # (hash) symbol from the beginning.

#Include conf/extra/httpd-userdir.conf

Now just save the file and go into system preferences, select sharing then stop and start “Personal Web Sharing”. Now enjoy your user directory support for Apache 2.2 in OS X Tiger.

All comments and questions are welcome. I’m always looking to improve my writing.

User directory suppport on OS X

User directory suppport on OS X

Apache 2.2 on OS X Tiger

System Preferences

System Preferences

This guide will show you how to install Apache 2.2 on Mac OS X Tiger (and probably Leopard) in a way that will allow you to turn the apache server on and off via System Preferences. Phpmac.com had a guide to do this for Apache 1.3 but I have been unable to get onto that website for a long while now so I decided to write my own guide. This guide assumes that you are installing from source, that you have the Xcode package installed and you know how to user the Terminal.

Getting the source
First thing you will need to do is to go to httpd.apache.org and download the latest version of Apache 2.2. I used version 2.2.8 but the latest is 2.2.9 at the time of writing this. You should see a link to the source on the front page.

Configure and Compiling
I choose to install apache to /usr/local/apache2 with modules enabled. Assuming that you have unpacked the version of Apache you have just downloaded you should open the Terminal and change into that location.
$ ./configure --prefix=/usr/local/apache2 \
--enable-module=most \
--enable-shared=max
$ make
$ sudo make install

These commands will configure the httpd package, compile and then install it. This is the easy part, the hard part is configuring Apache to run from system preferences.

httpd.conf
Now that Apache is installed we need to configure it. There are three things you will need to do to the config file which is located in /usr/local/apache2/conf/httpd.conf . The location will depends upon what you used for –prefix= .

You need to search for the user and group name in httpd.conf. The default user and group is “daemon” but OS X uses “www”. This is line 65 on my install. After you have changes the user and group from “daemon” to “www” it should look like this.

User www
Group www

At the bottom of this config file you need to add a line to tell Apache where to store it’s PID file. This is important as this tells OS X what program to terminate when you stop the Apache service.
PidFile /var/run/httpd.pid

System link
This is the last step to getting Apache 2.2 to work from system preferences but I have an important note. This moves the default Apache 1.3 binary and replaces it with a link to our Apache 2.2 install. I have found that when I install one of Apple’s security updates the link has been replaces with the original Apache 1.3 binary. Therefore you may have to repeat this step from time to time.

In there terminal there are three command you have to run. The first one moves us into the directory that we need to work in. The second commands moves the Apache 1.3 binary out of the way and the final command replaces it with a link to our Apache 2.2 install.

$ cd /usr/sbin
$ sudo mv -v apachectl apachectl-1.3
$ sudo ln -sv ../local/apache2/bin/apachectl .

The End
Now all you have to do is go to System Preferences, click on “Sharing” and then enable “Personal Web Sharing”. When you open up your browser and type in 127.0.0.1 or [::1] (IPv4 and IPv6 respectively) you should see “It Works!“.