Record several common yum sources under CentOS 7, including PHP7, MariaDB, Redis, and Nginx, as well as Alibaba Cloud sources to facilitate installation of these software on virtual machines or cloud hosts.
1. PHP7 remi source
Use remi Source:
$ Sudo rpm -- import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
$ Sudo rpm-ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
2. MariaDB 10.1
Here is your custom MariaDB YUM repository entry for CentOS. copy and paste it into a file under/etc/yum. repos. d/(we suggest naming the file MariaDB. repo or something similar ).
# MariaDB 10.1 CentOS repository list-created UTC
# Http://mariadb.org/mariadb/repositories/
[Mariadb]
Name = MariaDB
Base url = http://yum.mariadb.org/10.1/centos7-amd64
Gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Gpgcheck = 1
Run the following command:
Sudo yum install MariaDB-server MariaDB-client
3. Redis
Wget http://download.redis.io/redis-stable.tar.gz
Tar xvzf redis-stable.tar.gz
Cd redis-stable
Make
Set the service mode to start. For more information, see quick start and automatic startup of Redis generation environment.
4. The Nginx 1.8
To add NGINX yum repository, create a file named/etc/yum. repos. d/nginx. repo and paste one of the deployments below:
CentOS:
[Nginx]
Name = nginx repo
Baseurl = http://nginx.org/packages/centos/?releasever/?basearch/
Gpgcheck = 0
Enabled = 1
5. Alibaba Cloud
① Backup
Mv/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.backup
② Download the new CentOS-Base.repo to/etc/yum. repos. d/
CentOS 7
Wget-O/etc/yum. repos. d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
③ Run yum makecache to generate the cache