yum 安装稳定常用的php版本及扩展
2016年1月1日
添加资源库 - epel, ius(以centos6.5及以上为例)
打开网址https://ius.io/GettingStarted/选择适合操作系统的资源库
1 | wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm |
接下来用yum命令,可以安装高版本的php,yum install php55u php55u-fpm php55u-mysql php55u-redis php55u-mbstring
用yum search xxx来搜索自己所需要的软件如yum install php55u-pecl-redis安装redis
安装nginx
访问http://nginx.org/en/linux_packages.html可以查看安装nginx最新版本的方法
现在的方法是
1 | To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents: |
然后执行以下命令
1 | yum install nginx |
就安装了最新版本的nginx,且启动了
安装swoole扩展
1 | pecl install swoole |
备注
用cat /etc/redhat-release查看centos系统版本号yum repolist查看操作系统的资源库
