Centos7 安装最新版 NGINX,PHP,Mysql,Mariadb
nginx
vi /etc/yum.repos.d/nginx.repo
# add
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
yum install -y nginx
systemctl start nginx
systemctl status nginx
systemctl enable nginx
php
yum install -y yum-utils wget
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
yum-config-manager --enable remi-php71
yum install -y \
php \
php-devel \
php-json \
php-mysqlnd \
php-fpm \
php-gd \
php-mbstring \
php-pdo \
php-pecl-swoole \
php-pgsql \
php-mcrypt \
php-soap \
php-pecl-redis \
php-pecl-memcache \
php-pecl-memcached
systemctl start php-fpm
systemctl status php-fpm
systemctl enable php-fpm
mariadb
vi /etc/yum.repos.d/MariaDB.repo
# add
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install -y MariaDB-server MariaDB-client
systemctl start mariadb
systemctl status mariadb
systemctl enable mariadb
mysql
yum localinstall -y https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
yum install -y mysql-community-server
systemctl start mysqld
systemctl status mysqld
systemctl enable mysqld