First, add sudo permissions
1.su-Switch to root, need Rootmim
2. Modify the/etc/sudoers permissions chmod 644/etc/sudoers
3.vi/etc/sudoers
Add your own user name password at root all= (all), as
Oftenlin all= (All) all
Second, modify the host name:
Vi/etc/sysconfig/network
Networking=yes
Networking_ipv6=no
Hostname=storm-master
Vi/etc/hosts
Add the 127.0.0.1 Localhost.localdomain back
192.168.1.40 Storm-master
third, modify the static IP address, host name, Gateway
1. Modify the static IP address
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Bootproto=static
broadcast=192.168.0.255
Hwaddr=00:07:e9:05:e8:b4
ipaddr=12.168.1.2
Ipv6init=no
Ipv6_autoconf=no
netmask=255.255.255.0
network=192.168.1.0
Onboot=yes
2. Modify the Gateway
Vi/etc/sysconfig/network
Modify the following content
Networking=yes (Indicates whether the system uses a network and is generally set to Yes.) If set to no, the network cannot be used, and many system services programs will not start.
Hostname=centos (Set the hostname of this machine, the host name set here should correspond to the hostname set in/etc/hosts)
gateway=192.168.1.1 (Sets the IP address of the gateway for the native connection. For example, the gateway is 10.0.0.2)
Modify DNS
3. Modify DNS
# vi/etc/resolv.conf
Add the following content
NameServer 8.8.8.8 #google域名服务器
four, permanently shut down the firewall
Chkconfig iptables off
Five, close SELinux
1 vi/etc/selinux/config
2 #SELINUX =enforcing #注释掉
3 #SELINUXTYPE =targeted #注释掉
4 selinux=disabled #增加
5:wq #保存, off.
6 Shutdown-r now #重启系统
CentOS builds a Linux test environment with several basic setup items