Centos系統初始化

來源:互聯網
上載者:User

標籤:centos linux 初始化

修改使用者密碼:

passwd

修改linux主機名稱

vi/etc/sysconfig/network

vim/etc/host

主機名稱立即生效

hostname

selinux和防火牆

Redhat使用了SELinux來增強安全,關閉的辦法為:

1.永久有效

修改/etc/selinux/config檔案中的SELINUX=""為disabled,然後重啟。

2.即時生效

setenforce 0

關閉防火牆的方法為:

1.永久性生效

開啟:chkconfig iptables on

關閉:chkconfig iptables off

2.即時生效,重啟後失效

開啟:service iptables start

關閉:service iptables stop

配置nameserver,確保能串連網路

ping www.baidu.com

ping 202.108.22.5

vi/etc/resolv.conf

nameserver 8.8.8.8

nameserver 114.114.114.114

配置163的yum源

 yum -y install wget

cd  /etc/yum.repos.d/

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

重啟linux

reboot

安裝scp,vim命名

yum  -y install openssh-clients vim

需要說明的是對於Linux下的其它服務都可以用以上命令執行開啟和關閉操作

補充:

a.防火牆還需要關閉ipv6的防火牆:

chkconfig ip6tables off

並且可以通過如下命令查看狀態:

chkconfig--list iptables

b.selinux狀態可以通過以下命令查看:

sestatus


本文出自 “雪藤六” 部落格,請務必保留此出處http://879100963.blog.51cto.com/6686639/1703426

Centos系統初始化

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.