欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

Centos7 安装最新版 NGINX,PHP,Mysql,Mariadb

来源:本站整理 作者:佚名 时间:2017-03-14 TAG: 我要投稿

自己下载源代码编译很麻烦有没有?注意系统是Centos7!

I. 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

II. 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

III. Mariadb

5.X

# 如果先安装的10版本,需要执行 yum downgrade

vi /etc/yum.repos.d/MariaDB.repo
# add

# MariaDB 5.5 CentOS repository list - created 2017-03-01 02:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum install MariaDB-server MariaDB-client

10.1

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

IV. 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

Reference:

【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载