linux新裝系統最佳化

來源:互聯網
上載者:User

標籤:系統最佳化   伺服器   管理工具   linux   import   

Linux系統安裝環境最佳化

linux新系統安裝需要:

baseeditorsdevelopment-librarysdevelopment -toolsX-software-development  system-tools基本系統:基本、效能工具、調試工具開發:開發工具伺服器:系統管理工具系統管理:snmp、系統管理

1.Centos下載 yum源  

http://mirrors.sohu.com/help/CentOS-Base-sohu.repohttp://mirrors.163.com/.help/CentOS6-Base-163.repo

2.用下面命令把yum更新到最新

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*Yum upgrade

3.安裝必要的軟體包

yum –y install lrzsz systat

4.清理所有開機自啟動的服務|添加需要的開機服務

setup 可以在shell圖形終端裡配置開機啟動服務ntsysv也可以在shell終端圖形配置開機啟動服務 chkconfig –list|grep 3:on只需啟動4個服務 crond 、network、 sshd、 syslog

5.更改ssh登陸配置

更改前備份:   cp  /etc/ssh/sshd_config     /etc/ssh/sshd_config.bakVi  /etc/ssh/ssh_config#####by Darren#####Port 52113  更改連接埠號碼Permit Root Login  no                      禁止root遠程登陸Permit Empty Passwords no         禁止空密碼登陸Use DNS no                                       不使用dnsForwardX11Trusted no                   不使用x圖形轉寄

6.將普通使用者加入到sudo管理

Visudoroot                     ALL=(ALL)ALLDarren         ALL=(ALL)ALL在root那行添加darren ALL=ALL(ALL)。 Darren就可以使用sudo獲得root的許可權。

7.普通使用者的環境變數

echo $PATH查看環境變數Vi  ~/.bash_profile 把   :/usr/local/sbin:/sbin:/usr/sbin  添加到環境變數裡PATH=$PATH:$HOME/bin:/home/darren/scripts:/usr/local/sbin:/sbin:/usr/sbinexport PATHsource ~/.bash_profile 使配置生效。

8.中文顯示亂碼

vi   /etc/sysconfig/i18n修改設定檔 LANG=”zh_CN.GB18030”source /etc/sysconfig/i18n  使設定檔生效echo $LANG 查看系統語言

9.加大伺服器檔案描述符

vi  /etc/security/limits.conf末尾加   *      -      nofile            65535tail -1 /etc/security/limits.conf

10.調整核心參數檔案 /etc/sysctl.conf

net.ipv4.tcp_fin_timeout=2wsysctl   –p 使設定檔生效


本文出自 “王家東哥” 部落格,謝絕轉載!

linux新裝系統最佳化

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.