|
|
CentOS release 4.4 (Final) Kernel 2.6.9-42.EL on an i686 sample login: ← 根據安裝時網絡設置的狀況的不一樣,本站以「sample」,其位置顯示的是你設置好的主機名。 |
sample login: root ← 用root用戶來登陸系統,輸入用戶名root Password: ← 在這裏輸入安裝時設置的root密碼,輸入時密碼不會被顯示 [root@sample ~]# ← root用戶登陸成功,提示符爲「#」。若通常用戶登陸成功後,提示符爲「$」 [root@sample ~]# exit ← 退出系統 sample login: ← 退出系統成功 |
[root@sample ~]# useradd centospub ← 創建用戶名爲 centospub 的通常用戶 [root@sample ~]# passwd centospub ← 爲用戶 centospub 設置密碼 Changing password for user centospub. New UNIX password: ← 輸入密碼(密碼不會被顯示) Retype new UNIX password: ← 再次輸入密碼確認兩次密碼一致 passwd: all authentication tokens updated successfully. ← 密碼設置成功 [root@sample ~]# userdel -r centospub ← 刪除用戶名爲 centospub 的通常用戶 |
[centospub@sample ~]$ ← 提示符爲「$」,說明當前狀態爲通常用戶centospub登陸在系統中 [centospub@sample ~]$ su - ← 輸入登陸爲root用戶的命令 Password: ← 輸入root密碼(密碼不會被顯示),回車 [root@sample ~]# ← 成功登陸爲root用戶,提示符變爲「#」 [root@sample ~]# exit ← 回到通常用戶的登陸狀態 [centospub@sample ~]$ ← 提示符變爲「$」,回到了通常用戶centospub登陸系統的狀態 |
[root@sample ~]# usermod -G wheel centospub ← 將通常用戶 centospub 加在管理員組wheel組中 [root@sample ~]# vi /etc/pam.d/su ← 打開這個配置文件 #auth required /lib/security/$ISA/pam_wheel.so use_uid ← 找到此行,去掉行首的「#」 ↓ auth required /lib/security/$ISA/pam_wheel.so use_uid ← 變爲此狀態(大約在第6行的位置) [root@sample ~]# echo "SU_WHEEL_ONLY yes" >> /etc/login.defs ← 添加語句到行末 |
[root@sample ~]# adsl-setup ← 創建ADSL鏈接 Welcome to the ADSL client setup. First, I will run some checks on LOGIN NAME 數據庫 Enter your Login Name (default root): ← 填入ADSL鏈接的用戶名 centos INTERFACE 安全 Enter the Ethernet interface connected to the ADSL modem Do you want the link to come up on demand, or stay up continuously? DNS ide Please enter the IP address of your ISP's primary DNS server. PASSWORD oop Please enter your Password: ← 輸入ADSL的鏈接密碼 USERCTRL Please enter 'yes' (two letters, lower-case.) if you want to allow FIREWALLING Please choose the firewall rules to use. Note that these rules are The firewall choices are: Start this connection at boot time Do you want to start this connection at boot time? ** Summary of what you entered ** Ethernet Interface: eth0 ? Congratulations, it should be all set up! Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0' |
[root@sample ~]# adsl-start ← 啓動ADSL鏈接 [root@sample ~]# ← 稍等片刻後若啓動成功後出現提示符(無任何提示即意味着鏈接成功) |
[root@sample ~]# vi /etc/aliases ← 編輯aliases,添加以下行到文尾 root: yourname@yourserver.com ← 加入本身的郵箱地址 [root@sample ~]# newaliases ← 重建aliasesdb /etc/aliases: 79 aliases, longest 19 bytes, 825 bytes total [root@sample ~]# echo test | mail root ← 發送測試郵件給root |
[root@sample ~]# vi /etc/updatedb.conf ← 編輯locate數據庫更新配置文件 DAILY_UPDATE=no ← 找到這一行,將「no」改成「yes」 ↓ DAILY_UPDATE=yes ← 變爲此狀態後,保存、退出 [root@sample ~]# updatedb ← 運行locate數據庫更新命令,稍等片刻…更新成功後出現提示符 |
[root@sample ~]# vi /etc/yum.repos.d/dag.repo ← 創建dag.repo,定義非官方庫 [dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1 [root@sample ~]# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt ← 導入非官方庫的GPG |
[root@sample ~]# /etc/rc.d/init.d/cups stop ← 中止打印服務 Stopping cups: [ OK ] ← 中止服務成功,出現「OK」 [root@sample ~]# chkconfig cups off ← 禁止打印服務自動啓動 [root@sample ~]# chkconfig --list cups ← 確認打印服務自啓動設置狀態 cups 0:off 1:off 2:off 3:off 4:off 5:off 6:off ← 0-6都爲off的狀態就OK(當前打印服務自啓動被禁止中) |
[root@sample ~]# ifconfig -a ← 列出所有網絡接口信息 eth0 Link encap:Ethernet HWaddr 00:0C:29:B6:16:A3 inet addr:192.168.0.13 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:feb6:16a3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:84 errors:0 dropped:0 overruns:0 frame:0 TX packets:93 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:10288 (10.0 KiB) TX bytes:9337 (9.1 KiB) Interrupt:185 Base address:0x1400 lo Link encap:Local Loopback NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
[root@sample ~]# vi /etc/modprobe.conf ← 修改相應配置文件,添加以下行到文尾: alias net-pf-10 off alias ipv6 off [root@sample ~]# shutdown -r now ← 從新啓動系統,使設置生效 |