标签:方法 fast conf mysql8 eve 原因 配置 XML lin
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# yum install php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml
# systemctl start php-fpm
方法地址 :https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
# yum localinstall https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
# yum install mysql-community-server
# systemctl enable mysqld
# systemctl start mysqld
root初始密码
# grep ‘temporary password‘ /var/log/mysqld.log
# yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
# yum install -y nginx
# systemctl enable nginx.service
# systemctl start nginx.service
配置/etc/php-fpm.d/www.conf
user = nginx
group = nginx
重启服务
# systemctl restart php-fpm
编辑配置文件/etc/my.cnf
若有skip-grant-tables,需要将其注释掉
配置/etc/nginx/conf.d/default.conf
server {
listen 80;
server_name test.web.com;
charset utf8;
location / {
root /var/www/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
include fastcgi_params;
}
}
防火墙开放80端口
# firewall-cmd --zone=public --add-port=80/tcp --permanent
# systemctl stop firewalld.service
# systemctl start firewalld.service
添加/var/www/html/index.html
<h1>
<span> hello, world. </span>
</h1>
添加/var/www/html/phpinfo.php
<?php phpinfo(); ?>
访问index.html
在浏览器中打开http://ip/, 若出现“hello, world.”则成功
访问phpinfo.php
在浏览器中打开http://ip/phpinfo.php, 若出现php信息则成功
标签:方法 fast conf mysql8 eve 原因 配置 XML lin
原文地址:https://www.cnblogs.com/eat-and-die/p/10199915.html