码迷,mamicode.com
首页 > Web开发 > 详细

服务器php启动

时间:2017-04-28 01:02:20      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:重启   memcach   ml2   file   csdn   pdo_mysql   oca   路径   php   

php.ini放在--with-config-file-path设置路径下lib文件夹中才找的到!!!!

fpm的配置文件需要放在这个位置/usr/local/etc/php-fpm.conf,暂时不知道咋改;

http://blog.csdn.net/xiaog351/article/details/47421969

php:
{
cd /opt/apps
wget http://cn2.php.net/distributions/php-5.6.26.tar.gz
tar -xzvf php-5.6.26.tar.gz 
cd php-5.6.26/
;./configure --prefix=/opt/apps/php(安装目录)  --with-config-file-path=/opt/apps/php(配置目录)
--enable-fpm --with-mysql(php-fpm)
yum install libxml2* -y 
make
make test
make install
vim /etc/profile
添加:
PHP_HOME=/opt/apps/php
export PATH=$PATH:$PHP_HOME/bin
source /etc/profile
php -v 查看
}
php.ini放在--with-config-file-path设置路径下lib文件夹中才找的到!!!!
ssl
{
    cd /opt/apps/php-5.6.26/ext/openssl
    cp config0.m4 config.m4
    /opt/apps/php/bin/phpize 
    ./configure --with-openssl --with-php-config=/opt/apps/php/bin/php-config
    make
    make test
    make install
    在php.ini内加入以下内容:
extension_dir = "/opt/apps/php/lib/php/extensions/no-debug-non-zts-20131226"
extension = "openssl.so"
重启php、nginx后生效
}
php/sbin/php-fpm -y /opt/apps/php/etc/php-fpm.conf -c /opt/apps/php/php.ini
装memcached扩展
{
#wget http://pecl.php.net/get/memcache-2.2.6.tgz
# tar zxf memcache-2.2.6.tgz
# cd memcache-2.2.6
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-memcache
# make
# make install
}
装pdo_mysql扩展
{
# cd /opt/php/php-5.6.30/ext/pdo_mysql
# /usr/local/bin/phpize
# ./configure --with-pdo-mysql=/opt/apps/mysql --with-php-conifg=/usr/local/bin/php-confi
# make
# make install
}

 

服务器php启动

标签:重启   memcach   ml2   file   csdn   pdo_mysql   oca   路径   php   

原文地址:http://www.cnblogs.com/hawk-whu/p/6778350.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!