Linux下安装PHP的一些参数及设定
时间:2010-09-05 来源:znf0048
apache:
./configure --prefix=/usr/local/apache --enable-shared=max --enable-module=most
Apache2 模块化,需要控制每个模块的使用的就这样,这两天都碰到这个问题,如果把loadModule的一些语句注释掉,会有好多报错的哦:
./configure --prefix=/local/apache --enable-so --enable-mods-shared=all
懒人模式就这样了:
./configure --prefix=/local/apache
php安装需要设置mysql环境,否则会有可能出现版本问题
这两天从mysql4升级到mysql5,出现了帐号有密码就无法通过php登陆的情况,后来指定了mysql的目录就ok了。命令行形式是完全可以登陆的,所以就是php的mysql模块的问题了,听说是mysql5和mysql4的密码验证方式不一样。
我一般的配置参数:
./configure --prefix=/Data/apps/php --with-mysql=/Data/apps/mysql --with-apxs2=/Data/apps/apache/bin/apxs --enable-track-vars --with-xml --enable-mbstring --enable-sockets --enable-thread-safety --with-gd --with-zlib --with-mbstring --with-iconv
php+mysql(摘抄的):
./configure --with-mysql=/usr --enable-track-vars --prefix=/usr/local/php --with-xml --with-config-file-path=/etc --enable-url-includes --enable-sockets --enable-discard-path --with-apxs=/usr/local/apache/bin/apxs --enable-force-cgi-redirect --disable-cgi --with-gettext --with-gdbm --enable-sigchild --enable-mbstring=all
php+oracle+mysql(摘抄的):
./configure --with-mysql=/usr --enable-track-vars --prefix=/usr/local/php --with-oci8=/opt/oracle/product/9204 --with-xml --with-config-file-path=/etc --enable-url-includes --enable-sockets --enable-discard-path --with-apxs=/usr/local/apache/bin/apxs --enable-force-cgi-redirect --disable-cgi --with-gettext --with-gdbm --enable-sigchild --enable-mbstring=all
安装PHP时注意:装完别忘了把php.ini复制到指定目录中(上例中的是/etc目录下)
如果php是与apache2结合,须改动 --with-apxs= 为 --with-apxs2=