This may not be the best or easiest route, but this is how I setup mine on a fresh Ubuntu install.
Your results may vary...
Development Webserver, Using Apache2, PHP 5, and MySQL 4, Running on Ubuntu Linux
sudo aptitude install build-essential
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install libgd-dev
download the binary version of MySQL (currently MySQL 4.1.7) from http://mysql.com
download the latest version oh PHP (currently PHP 5.0.2) from http://php.net
download the latest version of apache 2 (currently Apache 2.0.52) from http://apache.org
download the latest libxml2 library (currently libxml2-2.6.15.tar.gz), from http://xmlsoft.org
download the latest zlib library (currently zlib 1.2.1), from http://gzip.org/zlib
:~ $ mv php-5.0.2.tar.gz \
> libxml2-2.6.15.tar.gz \
> mysql-standard-4.1.7-pc-linux-i686.tar.gz \
> httpd-2.0.52.tar.gz \
> zlib-1.2.1.tar.gz /tmp
cd /tmp
tar -zxvf mysql-standard-4.1.7-pc-linux-i686.tar.gz
tar -zxvf php-5.0.2.tar.gz
tar -zxvf httpd-2.0.52.tar.gz
tar -zxvf libxml2-2.6.15.tar.gz
tar -zxvf zlib-1.2.1.tar.gz
cd libxml2-2.6.15
./configure
make
sudo make install
cd /tmp/zlib-1.2.1
./configure
make
sudo make install
Installing MySQL:
cd /tmp
sudo mv mysql-standard-4.1.7-pc-linux-i686 /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo mv /usr/local/mysql/share/fill_help_tables.sql /usr/local/mysql/support-files
sudo /usr/local/mysql/scripts/mysql_install_db --user=mysql
sudo chown -R root /usr/local/mysql
sudo chgrp -R mysql /usr/local/mysql
sudo chown -R mysql /usr/local/mysql/data
Start it up:
sudo /usr/local/mysql/support-files/mysql.server start
Test it:
/usr/local/mysql/bin/mysql
Secure it:
sudo /usr/local/mysql/bin/mysql -u root
SET PASSWORD FOR ''@'localhost' = PASSWORD('newpass');
SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
Installing Apache:
cd /tmp/httpd-2.0.52
./configure --prefix=/usr/local/apache2 --enable-so
make
sudo make install
Installing PHP:
cd /tmp/php-5.0.2
nano config.sh
Add (this will vary depend on your needs):
./configure \
--prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-libxml-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-gd \
--enable-sockets
Press ctrl+o
Then ctrl+x
chmod 755 config.sh
./config.sh
make
sudo make install
sudo mv /tmp/php-5.0.2/php.ini-dist /usr/local/lib/php.ini
sudo nano /usr/local/apache2/conf/httpd.conf
Add:
AddType application/x-httpd-php .php
ctrl+o
ctrl+x
sudo /usr/local/apache2/bin/apachectl start
sudo nano /usr/local/apache2/htdocs/test.php
Add:
Open a browser and visit:Code:<?php phpinfo(); ?>
http://localhost/test.php
Bookmarks