SLES 9 + Apache 2 + MySQL 5 + PHP 5 Installation ================================================ Version Numbers --------------- SUSE LINUX Enterprise Server 9 for AMD64 & Intel EM64T MySQL 5.0.21 Apache httpd 2.0.55 PHP 5.1.2 Notes: 1. Tried installing Apache httpd 2.2.0, unable to compile 2. PHP depends on libxml2 Setup Files ----------- MySQL-server-standard-5.0.21-1.sles9.x86_64.rpm MySQL-client-standard-5.0.21-1.sles9.x86_64.rpm MySQL-devel-standard-5.0.21-1.sles9.x86_64.rpm MySQL-shared-standard-5.0.21-1.sles9.x86_64.rpm httpd-2.0.55.tar.gz libxml2-2.6.24.tar.gz php-5.1.2.tar.gz SUSE LINUX Enterprise Server 9 for AMD64 & Intel EM64T ------------------------------------------------------ Perform full installation; deselect MySQL and Apache from Software options. mysql-shared can be left selected if there are dependencies. MySQL ----- (login as root) cd /media/cdrecorder rpm -i MySQL-server-standard-5.0.21-1.sles9.x86_64.rpm rpm -i MySQL-client-standard-5.0.21-1.sles9.x86_64.rpm rpm -i MySQL-devel-standard-5.0.21-1.sles9.x86_64.rpm rpm -i MySQL-shared-standard-5.0.21-1.sles9.x86_64.rpm Post-installation testing: cd /usr/bin ./mysqladmin version ./mysqladmin variables ./mysqladmin -u root shutdown ./mysqld_safe --user=mysql & ./mysqlshow -u root ./mysqlshow -u root mysql ./mysql -u root -e "SELECT Host,Db,User FROM db" mysql Anonymous account removal and root password assignment: ./mysql -u root mysql> DELETE FROM mysql.user WHERE User = ''; mysql> FLUSH PRIVILEGES; mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD(''); mysql> SET PASSWORD FOR 'root'@'' = PASSWORD(''); mysql> quit; Apache httpd and PHP Pre-Installation Procedure ----------------------------------------------- 1. Login as root 2. Create user apache 3. Logout 4. Login as apache 5. Create the following directories ~/src ~/opt/httpd/2.0.55 ~/opt/libxml/2.6.24 ~/opt/php/5.1.2 6. Copy the following files to ~/src httpd-2.0.55.tar.gz libxml2-2.6.24.tar.gz php-5.1.2.tar.gz 7. Create symbolic links for all *mysql* files and directories in /usr/lib64 su - root cd /usr/lib ln -s ../lib64/libmysqlclient_r.so (etc.) ln -s ../lib64/mysql mysql exit Apache httpd ------------ (login as apache) cd ~/src gzip -d httpd-2.0.55.tar.gz tar xvf httpd-2.0.55.tar cd httpd-2.0.55 ./configure --prefix=$HOME/opt/httpd/2.0.55 --enable-so make make install PHP --- (login as apache) cd ~/src gunzip -c libxml2-2.6.24.tar.gz | tar xvf - cd libxml2-2.6.24 ./configure --prefix=$HOME/opt/libxml/2.6.24 make make install cd .. gunzip php-5.1.2.tar.gz tar -xvf php-5.1.2.tar cd php-5.1.2 ./configure \ --prefix=$HOME/opt/php/5.1.2 \ --with-apxs2=$HOME/opt/httpd/2.0.55/bin/apxs \ --with-libxml-dir=$HOME/opt/libxml/2.6.24 \ --with-mysql=/usr make make install cp php.ini-recommended ~/opt/php/5.1.2/lib/php.ini (edit /home/apache/opt/httpd/2.0.55/conf/httpd.conf) AddType application/x-httpd-php .php References ---------- http://dev.mysql.com/doc/refman/5.0/en/linux-rpm.html http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html http://www.php.net/manual/en/install.unix.apache2.php http://httpd.apache.org/docs/2.0/install.html http://www.webmasterworld.com/forum40/1602.htm