Recovery plan ------------- 1) Verify that httpd, mysqld, php and svn are installed: * yum install httpd.x86_84 * yum install MySQL-python.x86_64 mysql.x86_64 mysql-administrator.x86_64 mysql-server.x86_64 mysqlclient10.x86_64 mysqlclient10-devel.x86_64 mysql-devel.x86_64 mysql-bench.x86_64 * yum install svn.x86_64 * yum install php.x86_64 php-mysql.x86_64 php-dba.x86_64 php-dbase.x86_64 php-devel.x86_64 php-gd.x86_64 php-xml.x86_64 2) Start mysqld: * /sbin/service mysqld start 3) Grant to your Unix user all the privileges for the database from root account: * mysql > grant all on *.* to linkageattechnio@localhost identified by 'linkageattechnion'; > grant all on *.* to linkageattechnio@ identified by 'linkageattechnion'; 4) Create database from root: * mysql > create database linkageattechnion; 5) Prepare ~/.my.cnf for your Unix user: * [client] host=localhost user=linkageattechnion password=linkageattechnion database=linkageattechnion table 6) Copy the database backup file to the local machine, unzip it and run it from within mysql. At this point all the database data is being restored: * scp cbl-link02:/home/linkageathome2/mysqldump/linkageattechnion.dmp.gz . * gzip -d linkageattechnion.dmp.gz * mysql > .\ linkageattechnion.dmp 7) Create directory named 'projects', enter it and check out the latest version of the front end files: * mkdir ~/projects * cd ~/projects * svn co ssh+svn://cbl-evo/home/linkageathome/svn/superlinkattechnion 8) Copy all the profiles, such as .bash_profile, .bashrc and crontab to the Unix account 9) Include project-specific HTTPD configuration file and PHP-specific configuration file in /etc/httpd/conf/httpd.conf 10) Modify all the directories in $PROJECT_ROOT that contain the host name in their own name. Touch the following log files (as the project user): * touch $PROJECT_ROOT/log_/file_upload_handler.log * touch $PROJECT_ROOT/log_/cgi.log * chmod g+w $PROJECT_ROOT/log_/file_upload_handler.log * chmod g+w $PROJECT_ROOT/log_/cgi.log 11) Verify that the HTTPD user shares a group with the project user and that there are appropriate permissions for this group in project files (as root): * groupadd boinc * usermod -G boinc apache * usermod -G boinc linkageathome2 * chgrp -R boinc ~/projects/superlinkattechnion * cd ~/projects/superlinkattechnion * chmod g+s upload * chmod g+s cgi-bin/cgi * chmod g+s html/cache * chmod g+s html/inc * chmod g+s html/languages * chmod g+s html/languages/compiled 12) Verify that the following symbolic links are installed (as the project user): * ln -s $PROJECT_ROOT/html/stats $PROJECT_ROOT/html/user/stats * ln -s $PROJECT_ROOT/download $PROJECT_ROOT/html/user/download * ln -s $PROJECT_ROOT/html/user_profile $PROJECT_ROOT/html/user/user_profile 13) Modify your $PROJECT_ROOT/config.xml with details of the new machine. For example, change all the URLs to contain the new machine host name. Modify any other files that might contain the previous host name, specifically, update/remove *.xml files from $PROJECT_ROOT/bin and run the profile pages update: * cd $PROJECT_ROOT/html/ops * ./run_in_ops ./update_profile_pages.php 14) Start httpd: * /sbin/service httpd start 15) Make all the necessary changes into /robots.txt: * User-agent: * Disallow: /superlinkattechnion Disallow: /superlinkattechnion_ops Disallow: /superlinkattechnion_cgi 16) Prepare an appropriate logrotate configuration file and deposit it into /etc/logrotate.d/: /home//projects//log_/transitioner.log { compress size=50M create 0664 rotate 1 prerotate umask 002 su - -c "stop" /sbin/service httpd stop endscript postrotate su - -c "start" /usr/sbin/httpd -k start endscript }