CentOS System Initialization

Source: Internet
Author: User

To modify a user password:

passwd

Modify the Linux host name

Vi/etc/sysconfig/network

Vim/etc/host

Host name effective immediately

Hostname

SELinux and Firewalls

Redhat uses SELinux to enhance security and shuts down by:

1. Permanent effect

Modify the selinux= "" in the /etc/selinux/config file to disabled, and then restart.

2. Immediate effect

Setenforce 0

The way to turn off the firewall is:

1. Permanent entry into force

Open:chkconfig iptables on

Off:chkconfig iptables off

2. Immediate effect, failure after reboot

Open:service iptables start

Close:service iptables Stop

Configure nameserverto make sure you can connect to the network

Ping www.baidu.com

Ping 202.108.22.5

Vi/etc/resolv.conf

NameServer 8.8.8.8

NameServer 114.114.114.114

Configuring the Yum source for 163

Yum-y Install wget

cd/etc/yum.repos.d/

wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Restart Linux

Reboot

Installing Scp,vim naming

Yum-y Install openssh-clients Vim

It is necessary to note that for other services under Linux , the above command can be used to perform the open and close operations.

Add:

A. Firewalls also need to shut down the IPv6 firewall:

Chkconfig Ip6tables off

And you can view the status with the following command:

Chkconfig--list iptables

The B.selinux status can be viewed through the following commands:

Sestatus


This article is from the "Snow Cane Six" blog, please be sure to keep this source http://879100963.blog.51cto.com/6686639/1703426

CentOS System Initialization

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.