server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /home/www;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
root /home/www;
index index.html index.htm;
}
location ~ .php$ {
root /home/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
安装Mysql
yum list installed | grep mysql
yum list installed | grep mariadb
yum install mariadb mariadb-server
yum list installed | grep mariadb
systemctl start mariadb.service
mysql_secure_installation
systemctl restart mariadb.service
mysql -u root -p
#登录成功执行
grant all privileges on *.* to root@'%' identified by '123456';