shopnc 设置mysql_SHOPNC纯手工环境配置教程

# tar xvzf php-5.4.8.tar.gz

# cd php-5.4.8/

# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc \

--with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config \

--with-pdo-mysql=/usr/local/mysql/ --with-iconv-dir=/usr/local --enable-fpm \

--disable-phar --with-fpm-user=www --with-fpm-group=www --with-pcre-regex \

--with-config-file-scan-dir=/usr/local/php/etc/php.d \

--with-zlib --with-bz2 --enable-calendar --with-curl --enable-dba --with-libxml-dir \

--enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir \

--enable-gd-native-ttf --enable-gd-jis-conv --with-mhash --enable-mbstring --with-mcrypt \

--enable-pcntl --enable-xml --disable-rpath --enable-shmop --enable-sockets --enable-zip \

--enable-bcmath --with-snmp --disable-ipv6 --with-xmlrpc --with-ldap --with-ldap-sasl --enable-exif \

--enable-soap --enable-pdo --with-pdo-mysql --enable-sysvsem --enable-inline-optimization --with-curlwrappers

以上代码合并为:./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --with-iconv-dir=/usr/local --enable-fpm --disable-phar --with-fpm-user=www --with-fpm-group=www --with-pcre-regex --with-config-file-scan-dir=/usr/local/php/etc/php.d --with-zlib --with-bz2 --enable-calendar --with-curl --enable-dba --with-libxml-dir --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-mhash --enable-mbstring --with-mcrypt --enable-pcntl --enable-xml --disable-rpath --enable-shmop --enable-sockets --enable-zip --enable-bcmath --with-snmp --disable-ipv6 --with-xmlrpc --with-ldap --with-ldap-sasl --enable-exif --enable-soap --enable-pdo --with-pdo-mysql --enable-sysvsem --enable-inline-optimization --with-curlwrappers

# make ZEND_EXTRA_LIBS='-liconv'

# make test

# make install

# cp php.ini-production /usr/local/php/etc/php.ini

# PATH=/usr/local/php/bin

58892269_2.gifPATH

# PATH=/usr/local/php/sbin

58892269_2.gifPATH

提示:

--enable-fastcgi --enable-force-cgi-redirect PHP 5.3以后已经强制开启了 fastcgi 了,具体查看官方说明:

https://bugs.php.net/bug.php?id=50840&edit=1  最下面 FastCGI is now always enabled and cannot be disabled.

错误:

configure: error: Cannot find ldap libraries in /usr/lib.

解决办法:

ln -sv /usr/lib64/libldap* /usr/lib/

注意 make test 的时候可能会出现 :

/mnt/sun/php-5.4.8/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

32位系统

# ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/libmysqlclient.so.18

64位系统

# ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/libmysqlclient.so.18

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值