Linux VmWare安装虚拟机(centos6.9)
开启虚拟机
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
登录:
修改ip:
vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet #需要修改 ONBOOT=yes NM_CONTROLLED=yes #需要修改 BOOTPROTO=static DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" #需要修改 IPADDR=192.168.44.31 NETMASK=255.255.255.0 GATEWAY=192.168.44.2 DNS1=8.8.8.8
修改mac地址
vi /etc/udev/rules.d/70-persistent-net.rules # PCI device 0x8086:0x100f (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8f:0e:09", ATTR{type}=="1", KERNEL=="eth*", #需要修改 如果是eth0 则不用修改 NAME="eth0"
修改主机名
vi /etc/sysconfig/network NETWORKING=yes #需要修改 HOSTNAME=mysqlMachine
域名映射
vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.44.31 mysqlMachine
windows系统域名映射
修改C:\Windows\System32\drivers\etc\hosts,用记事本打开,在最下方加上
192.168.44.31 mysqlMachine
用SecureCRT连接的时候就可以不用写ip了:
关闭虚拟机防火墙
chkconfig iptables off //下次开机后永久关闭防火墙 service iptables stop //临时关闭防火墙