这里 记录下 本屌安装linux 下安装php7 即遇到的问题。php
wget http://cn2.php.NET/distributions/php-7.0.4.tar.gz tar zxvf php-7.0.4.tar.gz cd php-7.0.4
#
./configure --enable-fpm --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc
若是出现下列错误。。那就是没有编译环境 。 请安装gcclinux
yum install gcc
以后看最后又遇到这个问题。。nginx
yum install libxml2-devel
最后 :c++
make && make install
# 安装完成。。
#配置 (一下配置都是我我的的路径配置 你们请按照各自路径配置)
cp php.ini-development /usr/local/lib/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm
chmod +x /etc/init.d/php7-fpm
cd /usr/local/php/etc
cp php-fpm.conf.default php-fpm.conf
cp php-fpm.d/www.conf.default php-fpm.d/www.conf
#配置完毕
/etc/init.d/php7-fpm start 启动php
接下来安装Nginx api
wget http://nginx.org/download/nginx-1.8.0.tar.gz #安装nginx 须要三个依赖 http://www.openssl.org/ http://www.zlib.net/ http://www.pcre.org/ wget http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz wget http://www.zlib.net/zlib-1.2.8.tar.gz wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz ll -h
接下来分别解压三个包 tar zxvf (依次执行三个包)php7
若是有这种报错php-fpm
configure: error: You need a C++ compiler for C++ support
则执行这个命令:
yum install -y gcc gcc-c++
下载下来以后建议从新安装
./configure(若是没有该文件那就执行这个 ./config) && make && make install
最后安装nginx
./configure
make && make install
启动命令:/usr/local/nginx/sbin/nginx
个人没有。。。。。
若是有报错 经网上查询,这是Linux的通病 [root@localhost nginx]# sbin/nginx sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory [root@localhost nginx]# error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory [root@localhost nginx]# whereis libpcre.so.1 libpcre.so: /lib64/libpcre.so.0 /usr/local/lib/libpcre.so /usr/local/lib/libpcre.so.1 [root@localhost nginx]# ln -s /usr/local/lib/libpcre.so.1 /lib64 [root@localhost nginx]# sbin/nginx 先找到libpcre.so.1所在位置,而后作个软连接就能够了
最后spa
查看在网页中访问:.net