After installing Fedora Core 4 on a machine, this is how we customize it. Create New Account For Phil: useradd -g users -m -n -s /bin/tcsh -u 1000 phil passwd phil Create and share a directory: as phil: mkdir ~/SharedDocs as root: Notes on mail: genericstable is not standard. Copy genericstable from a working machine. edit sendmail.mc add FEATURE(genericstable,`hash -o /etc/mail/genericstable') GENERICS_DOMAIN(`shauna'); GENERICS_DOMAIN(`trade-ideas.com'); GENERICS_DOMAIN(`shauna.trade-ideas.com'); above MAILER(smtp)dnl but change "shauna" to match the name of the current machine. and replace dnl FEATURE(masquerade_envelope)dnl with FEATURE(masquerade_envelope)dnl run "make" and restart mail Copy these files from a working machine: /etc/php.ini.orig /etc/httpd/conf.d/php.conf.orig /etc/httpd/conf/httpd.conf.orig /etc/samba/smb.conf.orig /etc/ssh/sshd_config.orig /etc/mail/orig.zip /etc/mail/sendmail.mc.orig /etc/ntp.conf.orig /etc/rc.d/rc.phil /etc/exports (May need some customization. At a minimum include /home/phil/SharedDocs.) Install time daemon! ntp on FC5 this is "rpm -U 2/ntp-4.2.0.a.20050816-11.x86_64.rpm" (CD #2) shauna goes out to the outside world. the other machines go to shauna. Copy ntp.conf from any machine other than shauna. verify that /var/lib/ntp exists. Owner and group should be ntp. Turn it on! New daylight savings time rules for 2007! FC4 did not have the right rules. You need to copy them from an FC5 machine. We were listing Tijuana as our timezone. That is not correct. We need to list Los_Angeles as they have the correct rules for daylight savings time. Run this as root: cd /usr/share mv zoneinfo/ zoneinfo.orig tar xzvf /tmp/zoneinfo.tar.gz cd /etc mv localtime localtime.orig ln -s /usr/share/zoneinfo/America/Los_Angeles localtime FC5: In FC4 we used /media/cdrom to access the cdrom In FC5 that is gone. Use automount instead. In /etc/auto.master change "#/misc /etc/auto.misc --timeout=60" to "/misc /etc/auto.misc --timeout=10" to turn this on. But automount is giving me trouble. So I created /media/cdrom Then I added In FC5 by default SE linux is on, but it causes problems. in /boot/grub/grub.conf add "selinux=0" to the end of "kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00" setting up the database on DOM: edit fstab. Remove the entry for the partition that we reserved for the database. /dev/sda7 was mounted at /tmp/raw_for_db copy /var/lib/mysql/mysql/ from a working machine before starting the DB for the first time. cp /usr/share/doc/mysql-server-5.0.18/my-innodb-heavy-4G.cnf /etc/my.cnf changed innodb_buffer_pool_size from 2G to 14G. That was the whole point of DOM, to have huge memory for the database. changed innodb_data_file_path to ../../../../../../dev/sda7:224500Mnewraw edit /etc/rc.d/init.d/mysqld add "chown mysql:mysql /dev/sda7" immediately under "chown mysql:mysql "$errlogfile"". run /etc/init.d/mysqld start ignore the error message run "tail - f /var/log/mysqld.log" to see what's really happening. after initialization is complete, run "/etc/init.d/mysqld stop" change innodb_data_file_path to "../../../../../../dev/sda7:224500Mraw" (removed "new") run /etc/init.d/mysqld start copy the original data from the master server. Log into mysql on DOM and type "CHANGE MASTER TO MASTER_HOST='drama', MASTER_USER='replication', MASTER_PASSWORD='replication';" On DOM run (mysqldump --no-data --opt -u root -p -h drama mydb `mysql -u root -p -e "SHOW TABLES" -h drama mydb | grep '^\(alerts\|candles\)'`;mysqldump --opt -u root -p --single-transaction --master-data=1 -h drama mydb `mysql -u root -p -e "SHOW TABLES" -h drama mydb | grep -v '^\(alerts\|candles\)' | grep -v Tables_in_mydb`)|gzip -1 > `date +%F_%H-%M-%S`_mydb.sql.gz On DOM run zcat 2006-08-01_01-10-11_mydb.sql.gz |mysql -u root -p mydb stop the mysql server. edit my.cnf again (I probably should have done this the first time!) set a unique server-id comment out the line "log-bin=mysql-bin" (In previous versions of mysql this line was "log_bin") add the line "replicate-wild-ignore-table=backups.%" start the mysql server. run "START SLAVE;" need to manually copy the missing tables: mysqldump -u root -p -h drama mydb alerts_daily |mysql -u root -p mydb mysqldump -u root -p -h drama mydb candles_d | mysql -u root -p mydb mysqldump -u root -p -h drama mydb candles_5m | mysql -u root -p mydb and alerts. 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. Making lighttpd work: It is easy to install lighttpd. There is no package, but you can load and install the tarball from http://www.lighttpd.net/. Making php work is slightly tricky, in part because a lot has changed between versions 1.4 and 1.5 of lighttpd, but the documentation has not yet caught up. Changes to spawn-php.sh: SPAWNFCGI="/home/phil/lighttpd-1.5.0/src/spawn-fcgi" FCGIPROGRAM="/usr/bin/php-cgi" FCGI_WEB_SERVER_ADDRS="127.0.0.1,192.168.1.207" Add this to lighttpd.conf to talk to php: $PHYSICAL["existing-path"] =~ "\.php$" { proxy-core.balancer = "round-robin" proxy-core.allow-x-sendfile = "enable" proxy-core.protocol = "fastcgi" #proxy-core.backends = ( "amanda:1026" ) proxy-core.backends = ( "127.0.0.1:1026" ) proxy-core.max-pool-size = 16 } Add this to lighttpd.conf to talk to custom programs: $HTTP["url"] =~ "\.phil$" { proxy-core.balancer = "round-robin" proxy-core.allow-x-sendfile = "enable" proxy-core.protocol = "fastcgi" proxy-core.backends = ( "192.168.1.215:1234" ) proxy-core.max-pool-size = 16 } To install php on a machine for fcgi, you need the following: Minimum to make it work: php-cli-5.1.6-3.x86_64.rpm But you really need mysql for php: php-mysql-5.1.6-3.x86_64.rpm These have a lot of dependancies. The mysql component, in particular, requires Apache! A partial list of the dependancies: php-pdo-5.1.6-3.x86_64.rpm httpd-2.2.3-5.x86_64.rpm apr-1.2.7-10.x86_64.rpm apr-util-1.2.7-3.x86_64.rpm To configure php you need to update /etc/php.ini: output_buffering = Off -- You need to do this if you want to report results before the script is complete. flush() does not work unless you do this! doc_root = /home/phil/www/ -- This seems to be required if you are not running on the same machine as lighttpd.