純學習用途可以這樣切:
依需要挑選工具包。若只是學習,盡量最小化安裝,在最小化的基礎上補上中文語言支援即可。
vim /etc/sysconfig/network NETWORKING=yes HOSTNAME=larrywen.host.com
再用 hostname 指令立刻生效:
hostname hostname larrywen.host.com hostname
修改完重啟系統或關閉終端再執行hostname,就能看到新名稱。
vi /etc/sysconfig/network-scripts/
區域網路只要設定IPADDR與NETMASK即可。
chkconfig NetworkManager off chkconfig iptables off chkconfig ip6tables off /etc/init.d/iptables stop /etc/init.d/ip6tables stop setenforce 0 # 將SELINUX由enforcing改為permissive
若要永久生效,修改設定檔:
grep "^SELINUX=" /etc/sysconfig/selinux -n 8:SELINUX=permissive
mkdir /iso mount /dev/cdrom /iso cd /iso ll cd /etc/yum.repos.d/ ls cp rhel-source.repo iso.repo
編輯 iso.repo:
[rhel-iso] name=Red Hat Enterprise Linux $releasever - $basearch - Source baseurl=file:///iso enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
測試安裝:
yum install vim man -y
mount在重啟後會失效,想永久生效就寫入 rc.local:
echo "mount /dev/cdrom /iso" >> /etc/rc.local cat /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local mount /dev/cdrom /iso
剩下的就依個人喜好調整,例如啟用中文輸入法、修改終端字型與配色等。