Notes started at Fri Sep 26 10:28:41 EDT 2008 Today we install MySQL and PHP and who knows what else we will do. We will follow http://www.cs.indiana.edu/~dgerman/eowp06.pdf Chapters 9, 10, 3... Move to cd /nobackup/[username] cp /l/www/classes/a348/sum2006/software/mysql-5.0.22.tar.gz . Uncompress and unarchive: gunzip mysql-5.0.22.tar.gz tar xvf mysql-5.0.22.tar Remove archive, move into the folder created: rm mysql-5.0.22.tar cd mysql-5.0.22/ Create a file pico step006: ./configure --prefix=/nobackup/dgerman/mysql make make install Make sure you use your username, make file executable, run, wait. When it's over create file pico step007: /nobackup/dgerman/mysql/bin/mysql_install_db \ --user=dgerman \ --datadir=/nobackup/dgerman/mysql Save, chmod +x it, then execute: it's a configuration step, it takes 3 seconds and prints one screen of output. Create file pico step008: /nobackup/dgerman/mysql/bin/mysqld_safe \ --user=dgerman \ --pid-file=/nobackup/dgerman/mysql/mysqld.pid \ --log=/nobackup/dgerman/mysql/mysqld.log \ --socket=/nobackup/dgerman/mysql/mysql.sock \ --basedir=/nobackup/dgerman/mysql \ --log-error=/nobackup/dgerman/mysqld-error.log \ --datadir=/nobackup/dgerman/mysql \ --port=13038 & This is to start the server. Make it +x and run it. Port number: http://www.cs.indiana.edu/~dgerman/fall2008/students.html The MySQL ports are in a column with that label. To check that the server is running: ps -ef | grep [username] Stop the server: create a file pico mysql_stop as follows /nobackup/dgerman/mysql/bin/mysqladmin \ --socket=/nobackup/dgerman/mysql/mysql.sock \ --port=13038 -u root -p shutdown Check with ps -ef | grep [username] that it went away. That's it about MySQL for today. We move on to PHP. This is Chapter 10. cd /nobackup/dgerman cp /l/www/classes/a348/sum2006/software/php-5.1.4.tar.gz . gunzip php-5.1.4.tar.gz tar xvf php-5.1.4.tar Then rm php-5.1.4.tar cd php-5.1.4/ Create a file pico try: ./configure \ --with-mysql=/nobackup/dgerman/mysql \ --with-apxs2=/u/dgerman/apache/bin/apxs \ --with-config-file-path=/u/dgerman/apache/conf \ --with-xml --enable-track-vars \ --prefix=/u/dgerman/apache make make install Make it executable, run it. A file php.ini-dist has been created, take it with you: cp php.ini-dist ~/apache/conf/php.ini cd ~/apache/conf Now open pico httpd.conf and at line 290 or so add this: AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps Then exit (and save) stop and start server. To verify that PHP is working create pico ~/apache/htdocs/one.php with the contents: Then access this file from a browser: http://silo.cs.indiana.edu:11350/one.php