Linux下用Tar方式安装MySQL方法步骤(二)

2014-11-24 17:39:11 · 作者: · 浏览: 2
//提供Web服务的文档的根目录

//This should be changed to whatever you set DocumentRoot to.


4.安装PHP 5.2.6


# tar xzvf php-5.2.6.tar.gz


# cd php-5.2.6


(注:如果MySQL采用默认安装路径--即未指定--prefix=/usr/local/mysql,则采用如下命令:
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
否则会报类似以下的错误:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!)


# make


# make install


copy配置文件
# cp php.ini-dist /usr/local/lib/php.ini


配置Apache服务的httpd.conf文件
*在LoadModule处添加 LoadModule php5_module module/libphp5.so
*在DirectoryIndex处添加 index.php
*在AddType application处添加
AddType application/x-httpd-php .php .phtml
AddType applicatoin/x-httpd-php-source .phps


转载请注明出处!多谢多谢!


Linux公社(Linuxidc)声明:Linux公社登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。