![]() |
![]() Second Summer 2009 |
Today we install MySQL and PHP and who knows what else we will do.Apache MySQL 44039 44065 Brumbaugh, Margaret Susan 44040 44066 Sorosky, Nicholas Tyler 44041 44067 Turner, Sarah Megan 44042 44068 Amanbayev, Talgat 44043 44069 Baker, Jordan Keith 44044 44070 Castner, Dean A 44045 44071 Fernandez, Francis Paul 44046 44072 Jefford, Logan Nance 44047 44073 Kang, Yoon Mo 44048 44074 Skaggs, Timothy Lee 44049 44075 Al-Azdee, Mohammed 44050 44076 Liu, Hongliu 44051 44077 Nehrt, Nathan 44052 44078 Pejaver, Vikas 44053 44079 Rectanus, Lauren Caitlin 44054 44080 Wright, Scott N 44055 44081 Huang, Gang 44056 44082 Keif, Echo Marie 44057 44083 Paulraj, Sushmitha 44058 44084 Sabetti, Leonard 44059 44085 Sankaranarayanan, Madhuvanthi 44060 44086 Shah, Neethu 44061 44087 Sobieralski, Joseph Bernard 44062 44088 Swaminathan, Rajeswari 44063 44089 German, Dan-Adrian 44064 44090 Dan Wick
We will follow
Chapters 9, 10, 3...http://www.cs.indiana.edu/~dgerman/eowp06.pdf
Move to
Copy the necessary archive there:cd /nobackup/[username]
Uncompress and unarchive:cp /l/www/classes/a348/sum2006/software/mysql-5.0.22.tar.gz .
Remove archive, move into the folder created:gunzip mysql-5.0.22.tar.gz tar xvf mysql-5.0.22.tar
Create a file pico step006:rm mysql-5.0.22.tar cd mysql-5.0.22/
Make sure you use your username, make file executable, run, wait. When it's over create file pico step007:./configure --prefix=/nobackup/dgerman/mysql make make install
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/mysql_install_db \ --user=dgerman \ --datadir=/nobackup/dgerman/mysql
This is to start the server. Make it +x and run it./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 &
Port number:
The MySQL ports are in a column with that label.http://www.cs.indiana.edu/~dgerman/fall2008/students.html
To check that the server is running:
Stop the server: create a file pico mysql_stop as followsps -ef | grep [username]
Check with/nobackup/dgerman/mysql/bin/mysqladmin \ --socket=/nobackup/dgerman/mysql/mysql.sock \ --port=13038 -u root -p shutdown
ps -ef | grep [username] that it went away.
That's it about MySQL for today. We move on to PHP. This is Chapter 10.
Thencd /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
Create a file pico try:rm php-5.1.4.tar cd php-5.1.4/
Make it executable, run it../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
A file php.ini-dist has been created, take it with you:
Now opencp php.ini-dist ~/apache/conf/php.ini cd ~/apache/conf
and at line 290 or so add this:pico httpd.conf
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
with the contents:pico ~/apache/htdocs/one.php
Then access this file from a browser:<? phpinfo(); ?>
Create a symbolic link tohttp://silo.cs.indiana.edu:11350/one.php
one.php:
Then see the code posted at:ln -s one.php one.phps
http://silo.cs.indiana.edu:11350/one.phps