Vmware安装linux后一些初始化配置

网络配置

vmware配置虚拟网络编辑器

虚拟机配置

系统配置:

编辑网络配置文件,onboot=yes

重启网络服务

 

关闭iptables

 

centos6

Service iptables stop #临时关闭

chkconfig --list|grep iptables #关闭开机自启动

centos7

systemctl stop firewalld #临时关闭

systemctl disable firewalld #关闭开机自启动

systemctl status firewalld #查看状态

 

关闭selinux

centos6和7相同

编辑配置文件/etc/selinux/config,重启生效

安装vmware tools

右键虚拟机,选择 安装vmware tools

配置YUM源

 

配置本地DVD YUM源

vmware挂载iso镜像

[root@localhost ~]# mount -o loop /dev/cdrom /mnt/cdrom

删除原有的repo文件

新建centos.repo文件,将DVD YUM源信息写入

[DVD-media]

name=CentOS-$releasever - Media

baseurl=file:///mnt/cdrom/

gpgcheck=0

enabled=1

 

清理YUM缓存,查看yum repolist

配置aliyun YUM源

 

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

清空缓存:yum clean all

查看repo:yum repolist

配置epel YUM源

 

yum install -y epel-release.noarch

将第二行注释取消,第三行加上注释

清空缓存,查看repo

关闭NetworkManager

 

centos6

service NetworkManager stop #临时关闭

chkconfig NetworkManager off

centos7

[root@localhost ~]# systemctl stop NetworkManager #临时关闭

[root@localhost ~]# systemctl disable NetworkManager #关闭开机自启动

[root@localhost ~]# systemctl status NetworkManager #查看状态

卸载PackageKit

 

关机创建快照

开机的快照不能用于克隆

 

 

 

原文地址:https://www.cnblogs.com/jeancheng/p/13033107.html