分类: LINUX
2008-10-05 11:01:47
安装完9 后,首先应该是对sudo设置一下,sudo的作用就是使当前非root用户在使用没有权限的命令时,直接在命令前加入sudo,在输入自己当前用户的密码就可以完成root用户的功能,而不必在每次使用su -来回切换用户了。sudo的配置文件位于/etc/sudoers,需要root权限才可以读写。
其实只要简单的一行就可以了:
[weihui@eric ~]$ su -
[root@eric pppoe]# echo “weihui ALL=(ALL) ALL”>> /etc/sudoers
这样己可以了,要想在每次输入的时候不输入当前用户的密码可以这样设置:
[root@eric pppoe]# echo “weihui ALL=(ALL) NOPASSWD:ALL”>> /etc/sudoers
完成后可以试验一下有没有成功:
[weihui@eric ~]$ more /etc/sudoers
/etc/sudoers: 权限不够
[weihui@eric ~]$ sudo more /etc/sudoers
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
……
建议不要使用vi来编辑文件,这样会产生一些无法识别的错误,我在F7下就是直接用vi来编辑的配置文件,结果总是提示有果字符错误,事实上我就是添加来一行,但是错误一直提示存在,郁闷了好长时间。
yum的设置:
源 配置
# mkdir ~/repo.bak
# mv /etc/yum.repos.d/* ~/repo.bak
========================Part I: Beijing Ke Ji Da Xue ===========================
下面,以root权限创建、编辑 /etc/yum.repos.d/beike.repo
[updates-beike]
name=Fedora updates
baseurl=ftp://202.204.60.11/pub/fedora/9/updates/
enabled=1
gpgcheck=0
[fedora-beike]
name=Fedora $releasever - $basearch
baseurl=ftp://202.204.60.11/pub/fedora/9/Everything/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
And then save this file.
==================================Part II:北邮的源=============================
北邮的Fedora服务器,
/etc/yum.repos.d文件夹下建立bupt.repo,写入:
[Fedora-bupt]
name=Fedora $releasever - $basearch
baseurl=ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/releases/$releasever/Fedora/$basearch/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-bupt]
name=Everything $releasever - $basearch
baseurl=ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/releases/$releasever/Everything/$basearch/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-bupt]
name=Fedora updates
baseurl=ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/updates/$releasever/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Development-bupt]
name=Fedora Development
baseurl=ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/development/$basearch/
enabled=0
gpgcheck=0
保存文件。
=================Part III SJTU sources========================
#gedit /etc/yum.repo.d/sjtu.repo
[Fedora-sjtu]
name=Fedora 9 - i386
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/releases/9/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-sjtu]
name=Everything 9 - i386
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-sjtu]
name=Fedora updates
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/updates/9/i386/
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
And then save this file.
更新yum的缓存。
# yum makecache
有时上述教育网源中没有一些支持多媒体的包,这时候我们要添加一些非官方源,其中以livna 源和freshrpms 源最大家所熟知。
1、 Livna
#rpm -ivh
#rpm -import
2、freshrpms
#rpm -ivh
#rpm -import
任选其一即可。同时选可能发生冲突!
sjtu我试过总是有问题,加上我是bupt的,所有就只用了bupt和beike的了