-h 新人求助 怎么安装/配置 sudo

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
linuxFisher
帖子: 15
注册时间: 2009-10-15 10:51

-h 新人求助 怎么安装/配置 sudo

#1

帖子 linuxFisher » 2009-10-15 10:52

环境: 虚拟机安装的centOS

问题: 最基本的sudo命令都不能运行, 输入sudo [enter] 提示command not found

错误: [color=#FF0000]-bash: sudo: command not found [/color]


请问我该怎么安装或者说是配置sudo? 对linux 的配置还处于云里雾里的状态

PS: 在etc目录下面没有看到 sudoers 文件, 我尝试新建一个,并复制网上搜索到的sudoers的内容,还是不行,是不是要进行什么编译之类的
ygf
帖子: 458
注册时间: 2006-11-27 12:25

Re: -h 新人求助 怎么安装/配置 sudo

#2

帖子 ygf » 2009-10-15 11:08

有些发行版不是默认安装sudo的,比如ARCH,要自己在需要的情况下自行安装。CENTOS我不清楚了,估计是没有安装sudo。
小红帽系列的发行版我都没用过,不知道如何安装,但应该是很容易的。
头像
懒蜗牛Gentoo
论坛版主
帖子: 7353
注册时间: 2007-03-02 17:36
系统: Linux Mint

Re: -h 新人求助 怎么安装/配置 sudo

#3

帖子 懒蜗牛Gentoo » 2009-10-15 11:17

你ls /usr/bin/sudo看看有没有,没有就是没装。
虽然世上没有完美的东西,但这并不影响我们追求完美,因为只有偏执狂才TMD能成功。
10.04新手入门——笨兔兔讲述自己的故事
linuxFisher
帖子: 15
注册时间: 2009-10-15 10:51

Re: -h 新人求助 怎么安装/配置 sudo

#4

帖子 linuxFisher » 2009-10-15 12:25

回3楼的兄弟
/usr/bin/ 下面没有sudo ,要怎么安装呢?

我尝试过
yum install sudo

提示如下:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/5/os/i386 ... repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
貌似是找不到镜像文件下载?是需要在那里配置吗?
头像
功夫小狗
帖子: 249
注册时间: 2009-08-13 12:15

Re: -h 新人求助 怎么安装/配置 sudo

#5

帖子 功夫小狗 » 2009-10-15 12:45

linuxFisher 写了:回3楼的兄弟
/usr/bin/ 下面没有sudo ,要怎么安装呢?

我尝试过
yum install sudo

提示如下:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/5/os/i386 ... repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
貌似是找不到镜像文件下载?是需要在那里配置吗?
sudo在ubuntu的官方源就有...

现用root登录,然后再安装sudo,配置sudoers,将你平时使用的那个账户加入
linuxFisher
帖子: 15
注册时间: 2009-10-15 10:51

Re: -h 新人求助 怎么安装/配置 sudo

#6

帖子 linuxFisher » 2009-10-15 13:54

呵呵 刚才已经搞定了
因为centOS 系统不是我自己安装的. 别人帮我配置的YUM的源 难怪更新不到

我在网上随便找了个源就可以更新到了

thanks everyone .
回复