虚拟机Visualbox安装CentOS

选择安装CentOS系统

进入了安装界面,选择语言,并选择继续

安装的主界面

1.先选择日期时间,选择了亚洲,并选择上海,再点击左上角的完成按钮

2.再选择键盘,选择英文

3.选择语言为英语

4.选择安装源为光盘

5.选择安装软件,这里我们选择最小化安装,需要的软件后面会进行安装

6.选择安装的硬盘位置,安装在虚拟机给划分的硬盘上

7.网络和主机名称,必须将右侧的网络开关打开,才可以拿到IP地址,也可以在右下角点击IP4设置固定IP

8.选择安装设置

选择完这些后,开始安装CentOS

在开始安装时,会需要设置Root的口令

 设置完root的密码后,点击完成,之后静静等待安装完成

安装nano,wget

yum install -y nano wget

安装httpd

yum install -y httpd

启动httpd服务

systemctl start httpd

允许开机启动httpd

systemctl enable httpd

安装mysql和mariadb-server

yum install -y mariadb mariadb-server

启动mariadb服务

system start mariadb

允许开机启动mariadb服务

systemctl enable mariadb

配置mariadb

mysql_secure_installation
#会需要设置mysql的root密码,以及是否创建用户,可以根据实际情况选择

关闭系统防火墙

system disable firewalld

安装iptables-services

yum install -y iptables-services

允许开机启动iptables(末尾是不带services的)

systemctl enable iptables

ss 

原文地址:https://www.cnblogs.com/weschen/p/7223285.html