产品动态
公共镜像更新动态
操作系统官方停止维护计划
产品公告
/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://云服务器实例的公网 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://云服务器实例的公网 IP

文档反馈