LNMP-源码PHP7-创新互联
php7
发展壮大离不开广大客户长期以来的信赖与支持,我们将始终秉承“诚信为本、服务至上”的服务理念,坚持“二合一”的优良服务模式,真诚服务每家企业,认真做好每个细节,不断完善自我,成就企业,实现共赢。行业涉及成都办公空间设计等,在网站建设、营销型网站、WAP手机网站、VI设计、软件开发等项目上具有丰富的设计经验。1、安装PHP所需依赖;
# yum install gcc bison bison-devel zlib-devel libmcrypt-devel mcrypt mhash-devel openssl-devel libxml2-devel libcurl-devel bzip2-devel readline-devel libedit-devel sqlite-devel
# ./configure --prefix=/opt/php7 \
--with-config-file-path=/opt/php7/etc \
--with-bz2 \
--with-curl \
--enable-ftp \
--enable-sockets \
--disable-ipv6 \
--with-gd \
--with-jpeg-dir=/opt/php7 \
--with-png-dir=/opt/php7 \
--with-freetype-dir=/opt/php7 \
--enable-gd-native-ttf \
--with-iconv-dir=/opt/php7 \
--enable-mbstring \
--enable-calendar \
--with-gettext \
--with-libxml-dir=/opt/php7 \
--with-zlib \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--enable-dom \
--enable-xml \
--enable-fpm \
--enable-bcmath \
--with-libdir=lib64
# make
# make install
# ls
# ls /etc/
# find / -name php.ini
# cp php.ini-development etc/php.ini
# cp etc/php-fpm.conf.default etc/php-fpm.conf
启动php-fpm
# /usr/local/php7/sbin/php-fpm
二;
PHP5.6安装也是一样安装必须得依赖;
# yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y
# tar -xf hp5.6.23.tar.gz -C /usr/local
# mv php5.6 php5
# cd php5
# ./configure \
--prefix=/usr/local/php5 \
--with-config-file-path=/usr/local/php5/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
# make
# make install
# ls
# ls /etc/
2、找到配置文件更改配置文件;
# find / -name php.ini
# cp php.ini-development etc/php.ini
# cp etc/php-fpm.conf.default etc/php-fpm.conf
3、启动php-fpm
# /usr/local/php5/sbin/php-fpm
4、添加PHP命令到环境变量;
# vi .bash_profile
PATH=$PATH:$HOME/bin
改为:
PATH=$PATH:$HOME/bin:/usr/local/php56/bin
# . .bash_profile
# . .bash_profile
5、查看PHP版本
# php -v
PHP 5.6.23 (cli) (built: Jun 26 2016 00:24:15)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网页题目:LNMP-源码PHP7-创新互联
URL链接:http://azwzsj.com/article/dgehsi.html