用户工具

站点工具


linux:安装php56

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
linux:安装php56 [2019/10/30 19:49] – 创建 zhangguolinux:安装php56 [2026/10/13 22:51] (当前版本) – 外部编辑 127.0.0.1
行 2: 行 2:
  
  
-CentOS 7使用yum安装PHP5.6+CentOS 6使用yum安装PHP5.6
  
 删除旧php包 删除旧php包
-<code bash>+ 
 +```bash
 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
-</code>+``` 
  
 配置epel源 配置epel源
  
-<code bash>+ 
 +```bash
 yum install -y epel-release yum install -y epel-release
 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
-</code>+``` 
  
 配置remi源 配置remi源
-<code bash>+ 
 +```bash
 rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
-</code>+``` 
  
 安装php5.6.x 安装php5.6.x
-<code bash> + 
-yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof +```bash 
-</code>+yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof -y 
 +``` 
  
 安装php-fpm 安装php-fpm
-<code bash> + 
-yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm +```bash 
-</code>+yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm -y 
 +``` 
  
 配置开机启动服务 配置开机启动服务
-<code bash> + 
-centos6: +```bash 
-    #设置php-fpm开机启动 +#设置php-fpm开机启动 
-    chkconfig php-fpm on +chkconfig php-fpm on 
-    #启动php-fpm +#启动php-fpm 
-    /etc/init.d/php-fpm start +/etc/init.d/php-fpm start 
-</code>+``` 
  
  
 查看是否安装成功 查看是否安装成功
-<code bash>+ 
 +```bash
 ps -ef | grep php ps -ef | grep php
 netstat -anp | grep 9000 netstat -anp | grep 9000
-</code>+``` 
 + 
 + 
 + 
 + 
 +```bash 
 +/sbin/service httpd restart 
 +/sbin/service iptables restart 
 +``` 
  
  
  
linux/安装php56.1572436148.txt.gz · 最后更改: (外部编辑)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki