1.httpd-2.2.3.tar.gz
gunzip < httpd-2.2.3.tar.gz |tar -xvf -
cd httpd-2.2.3
./configure
make
make install
啟動:/usr/local/apache2/bin/apachectl start
2.mysql-5.0.22.tar.gz
groupadd mysql
useradd -g mysql mysql
gunzip < mysql-5.0.22.tar.gz |tar -xvf -
cd mysql-5.0.22
./configure --prefix=/usr/local/mysql --with-charset=gb2312
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql //用來安裝資料庫檔案
chown -R root
chown -R mysql var
chgrp -R mysql
啟動 bin/mysqld_safe --user=mysql &
3.php-5.2.0.tar.gz
gunzip < php-5.2.0.tar.gz |tar -xvf -
cd php-5.2.0
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars --enable-force-cgi-redirect --with-config-file-path=/usr/local/apache/conf
make
make install
cp php.ini-dist /usr/local/apache/lib/php.ini
編輯php.ini檔案:
尋找:
;default_charset = "iso-8859-1"
在這行下面加一行
default_charset = "gb2312"
# 編輯apache的 httpd.conf檔案:
尋找:
DirectoryIndex index.html
在後面加入 index.php 讓apache也能開啟預設首頁為php的檔案。
尋找:
#AddType application/x-tar .tgz
在下面加入
AddType application/x-httpd-php .php
重啟apache