LAMP之LINUX安裝

來源:互聯網
上載者:User

 

LAMP之LINUX安裝總結

1、

  插入光碟片或ISO檔案

2、

  以文字模式設定,輸入:text

3、

  跳過CD檢驗Skip

4、

  Welcome to CentOS!  ok

5、

  語言選擇English

6、

  鍵盤選擇us

7、

  提示:會初始化裝置,所有資料庫將被清空,因為是全新安裝。yes

8、

  進入文本分區介面

==========================

remove all partitions on selected drives and create default layout.

移除所選磁碟上的所有分割區,並建立預設的分割模式。

remove linux partitions on selected drives and create default layout.

移除所選磁碟上的linux分割區,並建立預設的分割模式。

use free space on selected drives and create default layout.

使用所選取磁碟上的未使用空間,建立預設的分割模式。

create custom layout.

手動分區

============================

選擇如第一個。

9、

  確認資訊YES

10、

  將磁碟分為三個區。

===========

/boot

swap

/

===========

 / 分區選擇Fill all available space (全部剩餘空間)

 分區選擇Force to be a primary partition(主要磁碟分割)

OK確認。

11、

  啟動載入配置GRUB.預設斷行符號。

12、

  Boot Loader Configuration

  設定一個與獨立不重複的名字  OK

13、

  選擇Use a GRUB Password

  為GRUB設立一個密碼。

14、

  其它一路預設斷行符號。

15、

Network Configuration for eth0

設定網路資訊

選擇Activate on boot 和Enable IPv4 support 斷行符號

16、

  選擇Manual address configuration

     IP Address 本機ip (如):192.168.1.126

     Prefix(Netmask) 子網路遮罩(如):255.255.255.0  OK

17、

    Gateway 預設閘道(如):192.168.1.1

    Primary DNS 網關(如):202.106.0.20

    Secondary DNS 備用網關(如):空白

 OK

18、

  設定主機名稱OK

19、

  設定系統時間 選擇Asis/Shanghai  OK

20、

  設定系統登入密碼

21、

  選擇要安裝的軟體包 勾選Customize software selection(自訂)

22、

  勾選基礎安裝包:

  develop library

  develop tools

  edits

  base

  x software development

  administrator tools

  system tools

OK

23、

  確認安裝資訊OK後等待安裝。

24、

  取出光碟片或ISO,reboot重啟後登陸root

  #su - //擷取root許可權

  #whoami //查看目前許可權

25、

  建立新使用者

  #useradd 使用者名稱

  #passwd 使用者名稱//設定密碼or 初始密碼

26、

  安全起見,修改系統連接埠及登入資訊。

    #cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ori //備份需要配置的ssh_config檔案

    #vi /etc/ssh/sshd_config  //編輯sshd_config

 

  ####by jeacen###

  Port 52113

  PermitRootLogin no

  PermitEmptyPasswords no

  ####by jeacen###

將以上資訊加入後

:wq儲存:q退出

    #/etc/init.d/sshd restart  //重啟ssh服務,修改資訊生效。

27、

  安全起見,將需要root許可權的使用者名稱加入sudo,可保證root密碼不泄露。

    #visudo

在下面添加需要root使用者名稱

   

  # User privilege specification

  root    ALL=(ALL) ALL

  使用者名稱  ALL=(ALL)ALL

wq:儲存

28、

  修改中文顯示

    #vi /etc/sysconfig/i18n

  LANG="zh_CN.GB18030"

    #source /etc/sysconfig/i18n 生效 

 

本文出自 “jeacen的技術屋” 部落格

聯繫我們

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