我买的服务器系统是CentOS 7 x64
Window 连接服务器我下了putty.exe
连接成功后就可以开始一个个配置啦
第一步:安装Apache
yum install httpd
启动Apache
systemctl start httpd
将 http 服务添加到firewalld才能允许外部访问
firewall-cmd --add-service=http --permanent
重启firewalld
systemctl restart firewalld
重启Apache
systemctl restart httpd
第二步:安装MySQL
由于CentOS 7 不再提供 MySQL 的安装包,所以我们安装MariaDB,它是MySQL的一个开源分支
yum install mariadb mariadb-server
启动MariaDB
systemctl start mariadb
设置账户密码
mysql_secure_installation
设置完新密码后一直yes,也就是y