CentOS7装Chrome

 

 

 

不折腾会死:CentOS7装Chrome

 

 6.2k 次阅读  ·  读完需要 4 分钟

0

由于Chrome官网没有支持CentOS的版本下载,因此我折腾了一番才安装到Chrome,在此记录下笔记。

我的目标是:使用普通用户安装Chrome。,我的用户名是cai

解决XXX is not in the sudoers file

在使用sudo命令过程中出现cai is not in the sudoers file. This incident will be reported.的错误提示,意思就是我的cai用户名没有sudo权限。因此需要添加权限:

1) su root,然后输密码切换到超级用户
2) chmod u+w /etc/sudoers。添加写权限。u:所有者,+:添加,w:写权限
3) vi /etc/sudoers,按i进入编辑模式,找到以下的部分,并添加以下内容:

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
cai     ALL=(ALL)       ALL //添加

Esc退出编辑模式,按:进入命令模式,输入wq(w: write; q: quit)退出vi编辑工具。

4) chmod u-w /etc/sudoers。去除写权限。u:所有者,-:去除,w:写权限
5) su cai,切换回普通用户cai

添加安装chrome的yum源

1) sudo vi /etc/yum.repos.d/google-chrome.repo。新建一个yum源文件,如果提示输入用户密码则输入密码。

2) 按i进入编辑模式,输入或复制以下内容:

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

3) 按Esc退出编辑模式,按:进入命令模式,输入wq退出vi编辑工具。

4) sudo yum -y install google-chrome-stable --nogpgcheck 执行安装,等待完成即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值