centos7源码安装php7
系统:centos7.2
成都创新互联是一家集网站建设,阿鲁科尔沁企业网站建设,阿鲁科尔沁品牌网站建设,网站定制,阿鲁科尔沁网站建设报价,网络营销,网络优化,阿鲁科尔沁网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。
php版本:php7.0.0
安装前工作:
yum install gcc make crul-devel libxslt-devel gd-devel libjpeg-devel libpng libpng-devel libxml2-devel bzip2-devel libcurl-devel –y #如果下面 配置编译报错 请yum安装相关依赖包
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum -y install libmcrypt-devel mcytpt mhash libxslt-devel
安装libiconv
tar xf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/lcoal/libiconv
make && make install
解压安装:
tar xf php-7.0.0.tar.gz
cd php-7.0.0/
./configure \ --prefix=/usr/local/php7 \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --with-bz2 \ --with-curl \ --with-gd \ --with-mcrypt \ --with-openssl \ --with-mhash \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-iconv-dir=/usr/local/libiconv \ --with-gettext \ --with-libxml-dir \ --with-zlib \ --with-xmlrpc \ --with-pcre-regex \ --with-pear \ --with-pdo-MySQL=mysqlnd \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-libdir=lib64 \ --enable-dom \ --enable-xml \ --enable-fpm \ --enable-bcmath \ --enable-ftp \ --enable-sockets \ --disable-ipv6 \ --enable-mbregex \ --enable-mbstring \ --enable-calendar \ --enable-gd-native-ttf \ --enable-static \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-mbregex \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-zip \ make && make install cp php.ini-production /usr/local/php7/lib/php.ini cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf#php-fpm.conf 引用这个目录中*.conf 配置文件,修改启动用户。端口号等启动/etc/init.d/php-fpm停止pkill php-fpm 或者 ps -ef |grep php-fpm |awk '{print $2}' |xargs kill
文章名称:centos7源码安装php7
文章来源:http://myzitong.com/article/jspjji.html