文件清单:(统一放到/home/develop/download)
mysql-5.0.22.tar.gz
httpd-2.2.16.tar.gz
php-5.3.3.tar.gz
Discuz_X1_SC_GBK.zip
1.ssh登录
$su root
$pwd
2.安装mysql
$tar -zxvf mysql-5.0.22.tar.gz
$cd mysql-5.0.22
$mkdir /usr/local/mysql
$./configure -prefix=/usr/local/mysql
$make
$make install
3.安装apache2
$mkdir /usr/local/src/apache2
$cd /usr/local/src/apache2
$tar -zxvf /home/develop/httpd-2.2.16.tar.gz
$mkdir /usr/local/apache2
$./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
$make
$make install
4.安装php
$mkdir /usr/local/src/php5
$cd /usr/local/src/php5
$tar -zxvf /home/develop/php-5.3.3.tar.gz
$mkdir /usr/local/php5
$./configure --prerix=/usr/local/php5 --with-mysql=/usr/local/mysql --with-apx2=/usr/local/apache2/bin/apxs
$make
$make install
5.配置
$vi /usr/local/apache2/conf/httpd.conf
添加:
AddType text/html php
AddType application/x-httpd-php-source phps
LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
修改:
DirectoryIndex index.html index.php
5.测试
$/usr/local/apache2/bin/apachectl start
浏览器测试:http://localhost/ 显示 it works,则表示apache成功启动
添加文件:
$vi /usr/localhsot/apache2/htdocs/index.php
添加:
<? phpinfo();?>
浏览器测试:http://localhost/index.php 显示php信息,则表示php成功配置
6.discuz的安装很简单,将文件解压缩释放到usr/localhsot/apache2/htdocs/bbs/即可,详情可参见上一篇文章