Fedora Linux Apache MySQL PHP布置设置配备铺排
-
1. 下载新的MySql_server.rpm
rpm -ivh Mysql_server_XXXX.rpm 布置server平台
rpm -ivh Mysql_client_xxxx.rpm 布置client包
要是你是更新布置的话,能够提示 confict ,so replace rpm -ivh 为 rpm -Uvh
2. 布置 apache
tar -zxvf httpd-2.2.6.tar.gz
cd httpd-2.2.6
./configure --prefix=/usr/local/apache --enable-module=so
make
make install
3.布置 php-5.2.4
tar -zxvf php-5.2.4.tar.gz
cd php-5.2.4
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-mysql
make
make install
cp php.ini-dist /usr/local/lib/php.ini
4.设置配备铺排
vi /usr/local/apache/conf/httpd.conf对apache做如下设置配备铺排
#ServerAdmin 一行改为您的邮箱地点
#DocumentRoot "/home/httpd/html/" 此处为html文件主目次
#Options FollowSymLinks MultiViews 为平安起见,去掉"Indexes"
# DirectoryIndex default.php default.phtml default.php3 default.html default.htm
#
#设置apache的默许文件名按次递次
#AddType application/x-httpd-php .php .phtml .php3 .inc
#AddType application/x-httpd-php-source .phps
#设置php文件后缀
存盘插足
vi /usr/local/lib/php.ini
#register-golbals = On
存盘插足
5.启动apache
/usr/local/apache2/bin/apachectl start
要是提示一下错误:
Can not load /usr/local/apache2/modules/libphp5.so into server:
/usr/local/apache2/modules/libphp5.so:
Can't restore segment prot after reloc : Permission denied
Linux
因为无法加载php模块,在调试PHP步伐是提示下载php,年夜概施展阐发php源代码,处理体例:
修改 httpd.conf
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
实行:chcon /usr/local/apache2/modules/libphp5.so -t shlib_t
注销系统重新进入
/usr/local/apache2/bin/apachectl start
来自: 新客网(www.xker.com) 详文参考:http://www.xker.com/page/e2007/1026/36948.html
版权声明:
原创作品,容许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。不然将清查法律责任。