/etc/yum.repos.d/에서 nginx.repo 파일을 생성합니다.vi /etc/yum.repos.d/nginx.repo
[nginx]name = nginx repobaseurl = https://nginx.org/packages/mainline/centos/7/$basearch/gpgcheck = 0enabled = 1
yum install -y nginx
default.conf 파일을 엽니다.vim /etc/nginx/conf.d/default.conf
default.conf 파일을 편집합니다.server{...}를 찾고 server 대괄호 안의 상응하는 구성 정보를 아래의 내용으로 대체합니다. IPv6 주소에 대한 리슨을 취소함과 동시에 Nginx를 구성하고 PHP와 연동합니다.server {listen 80;root /usr/share/nginx/html;server_name localhost;#charset koi8-r;#access_log /var/log/nginx/log/host.access.log main;#location / {index index.php index.html index.htm;}#error_page 404 /404.html;#redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html {root /usr/share/nginx/html;}#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ .php$ {fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}}
systemctl start nginx
systemctl enable nginx
http://CVM 인스턴스의 공용 IP

rpm -qa | grep -i mariadb

yum -y remove 패키지 이름
/etc/yum.repos.d/에서 MariaDB.repo 파일을 생성합니다.vi /etc/yum.repos.d/MariaDB.repo
mirrors.cloud.tencent.com을 mirrors.tencentyun.com 내부 네트워크 주소로 바꿀 수 있습니다. 내부 네트워크 트래픽은 공용 네트워크 트래픽을 차지하지 않으며, 속도도 더 빠릅니다.# MariaDB 10.4 CentOS repository list - created 2019-11-05 11:56 UTC# http://downloads.mariadb.org/mariadb/repositories/[mariadb]name = MariaDBbaseurl = https://mirrors.cloud.tencent.com/mariadb/yum/10.4/centos7-amd64gpgkey=https://mirrors.cloud.tencent.com/mariadb/yum/RPM-GPG-KEY-MariaDBgpgcheck=1
yum -y install MariaDB-client MariaDB-server
systemctl start mariadb
systemctl enable mariadb
mysql

\\q
rpm -Uvh https://mirrors.cloud.tencent.com/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install mod_php72w.x86_64 php72w-cli.x86_64 php72w-common.x86_64 php72w-mysqlnd php72w-fpm.x86_64
systemctl start php-fpm
systemctl enable php-fpm
echo "<?php phpinfo(); ?>" >> /usr/share/nginx/html/index.php
systemctl restart nginx
http://CVM 인스턴스의 공용 IP

피드백