LAMP 环境
 
Apache
 
yum install httpd –y
systemctl start httpd
systemctl enable httpd
netstat -nltp | grep 80
' 防火墙 '
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all | grep ports
 

 
MySQL
 
yum install mariadb mariadb-server mariadb-devel -y
systemctl start mariadb
systemctl enable mariadb
netstat -nltp | grep 3306
' 防火墙 '
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all | grep ports
 
初始化操作
 
mysql_secure_installation
 

 
使用设定的密码登录数据库
 
mysql -uroot -p
 
 
show databases;
 

 
 
create database nextcloud_db default charset=utf8;
 

 
 
grant all privileges on nextcloud_db.* to root@119.91.65.227 identified by 'P@ssw0rd123456';
 

 
 
flush privileges;
 
 
use mysql;
select user,host,password from user;
 

 
 
exit
mysql -uroot -h 119.91.65.227 -p
 

 
 
php