Linux伺服器基本安裝

來源:互聯網
上載者:User

原文http://www.mysqlsupport.cn/linux_install_base/

 

作者:吳炳錫 來源:http://www.mysqlsupport.cn/ 連絡方式: wubingxi#gmail.com 轉載請註明作/譯者和出處,並且不能用於商業用途,違者必究。

  該文檔只用於一般伺服器的安裝,其它專用伺服器安裝僅供參考。

系統安裝步驟:
1)輸入linux text選擇text安裝模式。
2)安裝時語言環境選English。
3)鍵盤類型選us。
4)滑鼠選擇No-mouse。
5)安裝類型選Custom。
6)分區設定為:
/dev/sda
/dev/sda1 512M ext3 /boot
/dev/sda2 5G ext3 /home
/dev/sda3 3G ext3 /
/dev/sda4 Extended
/dev/sda5 5G ext3 /var
/dev/sda6 2G ext3 swap
/dev/sda7 餘空間 /data
7)使用GRUB Boot loader。
8)不增加參數在Boot Loader Configuration。
9)不為Boot Loader設定密碼。
10)設定Boot Loader啟動Linux。
11)將Boot Loader安裝在硬碟的MBR。
12)網路設定,按分配的IP配置網卡。
/etc/sysconfig/network-scripts/
#ls ifcfg-*
ifcfg-eth0 ifcfg-eth1 ifcfg-lo
編輯相應檔案
/sbin/service network restart

13)主機名稱視情況而定,預定為WEB-數字,數字為IP最後3位。
14)防火牆的安全層級設為No firewall,禁用SEClinux
15)語言支援選English (USA) 和Chinese (P.R. of China)。
16)預設語言為English (USA)。
17)時區選Asia/Shanghai。
18)Root Password為:redhat
19)Authentication Configuration啟用Use Shadow Passwords和Enable MD5 Passwords。
20)Package Group選擇:
@ Editors
@ Text-based Internet
@ Server Configuration Tools
@ Development Tools
@ Kernel Development
@ Administration Tools
@ System Tools
21)不必建立Boot Diskette。
22)配置顯示選項,指定啟動時進入文字模式。
OS安裝完畢。

安裝後配置
1) 禁用ssh1登入
vi /etc/ssh/sshd_config
#Port 22
#Protocol 2,1
修改為
Port 22
Protocol 2
2) 禁用多於服務
rm /etc/rc.d/rc3.d/* -rf

chkconfig network on
chkconfig rsync on

chkconfig sshd on
chkconfig syslog on
chkconfig crond on
chkconfig xinetd on

根據需要加入自已的相應服務。
3)限制登入IP
vi /etc/hosts.allow
加入
all:IP.:allow
all:all:deny
IP為允許進入管理的IP。當然這個檔案也可以不用。
4)定時同步時間
crontab -e
加入
0 0 * * * rdate -s time-a.nist.gov
or
10 03 * * * /usr/sbin/ntpdate -u tick.ucla.edu tock.gpsclock.com ntp.nasa.gov timekeeper.isi.edu usno.pa-x.dec.com
5)關閉ipv6
echo “alias net-pf-10 off” >> /etc/modprobe.conf.dist

 

 

聯繫我們

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