|
|
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 ← 从新启动系统,使设置生效 |