Server configuration
Password free login, configure public key connection
-
Copy the local public key to the server
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.100.80
Replace aliyum source
-
Replace Centos-7.repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo # backups mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup mv Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo yum makecache yum update
Add CentOS 7 EPEL warehouse
-
Install a third-party yum source, where Fedora's epel warehouse is used.
$ sudo yum install epel-release
Compiling environment
-
Install build environment
yum groupinstall -y 'Development Tools' sudo yum install -y gcc gcc-c++ autoconf automake openssl openssl-devel curl curl-devel cmake cmake3 gdbm-devel re2c flex bison nano libtool libxml2-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel bzip2-devel libcurl-devel libicu-devel libwebp-devel libzip-dev zlib-devel
Install Git
-
Install git
$ yum install -y git
Install nginx
-
Install Nginx
yum install -y nginx
-
Start Nginx
sudo systemctl start nginx.service
-
Start Nginx
sudo systemctl enable nginx.service
Install Redis
-
Install Redis
$ yum install redis
-
Start Redis
$ service redis start
-
Modify port number / password and other configurations
$ vim /etc/redis.conf
-
Test login
$ redis-cli -h 127.0.0.1 -p 6379
-
Set power on self start
systemctl enable redis
Install MySQL
-
install
# Download mysql source installation package $ wget http://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm # Install mysql source $ yum localinstall mysql80-community-release-el7-1.noarch.rpm # Install mysql $ yum install mysql-community-server # Start MySQL service $ systemctl start mysqld $ systemctl status mysqld # Boot up $ systemctl enable mysqld $ systemctl daemon-reload # View password $ grep 'temporary password' /var/log/mysqld.log # Generated password root @ localhost: kqeipri1pu dev # Sign in $ mysql -uroot -p # Change Password $ ALTER USER 'root'@'localhost' IDENTIFIED BY 'kqeIpRI1pU-Dev';
Install php
- Reference resources: https://webtatic.com/packages/php72/
-
Install PHP
yum install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install php72w-fpm php72w-opcache yum install php72w-zts php72w-cli php72w-mysql php72w-mbstring php72w-xml php72w-gd php72w-devel yum install php72w-bcmath php72w-soap php72w-amqplib