/ Published in: Other
This takes about an hour in total to run on my machine, so give yourself enough time. Obviously the configure options will need to be tweaked to match your set up, but this works for me. This assumes you already have MySQL installed.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# 1. install Apache, it doesn't have to go in the /opt directory # (change the URL to be whatever the latest release is) wget http://apache.rmplc.co.uk/httpd/httpd-2.2.6.tar.gz tar -xvzf httpd-2.2.6.tar.gz cd httpd-2.2.6 ./configure \ --prefix=/opt/apache2.2.6/ \ --enable-so \ --enable-cgi \ --enable-info \ --enable-rewrite \ --enable-usertrack \ --enable-deflate \ --enable-ssl \ --enable-mime-magic make sudo make install # 2. install PHP, change the paths to match your machine wget http://ftp.at.linuxfromscratch.org/pub/php/php-5.2.4.tar.gz tar -xvzf php-5.2.4.tar.gz cd php-5.2.4 ./configure \ --with-apxs2=/opt/apache2.2.6/bin/apxs \ --with-zlib=/usr \ --with-mysql=/usr/local/mysql \ --with-pgsql=/usr/local/pgsql \ --prefix=/opt/apache2.2.6/php \ --with-config-file-path=/opt/apache2.2.6/php \ --enable-force-cgi-redirect \ --enable-shared \ --disable-cgi make sudo make install # 3. enable PHP on your new server, adjust other configs as needed sudo vi /opt/apache2.2.6/conf/httpd.conf AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps DirectoryIndex index.html index.php # 4. start the MySQL server if you need to sudo mysqld_safe & # 5. start the new server (use start, restart or stop as required) sudo /opt/apache2.2.6/bin/apachectl start