apache 安装
时间:2006-02-25 来源:我为鹤狂
安装httpd2.2.0 + Ras3.0
1.下载及校验
download :
httpd2.2.0.tar.gz -> http://httpd.apache.org/download.cgi
KEYS -> http://archive.apache.org/dist/httpd/
httpd-2.2.0.tar.gz.asc -> http://archive.apache.org/dist/httpd/ 放上述文件到:home/tools 校验版本 :
我使用的是gpg $ cd /home/tools
$gpg --import KEYS
$gpg --verify httpd-2.2.0.tar.gz.asc 提示如果包括如下信息,说明通过校验 gpg: Good signature from "Paul Querna <[email protected]>" 2.解压 $ gzip httpd-2.2.0.tar.gz
$ tar -xvf httpd-2.2.0.tar 3.编译/安装 cd /home/tools/httpd-2.2.0
$./configure --prefix=/usr/local/apache -enable-so
$make
$make install 4.测试 $ /usr/local/apache/bin/apachectl configtest
Syntax OK
$/usr/local/apache/bin/apachectl start $netstat -an |grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
$[root@localhost logs]# cat error_log
[Wed Feb 22 03:52:36 2006] [notice] Apache/2.2.0 (Unix) configured -- resuming normal operations
访问web页面: http://yourip:80 -------------------------------------------------------------------------------------
5.PHP支持
动态添加php模块 download: php-4.4.2.tar.gz --〉http://www.php.net
$tar -zxvf php-4.4.2.tar.gz
$cd php-4.4.2 ./configure
--wtih-prefix=/usr/local/php4
--with-apxs2=/usr/local/apache2/bin/apxs
$make
$make install 安装完成后,我们会发现../apache/moudles/php4.so $cp php.ini-dist /usr/local/lib/php.ini
$vi httpd.conf
LoadModule php4_module modules/libphp4.so //add restart apache server 测试:如果apache可以运行php文件,那么证明php模块加载成功
KEYS -> http://archive.apache.org/dist/httpd/
httpd-2.2.0.tar.gz.asc -> http://archive.apache.org/dist/httpd/ 放上述文件到:home/tools 校验版本 :
我使用的是gpg $ cd /home/tools
$gpg --import KEYS
$gpg --verify httpd-2.2.0.tar.gz.asc 提示如果包括如下信息,说明通过校验 gpg: Good signature from "Paul Querna <[email protected]>" 2.解压 $ gzip httpd-2.2.0.tar.gz
$ tar -xvf httpd-2.2.0.tar 3.编译/安装 cd /home/tools/httpd-2.2.0
$./configure --prefix=/usr/local/apache -enable-so
$make
$make install 4.测试 $ /usr/local/apache/bin/apachectl configtest
Syntax OK
$/usr/local/apache/bin/apachectl start $netstat -an |grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
$[root@localhost logs]# cat error_log
[Wed Feb 22 03:52:36 2006] [notice] Apache/2.2.0 (Unix) configured -- resuming normal operations
访问web页面: http://yourip:80 -------------------------------------------------------------------------------------
5.PHP支持
动态添加php模块 download: php-4.4.2.tar.gz --〉http://www.php.net
$tar -zxvf php-4.4.2.tar.gz
$cd php-4.4.2 ./configure
--wtih-prefix=/usr/local/php4
--with-apxs2=/usr/local/apache2/bin/apxs
$make
$make install 安装完成后,我们会发现../apache/moudles/php4.so $cp php.ini-dist /usr/local/lib/php.ini
$vi httpd.conf
LoadModule php4_module modules/libphp4.so //add restart apache server 测试:如果apache可以运行php文件,那么证明php模块加载成功
相关阅读 更多 +