Skip to content
/ LNMP Public

CentOS + Nginx + PHP7 + MySQL8 + phpMyAdmin 一键安装

Notifications You must be signed in to change notification settings

pzn2513/LNMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

LNMP

CentOS + Nginx + PHP7 + MySQL8 + phpMyAdmin 一键安装 整个安装流程有较酷炫的效果,适合装逼

安装指南:

使用root连接服务器

yum install -y git
git clone https://github.com/pzn2513/LNMP
chmod 700 LNMP/lnmp-install
cd LNMP
./lnmp-install
mysql -uroot -p

复制粘贴以上命令,等待安装……

安装完成! 获取MySQL临时密码,登陆后需修改密码

grep 'temporary password' /var/log/mysqld.log
set global validate_password.policy=LOW;
alter user 'root'@'localhost' identified with mysql_native_password by 'Your.Password';

#新建一个admin用户,密码类型native,用来给phpmyadmin连接数据库(当然,也可以改root密码类型)
insert mysql.user VALUES ('localhost', 'admin', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', '0', '0', '0', '0', 'mysql_native_password', '*84AAC12F54AB666ECFC2A83C676908C8BBC381B1', 'N', '2018-04-21 11:25:16', null, 'N', 'Y', 'Y', null, null, null,null);
FLUSH PRIVILEGES;
alter user 'admin'@'localhost' identified by 'Your.Password';

其他操作
show variables like 'character%';
select host,user,plugin,authentication_string from mysql.user;

MySQL8的配置变化比较大,如果无法成功配置可以寻求帮助,见Bugs & Issues

输入服务器ip访问phpmyadmin: ip/phpMySQLAdmin-secret 如果访问出现403,检查selinux状态,如开启关闭即可

sestatus
setenforce 0
#上为临时关闭,永久关闭需要配置 SELINUX=disabled
vi /etc/selinux/config

Default Location

Nginx Location Path
Web root location /usr/share/nginx/html
Main Configuration File /etc/nginx/nginx.conf
phpMyAdmin Location Path
Installation location /usr/share/nginx/html/phpMySQLAdmin-secret
PHP Location Path
Configuration File /etc/php.ini
Configuration File /etc/php-fpm.d/www.conf
MySQL Location Path
my.cnf Configuration File /etc/my.cnf

Process Management

Process Command
Nginx service nginx ()
php-fpm service php-fpm ()
MySQL systemctl (start|stop|status|restart) mysqld.service

Bugs & Issues

Please feel free to report any bugs or issues to us, email to: pznforwork@outlook.com or issues on Github.

License

Copyright (C) 2016 - 2018 PZN

Licensed under the GPLv3 License.

About

CentOS + Nginx + PHP7 + MySQL8 + phpMyAdmin 一键安装

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages