= TolkienSetup = `tolkien` is the name of the computer used to host most of MRC's network services such as DNS, !WordPress, and this Trac site. This page documents everything done to get `tolkien` up, running, and configured. Please see the following sub-guides: * TolkienSetupDnsServer: describes the steps necessary to make the computer a DNS server * TolkienSetupWordpress: describes the steps necessary to make the computer a [http://wordpress.org/ Wordpress] blog server * TolkienSetupSvn: describes the steps necessary to make the computer a [http://subversion.tigris.org/ Subversion] server * TolkienSetupTrac: describes the steps necessary to make the computer a [http://trac.edgewall.org/ Trac] server * TolkienSetupOprofile: details how to install and use the [http://oprofile.sourceforge.net/news/ OProfile] tool * TolkienSetupWebDav: details how to configure per-user, SSL-secured, WebDAV directories via Apache * TolkienSetupNexus: details how to install and configure [http://nexus.sonatype.org/ Nexus] == Create VMWare Guest == `tolkien` will be setup as a VMWare Server guest computer on an existing server, which happens to be part of the `davisonlinehome.name` network. Connect to the VMWare Console for the VMWare Server that will host the `tolkien` guest and do the following: 1. Select ''File, New Virtual Machine...''. 1. Proceed through the wizard, selecting/entering the following options when prompted: * Virtual machine configuration: Typical * Guest operating system: Linux * Version: Ubuntu (not 64-bit) * Virtual machine name: `tolkien` * Location: `/var/lib/vmware/Virtual Machines/tolkien` * Network connection: Use bridged networking * Disk size (GB): `40.0` 1. Run `vmware-config.pl` on the host to configure bridged networking: {{{ # vmware-config.pl }}} 1. When prompted, enter/select the following options: * ''Would you like to skip networking setup and keep your old settings as they are?'': `no` * ''Do you want networking for your virtual machines?'': `yes` * ''Would you prefer to modify your existing networking configuration using the wizard or the editor?'': `editor` * ''Do you wish to make any changes to the current virtual networks settings?'': `no` * Make a note of which `vmnetXX` device is configured for bridged networking on `eth1`. For me, this was `vmnet2`. 1. In the VMware Server Console, edit `tolkien`'s settings: * Hardware * Ethernet 1 * ''Network Connection'': ''Custom'': `/dev/vmnet2` (or whatever `vmnetXX` device you noted earlier) * Floppy 1 * ''Connect at power on'': false * Options * Startup/Shutdown * ''On host startup'': Power on virtual machine * ''On host shutdown'': Shut down guest operating system == Ubuntu 8.04 32bit Server, Clean Install == Prepare for and start the installation: 1. Connect to the VMWare host computer and download the Ubuntu `.iso`: {{{ $ wget http://ftp.wayne.edu/linux_distributions/ubuntu/hardy/ubuntu-8.04.2-server-i386.iso }}} 1. Copy the `.iso` somewhere for safe-keeping. 1. Set the `.iso` (on the local drive) to be `tolkien`'s CD-ROM drive. 1. Boot the `tolkien` VM from the CD-ROM drive/`.iso`. 1. Select ''English'' as the Language. 1. Select the ''Install Ubuntu Server'' menu entry. When prompted by the install, select/enter the following installation options: * ''Choose a language:'' English * ''Choose a country, territory, or area:'' United States * ''Detect keyboard layout?'' Yes (should end up with "us") * ''Hostname:'' `tolkien` * ''Select your time zone:'' Arizona * ''Partitioning method:'' Guided - use entire disk * ''Select disk to partition:'' SCSI3 (or whatever the largest/obvious one is) * ''Write the changes to disk?'' Yes * ''Full name for the new user:'' (enter your full name) * ''Account name for the new user:'' (enter a short login name) * ''Choose a password for the new user:'' `supersecretpw` (enter your password) * ''HTTP proxy information:'' (just hit `ENTER`) * ''Choose software to install:'' (these can be modified after install via the `tasksel` command) * Select ''DNS server'' * Select ''LAMP server'' * Select ''OpenSSH server'' * Enter a password for the MySQL "root" user when prompted and be sure to make a note of it. When notified that install is complete, unmount the installation CD-ROM and reboot. === FUBAR Keyboard Mappings === References: * http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html If your keyboard mappings in the VMWare guest/console get all screwy, do the following on the computer running the console: 1. Close the VMware Server Console. 1. Edit the `/etc/vmware-server-console/config` file and add the following line: {{{ xkeymap.nokeycodeMap = true }}} == Networking Setup == Edit the `/etc/network/interfaces` file and configure `eth0` as follows: {{{ # The secondary, public NIC auto eth1 iface eth1 inet static address 75.146.134.35 netmask 255.255.255.248 gateway 75.146.134.38 }}} Edit the `/etc/resolv.conf` file to configure DNS resolution as follows: {{{ search madrivercode.com davisonlinehome.name nameserver 75.146.134.35 nameserver 75.146.134.33 nameserver 68.87.85.98 }}} Restart networking: {{{ # /etc/init.d/networking restart }}} Please note, that for some reason, I actually had to restart the whole guest OS: {{{ # reboot }}} == Ubuntu Updates == To update the list of available updates, run: {{{ # apt-get update }}} To install all non-kernel updates, run: {{{ # apt-get upgrade }}} To install _all_ updates, run: {{{ # apt-get dist-upgrade }}} == VMware Tools == Prepare to start the Tools installation: 1. Connect to VMware Server Console for the host computer. 1. Switch to the `tolkien` VM. 1. From the '''VM''' menu, select '''Install VMware Tools...'''. On `tolkien` itself, do the following to install the Tools: 1. Install the dependencies needed by the VMWare Tools: {{{ # apt-get install build-essential linux-headers-server }}} 1. Run the following commands to start the VMWare Tools install: {{{ $ mount /dev/cdrom $ tar -xvzf /media/cdrom/ # ./vmware-install.pl }}} 1. As prompted, accept all of the installer's defaults. Reboot: {{{ # reboot }}} === Using open-vm-tools Instead of VMWare Tools === VMWare spun the VMWare Tools off into an open source project a while back, though they still maintain and offer the proprietary VMWare Tools for customers. That open source project is [http://open-vm-tools.sourceforge.net/ open-vm-tools]. Recent versions of this project feature VM kernel modules that can be built via [http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support DKMS], which is incredibly convenient. Before installing open-vm-tools, first uninstall the VMWare Tools, if they are present: {{{ # vmware-uninstall-tools.pl }}} Unfortunately, open-vm-tools is not available in the official Ubuntu Hardy repositories. However, they are available in the following PPA: [https://launchpad.net/~grexk/+archive/ubuntu-dev]. The following bug details the addition of DKMS support to this PPA's version of open-vm-tools: [https://bugs.launchpad.net/ubuntu/+source/open-vm-tools/+bug/277556]. To install the `open-vm-dkms` package from PPA, go through the following steps: 1. Add the PPA's signing key to APT: {{{ # apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E479B78 }}} 1. Edit the `/etc/apt/sources.list` file and add the following lines to the end: {{{ # Provides open-vm--dkms package deb http://ppa.launchpad.net/grexk/ubuntu-dev/ubuntu hardy main }}} 1. Update the APT sources: {{{ # apt-get update }}} 1. Install the open-vm-dkms package: {{{ # apt-get install open-vm-dkms }}} 1. Reboot: {{{ # reboot }}} === Kernel & GCC Version Mismatch === I received an error similar to the following while building the VMware Tools kernel modules: {{{ Your kernel was built with "gcc" version "4.2.3", while you are trying to use "/usr/bin/gcc" version "4.2.4". This configuration is not recommended and VMware Tools may crash if you'll continue. Please try to use exactly same compiler as one used for building your kernel. Do you want to go with compiler "/usr/bin/gcc" version "4.2.4" anyway? [no] }}} Overriding the warning by entering `yes` resulted in a failed compilation. This is due to the following Ubuntu bug: [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/292381]. Until this bug is resolved, I've uninstalled the Tools to avoid any odd problems with mis-compiled modules. == NTP Client == Install the `ntp` package to ensure this computer's time is automagically kept synchronized: {{{ # apt-get install ntp }}}