ZakynthosSetup

Old version: the latest version of this page is being maintained at [WWW] http://milos2.zoo.ox.ac.uk/ibrgtech/index.php/Zakynthos_setup.

Zakynthos Installation Notes

This page contains notes about the installation and setup of Zakynthos, which is intended to provide a base for infrastructure server components.

Contents:

  1. Basics
  2. Extras installed
  3. Component installation notes
    1. Installing SSHBlack
    2. Assign MySql root password
      1. Reset MySql root password
    3. Installing PHP 5.20 from source
      1. Warning
    4. Installing Media Wiki
      1. Updating a wiki user's password
    5. Installing Drupal
    6. Installing WebCalendar
    7. Configuring Mailman
  4. Updating VMware and VMware tools
  5. Enabling backups for MySql
  6. Cloning Zakynthos for a new system
  7. Adding a new virtual disk
  8. Late fixes
    1. Changing mailman host name
    2. Installing TSM
    3. Increasing the PHP file upload size
    4. Receiving incoming mail
    5. No Ethernet interface in cloned system

1. Basics

Note: when installing under VMware, re-run the system-confic-display script after VMware tools have been installed. This seems to fix some problem with switching between the X-window session and text-only console sessions, and also problems switching between runlevels 5 and 3.

2. Extras installed

3. Component installation notes

3.1. Installing SSHBlack

See: [WWW] http://wiki.oss-watch.ac.uk/InstallingSshblack

I had to adjust the init.d/sshblack script to take account of a different directory for the Perl script file coming from the V2.8 SSHBlack kit.

3.2. Assign MySql root password

See: [WWW] http://www.cyberciti.biz/faq/mysql-change-root-password/

3.2.1. Reset MySql root password

See: [WWW] http://www.cyberciti.biz/tips/recover-mysql-root-password.html

3.3. Installing PHP 5.20 from source

The make install adds the following line to /etc/httpd/conf/httpd.conf that duplicates a line in /etc/httpd/conf.d/php.conf, and which should be removed:

The ./configure, make and make install steps can be repeated at any time to update the PHP setup, e.g. with different options.

3.3.1. Warning

I have found that automatic system updates by YUM can create a new file /etc/httpd/conf.d/php.conf that attempts to configure PHP4 to handle requests for PHP files, which conflicts with using PHP5. This leads to obscure errors about mysql.so and segment faults reported in /var/log/httpd/error_log when trying to access facilities based on PHP and a MySql database. The problem can be fixed by deleting (or renaming) the php.conf file.

My /etc/httpd/conf.d/php5.conf file looks like this:

3.4. Installing Media Wiki

See: [WWW] http://www.mediawiki.org/wiki/Manual:Installation (was: [WWW] http://meta.wikimedia.org/wiki/Help:Installation)

The wiki should now be usable.

3.4.1. Updating a wiki user's password

3.5. Installing Drupal

See: [WWW] http://drupal.org/node/260

Take note of the bit about creating the Drupal database in MySql - it is easily overlooked.

The mysqli client interface for PHP (see PHP section above) is needed to overcome a bug in Drupal 4.7.4 regarding maintaining a session login identity.

Initial configuration of Drupal to do somnething useful isn't obvious. As a Drupal admin, go to the modules menu item and enable some useful modules. I started with the blog module.

3.6. Installing WebCalendar

See: [WWW] http://webcalendar.cvs.sourceforge.net/*checkout*/webcalendar/webcalendar/docs/WebCalendar-SysAdmin.html?pathrev=REL_1_0_0

Download and unpack the kit to a working directory. Rename to /var/www/html/calendar. Change ownership so that apache can write to the directory tree.

Issue the following commands to create and configure the WebCalendar database and database user account using MySql utilities:

Create a file /etc/http/conf.d/WebCalendar.conf:

and restart the web server (use service httpd restart or apachectl -k restart).

Now browse to [WWW] http://zakynthos.zoo.ox.ac.uk/calendar/ - the browser should be redirected to the install/setup page.

After the initial installation has been done, browsing to [WWW] http://zakynthos.zoo.ox.ac.uk/calendar/ should display a calednar login. Log in as admin, password admin, and change the password.

3.7. Configuring Mailman

Mailman is installed as part of the SL 4.4 system.

Mailman is configured using some of the the instructions in [WWW] http://www.gnu.org/software/mailman/mailman-install/index.html. Relevant files are:

Edit /usr/lib/mailman/Mailman/mm_cfg.py, adding the following line at the end:

Run /usr/lib/mailman/bin/genaliases. This creates new aliases and aliases.db files in /etc/mailman/.

Modify /etc/postfix/main.cf to contain this line:

Note that the alias_database entry should not be changed.

Set up the mailman cron jobs, which are described in file /usr/lib/mailman/cron/crontab.in, by copying this file to /etc/cron.d/mailman. Do not use the crontab command with this file, as the mailman username in this file is interpreted as a shell command, and gives rise to many errors in the cron logs.

Start mailman on boot, and immediately:

Finally, uncomment the last line of /etc/httpd/conf.d/mailman.conf edit the host name into it:

Browsing to [WWW] http://zakynthos.zoo.ox.ac.uk/mailman/listinfo should display MailMan's front page.

4. Updating VMware and VMware tools

Basically, installing a new version of VMware workstation removes the previous version, but sufficient configuration is retained that any old VMs are visible to the new installation.

To update VMware tools, follow the procedure for instlling VMware tools:

Here are the key steps:

  1. Power on the virtual machine.

  2. After the guest operating system has started, prepare your virtual machine to install VMware Tools.

    • Choose VM > Install VMware Tools.

  3. As root (su -), mount the VMware Tools virtual CD-ROM image, change to a working directory (for example, /tmp), uncompress the installer, then unmount the CD-ROM image:

    • mount /media/cdrom1 
      cd /tmp
      
  4. Install the RPM package:

    • rpm -Uhv /media/cdrom1/VMwareTools-5.0.0-<xxxx>.i386.rpm 
      umount /media/cdrom1
      
  5. Configure VMware Tools:

    • vmware-config-tools.pl
      
  1. In an X terminal, launch the VMware Tools background application.

    • vmware-toolbox & 
      

5. Enabling backups for MySql

NOTE: These instructions are still under test

First, enable binary logging from the MySql server: edit file /etc/my.cnf so that section [mysqld] contains the line:

Also create a directory /var/log/mysql/, and sets its owner to be mysql. Now restart mysqld.

Create a file /root/.my.cnf containing the following lines, where <password> is the MySql database root password:

Ensure this file is set to be readable only by user root:

Create a script file /usr/local/<host>-dump-mysql, where <host> is a name distinguishing this host or MySql instance:

Finally, arrange to run this script as a weekly cron job, preferably at a time when the server can be expected to be lightly loaded - for the example below, 01:00AM on Sunday mornings. Create a file /etc/cron.d/mysqldump with the following contents:

6. Cloning Zakynthos for a new system

Now start the newly copied VM and rename all the references to "zakynthos", its IP address, and other placeholder names to values for the new system:

After all this, some references to the old system name remain in the MySql database files: wikidb, drupaldb, user.MYD,user.MYI, ibdata1.

Checklist of passwords for installed facilities:

7. Adding a new virtual disk

8. Late fixes

(In due course, some or all of these should be installed in the zakynhtos base system.)

8.1. Changing mailman host name

8.2. Installing TSM

8.3. Increasing the PHP file upload size

8.4. Receiving incoming mail

(See also: [WWW] http://www.cpqlinux.com/hostname.html)

8.5. No Ethernet interface in cloned system

We have observed that ion the process of cloning a system, the new system's ethernet interface (with new IP address, etc) may not start at boot.

A quick fix may be this command:

Some or all of the following files are used when bringing up the network after a reboot:

On our test system, ifcfg-eth0 looks like this:

On our test system, modprobe.conf looks like this:


-- GrahamKlyne 2006-11-20 14:17:06

last edited 2007-12-05 11:21:15 by GrahamKlyne