centos 配置nginx+php+redis 以及常用操作

@fright  November 2, 2017

为了能安装高版本的php

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum升级

yum -y update

安装PHP环境

yum install -y php71w php71w-fpm php71w-cli php71w-process php71w-pecl-redis php71w-pdo php71w-mysql php71w-mcrypt php71w-mbstring php71w-gd php71w-devel php71w-pear

安装nginx等其它包

yum install -y nginx subversion libevent-devel

配置nginx php-fpm php.ini(时区、error_report)

vi /etc/nginx/nginx.conf

vi /etc/php-fpm.conf

vi /etc/php.ini

加入到服务

systemctl enable php-fpm

systemctl enable nginx

启动php-fpm和nginx、redis

systemctl start php-fpm

systemctl start nginx

systemctl start redis

redis连接

redis-cli -h 127.0.0.1 6379


添加新评论