CentOS 7安裝NGINX,PHP7,Mariadb
1.add repo
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
2.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
3. Update && Upgrade
yum -y update && yum -y upgrade
4.install
yum -y install nginx mariadb mariadb-server php-cli php-fpm php-gd php-curl php-mbstring php-mcrypt php-odbc php-mysqlnd php-xmlrpc php-xml php-pdo php-opcache tar bzip2
5.systemctrl enable
systemctl enable nginx && systemctl enable php-fpm && systemctl enable mariadb
6.systemctrl start
systemctl start nginx && systemctl start php-fpm && systemctl start mariadb
7.setup mariadb
/usr/bin/mysql_secure_installation
8.modify /etc/php-fpm.d/www.conf
vi /etc/php-fpm.d/www.conf
listen = 127.0.0.1:9000
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx