使用软件
Xshell 5
rm a.txt 删除普通文件a.txt
rm -r a/ 删除目录a
rm -rf a/ 强制删除目录a
-f 表示强制
卸载Apache
yum remove httpd
卸载SVN
rpm -e subversion --nodeps
下载
wget http://cn2.php.net/get/php-7.0.2.tar.gz/from/this/mirror
解压安装
tar zxvf php-7.0.2.tar.gz
cd php-7.0.2
一并安装依赖库
yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel mysql pcre-devel curl-devel libxslt-devel
安装插件
./configure --prefix=/usr/local/php \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-pear \
--with-png-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--enable-fpm \
--enable-bcmath \
--enable-libxml \
--enable-inline-optimization \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-xml \
--enable-zip
编译安装
make && make install
需要注意的是php7中www.conf这个配置文件配置phpfpm的端口号等信息,如果你修改默认的9000端口号需在这里改,再改nginx的配置
cp php.ini-development /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm
启动
/etc/init.d/php-fpm
查询进程
ps -aux | grep "php"
杀死进程
kill 8080
安装Apache连接
http://www.cnblogs.com/zhuque/archive/2012/11/03/2763352.html
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务
Linux环境PHP7.0安装
最新推荐文章于 2023-03-27 16:32:45 发布