最小化安装之后需要进行哪些操作可以方便以后的系统管理,以下为详细步骤和说明
1.配置root密码
[root@localhost ~]#passwd //修改密码
2.配置IP地址为自动获取(NAT)
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33 //若无vim命令可下载安装
BOOTPROTO=dhcp //修改IP地址获取方式为自动获取,若原本为dhcp无需更改
3.配置yum源(阿里centos7和epel7)
[root@localhost ~]#yum install wget //先安装下载软件,防止移除yum仓库后无法下载部署其他yum仓库
[root@localhost ~]#mv /etc/yum.repos.d/* /tmp //备份
[root@localhost ~]#wget http://mirrors.aliyun.com/repo/CertOS-7.repo -O /etc/yum.repos.d/CentOS-Base.repo //下载阿里centos7 yum源
[root@localhost ~]#wget http://mirrors.aliyun.com/repo/epel-7.repo -O / etc/yum.repos.d/epel.repo //下载epel7yum源
[root@localhost ~]#yum repolist //查看yum仓库
4.永久关闭防火墙
[root@localhost ~]#systemctl stop firewalld //停止防火墙
[root@localhost ~]#systemctl disable firewalld //开机禁用防火墙
[root@localhost ~]#systemctl status firewalld //查看防火墙状态(dead即为设置成功)
5.关闭selinux
查看selinux状态:
[root@localhost ~]getenforce
共有三种状态:
enforcing //开启(会阻止你的程序)
permissive //临时开启
disabled //禁用
临时关闭:
[root@localhost ~]#setenforce 0
永久关闭:
[root@localhost ~]# vi /etc/sysconfig/selinux
SELINUX=disabled
6.安装采用程序
[root@localhost ~]#yum install -y lrzsz sysstat elinks wget net-tools bash-completion vim
//拖拽文件支持、监控服务器工具、文本浏览器、下载工具、网络工具、自动补全、文本编辑
关机设置快照
7.关机设置快照
完成,以后可以通过复制该虚拟机直接进行Linux系统管理操作