不知道為何,我在Redhat官網上都找不到正確的下載點,後來是朋友幫我找到一個很怪的下載點,請到這兒先下載iso檔:http://61.164.110.188:82/Redhat/

安裝時請記的選取桌面模式,不然會裝得好快但是只有command mode喔。當然如果只當server用,不需要用gui介面的話,這樣比較好用,可惜我現在要測的環境是需要gui介面的。我選了內訂值的gnome介面,沒有選KDE,雖然KDE好像比較漂亮一點點,不過真的要漂亮的話,我覺得xfe更好看。

rhel 6.4安裝完後,請先做下列幾件事:

1. 設定ip(如果有裝gui的話,也可以先在gui中設定,比較容易)
    # vi /etc/sysconifg/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
UUID=a63dfaed-da74-463a-9c67-3cb8f2959fb3
ONBOOT=yes     ←一定要是yes喔,不然不會啟動。
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.1.8   ←本張網卡的ip。
PREFIX=24
GATEWAY=192.168.1.1
DNS1=192.168.1.1      ←如果有設resolv.conf,這行不寫沒關係。
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
HWADDR=68:05:CA:43:8F:C4

存檔退出。

 

2. 設定解析。如果在前一個步驟中有設,這兒空白也沒關係,但一般都會設,以防找不到。
    # vi /etc/resolv.conf
nameserver 168.95.1.1
nameserver 8.8.8.8
存檔退出。   

3. # service NetworkManager stop
    # chkconfig NetworkManager off
    # chkconfig network on
因為NetworkManager和network二種service不能同時啟用,會導致網路錯誤,所以請手動擇一即可。

 

4. # service network restart
重新啟用網路設定,應該要全部正確才對,並且可以解析dns。

 

5. 因為rhel的更新是要付錢的,我只好用CentOS來更新了。

# vi /etc/yum.repo.d/Centos.repo

[CentOS6base]       ←請注意,不能有空格!
name=CentOS-6-Base
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[CentOS6updates]       ←請注意,不能有空格!
name=CentOS-6-Updates
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[CentOS5plus]       ←請注意,不能有空格!
name=CentOS-6-Plus
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
 
[centos]       ←請注意,不能有空格!
name=CentOS $releasever - $basearch
baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/
enabled=1
gpgcheck=0
 
存檔退出。
 
# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6      //更新key。
# mv rhel-source.repo rhel-source.repo.bak           //將原本的repo檔先備份起來。
# yum clean all
# yum -y update
........................................

Replaced:
  firefox.x86_64 0:10.0.12-1.el6_3
  libipa_hbac-python.x86_64 0:1.9.2-82.el6
  libsss_autofs.x86_64 0:1.9.2-82.el6
  pytalloc.x86_64 0:2.0.7-2.el6
  xorg-x11-drv-modesetting.x86_64 0:0.5.0-1.el6

Complete!
更新整個系統。如果沒有更換repo檔,yum不能正常使用。

 

6. # cat /etc/*-release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Red Hat Enterprise Linux Server release 6.4 (Santiago)
版本號還是相同的,但之前曾經使用Centos更新過一台rhel 5.x版,更新完變成CentOS 5.11(Final)!?

 

7. 關閉防火牆。
# service iptables stop
# chkconfig iptables off

 

8. mount不同格式的HD:
a. NFS: http://neroli.pixnet.net/blog/post/45003870
b. NTFS: http://neroli.pixnet.net/blog/post/45003630

 

===================以下如果有需要才做=================================================

9. 將shell改成csh,內訂值是用bash。
# chsh
Changing shell for root.
New shell [/bin/bash]: /bin/csh
Shell changed.

 

10. 因為使用上的需要,所以所有使用者的shell都需要改成csh:
# usermod -s /bin/csh username

 

11. 設定XDMCP:http://neroli.pixnet.net/blog/post/44196049

 

12. 加入網域AD:neroli.pixnet.net/blog/post/44988882

arrow
arrow

    貓熊麗麗 發表在 痞客邦 留言(1) 人氣()