CentOS builds a Linux test environment with several basic setup items

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.