shauna: 192.168.1.211 /home/phil/SharedDocs/network-install nameserver 69.43.143.41 nameserver 69.43.169.41 password: http://192.168.1.211/RPM/ gateway 192.168.1.1 disk layout: remove sdb from the LVS. Reserve for database. Use the defaults for sda. Turn off office and productivity. Customize now Desktop Environments: Turn off all Applications: Editors: Choose only emacs. Text based internet: Add Lynx Remove all others. Development: Remove all Servers: Turn on MySQL Database turn all others off. Base System Base: Leave turned on, no changes Remove all others. Languages: Leave all off 192.168.1.226 – marvin 192.168.1.227 – bob-saget 192.168.1.228 – comic-con 192.168.1.229 – yair 192.168.1.230 – sundance 192.168.1.231 – cannes After the basic setup, we can do the rest over the network. Be careful. If you screw up the sshd settings, you won't be able to log in remotely. There are a lot of deailts to get this right. They should all be listed below, but they are not all highlighted. On terence, as root: cp /etc/ssh/sshd_config /tmp chown phil /tmp/sshd_config cp -r /var/lib/mysql/mysql /tmp chown -R phil.users /tmp/mysql On mrs-ari: Original plan: mysqldump --opt --single-transaction --master-data -u root -pxxx123 -h wally-balls mydb `mysql -u root -pxxx123 -e "SHOW TABLES" -h wally-balls mydb | grep -v '^\(alerts\|candles\)' | grep -v Tables_in_mydb`|gzip -1 > /tmp/main_mydb.sql.gz mysqldump --opt --single-transaction --skip-add-locks --no-create-info -u root -pxxx123 -h terence mydb `mysql -u root -pxxx123 -e "SHOW TABLES" -h terence mydb | grep '^\(alerts\|candles\)' `|gzip -1 > /tmp/big_mydb.sql.gz The big dump took 1 1/2 hours. New Plan: Use the cpp_server/misc/backup script in CVS to backup the database. This will break up the work on the biggest table, and should run a lot faster. On the new machine: Get hosts file, needed for the rest of the build. Ari is the official master, and other machines are updated from him. scp phil@192.168.1.1:/etc/hosts /etc Turn off SELINUX! emacs /etc/selinux/config change SELINUX=enforcing to SELINUX=disabled Create New Account For Phil: useradd -g users -m -n -s /bin/tcsh -u 1000 phil passwd phil Add missing packages. scp phil@shauna:/home/phil/SharedDocs/network-install/RPM/Packages/tcsh-6.15-4.fc9.x86_64.rpm /tmp rpm -U /tmp/tcsh-6.15-4.fc9.x86_64.rpm scp phil@shauna:/home/phil/SharedDocs/network-install/RPM/Packages/ntp-4.2.4p4-6.fc9.x86_64.rpm /tmp rpm -U /tmp/ntp-4.2.4p4-6.fc9.x86_64.rpm Or: yum install tcsh yum install autofs Skip the shared directory and mail. Copy customized files from terence: scp phil@terence:/etc/ntp.conf /etc scp -r phil@terence:/tmp/mysql /var/lib/mysql chown -R mysql.mysql /var/lib/mysql/mysql scp phil@terence:/etc/my.cnf /etc/my.cnf scp phil@terence:/tmp/sshd_config /etc/ssh/ Configure boot software: cd /etc/rc3.d mv S08ip6tables K08ip6tables mv S08iptables K08iptables mv S85gpm K85gpm mv S98cups K98cups mv /etc/rc3.d/S00microcode_ctl /etc/rc3.d/K00microcode_ctl mv /etc/rc3.d/S12restorecond /etc/rc3.d/K12restorecond mv /etc/rc3.d/S25pcscd /etc/rc3.d/K25pcscd mv /etc/rc3.d/S50bluetooth /etc/rc3.d/K50bluetooth ./K75ntpdate start mv K72ntpd S72ntpd mv /etc/cron.weekly/makewhatis.cron /etc/cron.weekly/makewhatis.cron.disabled~ mv /etc/cron.daily/0logwatch /etc/cron.daily/0logwatch.disabled~ mv S27NetworkManager K27NetworkManager mv -i K90network S27network A few things moved in fedora 11: mv S25cups K25cups mv S26pcscd K26pcscd mv K74ntpd S74ntpd mv /etc/cron.daily/makewhatis.cron /etc/cron.daily/makewhatis.cron.disabled~ (we tried to disable CUPS in the install script, but it still appears on every machine.) (K27NetworkManager is turned off in Fedora 6, but on in Fedora 9. I could not get the new NetworkManteger configured right, in part because I could not find any documentation. So I *replace* it with the old network script.) Need to set swappiness to 5. By default the system wanted to give a lot of space to buffers and the cache, taking it from the database. Mysql was being swapped out at times, when it shouldn't have been, so it was very slow. Add "vm.swappiness = 5" to /etc/sysctl.conf See http://gentoo-wiki.com/FAQ_Linux_Memory_Management for more information. Install and test new sshd config: reboot Test the ability to log in remotely as phil! Go home! On the new machine, as root: Initialize database fdisk /dev/sdb This partition table should be empty. Add one big partition to be the database. pnp1w emacs /etc/my.cnf set server-id to the last byte of the IP address. change "innodb_buffer_pool_size = 14G" to "14080M" (13 3/4 G) find innodb_data_file_path. Comment out the version with "raw" and uncomment the version with "newraw" emacs /etc/rc.d/init.d/mysqld add "chown mysql:mysql /dev/sdb1" immediately under "chown mysql:mysql "$errlogfile"". run /etc/init.d/mysqld start ignore the error message change innodb_data_file_path back to what it was before (not "newraw") in /etc/my.cnf run "tail -f /var/log/mysqld.log" to see what's really happening. after initialization is complete, run "/etc/init.d/mysqld stop" When it is complete the last lines will look like this: 081103 12:04:02 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.51a-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution run /etc/init.d/mysqld start mv /etc/rc3.d/K36mysqld /etc/rc3.d/S36mysqld copy the original data from the master server. Log into mysql on the local machine and type "CREATE DATABASE mydb;" Log into mysql on the local machine and type "CREATE DATABASE no_replicate;" Log into mysql on the local machine and type "CHANGE MASTER TO MASTER_HOST='drama', MASTER_USER='replication', MASTER_PASSWORD='replication';" load the "main" database dump that we created above into this database. Log into mysql on the local machine and type "START SLAVE;" load the remaining database dumps that we created above. Recent changes: These should be merged into the instructions above. The my.cnf we've been using doesn't work with fc-9. It's fine until you try to reboot a slave database server. These instructions will fix the problem Edit my.cnf and add the following lines. (Or copy from cannes, or another machine which has already been fixed.) # This seems to be required with Fedora 9. Previously the default would work, # but they would cause a warning message in the log. In Fedora 9 it seems that # the defaults changed. If Fedora 9 we were storing the relay logs in # /var/run/mysqld (the previous default was /var/lib/mysqld) so they were being # erased each time we rebooted. However, relay-log.info was still in # /var/lib/mysqld, and that pointed to the files which were erased, so the # server would not boot properly. The temporary fix was to stop mysqld, delete # relay-log.info, then restart mysqld. That would fix things until the next # reboot. These lines will fix it so that it works almost exactly like on # older systems, and it can survive a reboot without assistance. relay-log = /var/lib/mysql/relay-bin relay-log-index = /var/lib/mysql/relay-bin.index Switch to the older network script. For some reason the newer one doesn't set our gateway properly. So unless you manually call /sbin/route, you can't get to the outside world. There is very little documentation on the newer one, so i wasn't able to fix it. mv /etc/rc3.d/S27NetworkManager /etc/rc3.d/K27NetworkManager mv /etc/rc3.d/K90network /etc/rc3.d/S90network Problem: Although this works, the boot process is slower than it should be. We should turn on the network before the database, otherwise the database won't be able to connect to the master database, and it won't retry for 60 seconds. The database only machines do not typically run automount. So you need this, as root. mkdir /mnt/nicola emacs /etc/fstab add: nicola:/c/main /mnt/nicola nfs ro,nosuid,nodev,soft mount /mnt/nicola/ ln -s /mnt/nicola/alert_archive /var/lib/mysql/