centos安装软件【google浏览器,QQ】【拷贝旧的文件源作为备份】【软件源更换为清华源】

centos7.8(2003)安装google浏览器【2020-8-26】

在这里插入图片描述

用linux自带浏览器打开google网站 自动识别当前系统的安装版本
https://www.google.cn/chrome/
下载好你需要的浏览器
在这里插入图片描述

在安装浏览器之前需更换安装清华源的包
https://mirror.tuna.tsinghua.edu.cn/help/centos/
在这里插入图片描述为什么要更换软件源呢?因为国内不支持外网,在尝试清华源之前是因为用了阿里云的软件源 ,但是崩溃了。所以用清华源的。
备份好之前的文件源文件
在命令行前面加 sudo 权限

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

然后打开文件进行修改

[dalaojun@localhost ~]$ cd /etc/yum.repos.d
[dalaojun@localhost yum.repos.d]$ ls
CentOS-Base.repo      CentOS-Debuginfo.repo  CentOS-Sources.repo
CentOS-Base.repo.bak  CentOS-fasttrack.repo  CentOS-Vault.repo
CentOS-CR.repo        CentOS-Media.repo      CentOS-x86_64-kernel.repo
[dalaojun@localhost yum.repos.d]$ sudo vim CentOS-Base.repo
[sudo] dalaojun 的密码:

进入vim 修改该文件 按 i 进入编辑模式
把当前文件的文本都删除了(有快捷键)
把清华源的文字复制进去

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#


[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7



#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7



#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7

然后保存退出 (按ESC键退出编辑模式 自动跳转到文件最下方输入:wq! 这是保存退出,注意这里加了!号
并且执行使用代码 更新软件包缓存

sudo yum makecache

执行后就可以安装google浏览器了

 sudo yum makecache
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
base                                                     | 3.6 kB     00:00     
extras                                                   | 2.9 kB     00:00     
updates                                                  | 2.9 kB     00:00     
(1/4): extras/7/x86_64/other_db                            | 124 kB   00:00     
(2/4): extras/7/x86_64/filelists_db                        | 217 kB   00:16     
(3/4): base/7/x86_64/other_db                              | 2.6 MB   00:20     
(4/4): base/7/x86_64/filelists_db                          | 7.1 MB   00:21     
元数据缓存已建立
[dalaojun@localhost yum.repos.d]$

安装相关的包/插件

[dalaojun@localhost yum.repos.d]$ sudo yum install lsb
[dalaojun@localhost yum.repos.d]$ sudo yum install libXScrnSaver

进入到下载的文件夹中
桌面的主目录位置是cd /home/dalaojun/ chrome
dalaojun是我的用户名,更换为你的用户名就好
文件夹chrome是我新建文件目录,把在浏览器中下载的文件拖拽进去这里了,方便思路清晰
然后输入代码安装

[dalaojun@localhost chrome]$ sudo yum localinstall google-chrome-stable_current_x86_64.rpm 
[dalaojun@localhost chrome]$ sudo yum localinstall google-chrome-stable_current_x86_64.rpm 
已加载插件:fastestmirror, langpacks
正在检查 google-chrome-stable_current_x86_64.rpm: google-chrome-stable-84.0.4147.135-1.x86_64
google-chrome-stable_current_x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 google-chrome-stable.x86_64.0.84.0.4147.135-1 将被 安装
--> 正在处理依赖关系 liberation-fonts,它被软件包 google-chrome-stable-84.0.4147.135-1.x86_64 需要
Loading mirror speeds from cached hostfile
--> 正在处理依赖关系 libappindicator3.so.1()(64bit),它被软件包 google-chrome-stable-84.0.4147.135-1.x86_64 需要
--> 正在处理依赖关系 libvulkan.so.1()(64bit),它被软件包 google-chrome-stable-84.0.4147.135-1.x86_64 需要
--> 正在检查事务
---> 软件包 libappindicator-gtk3.x86_64.0.12.10.0-13.el7 将被 安装
--> 正在处理依赖关系 libindicator3.so.7()(64bit),它被软件包 libappindicator-gtk3-12.10.0-13.el7.x86_64 需要
--> 正在处理依赖关系 libdbusmenu-gtk3.so.4()(64bit),它被软件包 libappindicator-gtk3-12.10.0-13.el7.x86_64 需要
--> 正在处理依赖关系 libdbusmenu-glib.so.4()(64bit),它被软件包 libappindicator-gtk3-12.10.0-13.el7.x86_64 需要
---> 软件包 liberation-fonts.noarch.1.1.07.2-16.el7 将被 安装
--> 正在处理依赖关系 liberation-narrow-fonts = 1:1.07.2-16.el7,它被软件包 1:liberation-fonts-1.07.2-16.el7.noarch 需要
---> 软件包 vulkan.x86_64.0.1.1.97.0-1.el7 将被 安装
--> 正在处理依赖关系 vulkan-filesystem = 1.1.97.0-1.el7,它被软件包 vulkan-1.1.97.0-1.el7.x86_64 需要
--> 正在检查事务
---> 软件包 libdbusmenu.x86_64.0.16.04.0-4.el7 将被 安装
---> 软件包 libdbusmenu-gtk3.x86_64.0.16.04.0-4.el7 将被 安装
---> 软件包 liberation-narrow-fonts.noarch.1.1.07.2-16.el7 将被 安装
---> 软件包 libindicator-gtk3.x86_64.0.12.10.1-6.el7 将被 安装
---> 软件包 vulkan-filesystem.noarch.0.1.1.97.0-1.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================
 Package                 架构   版本            源                         大小
================================================================================
正在安装:
 google-chrome-stable    x86_64 84.0.4147.135-1 /google-chrome-stable_current_x86_64
                                                                          223 M
为依赖而安装:
 libappindicator-gtk3    x86_64 12.10.0-13.el7  base                       37 k
 libdbusmenu             x86_64 16.04.0-4.el7   base                      132 k
 libdbusmenu-gtk3        x86_64 16.04.0-4.el7   base                       34 k
 liberation-fonts        noarch 1:1.07.2-16.el7 base                       13 k
 liberation-narrow-fonts noarch 1:1.07.2-16.el7 base                      202 k
 libindicator-gtk3       x86_64 12.10.1-6.el7   base                       63 k
 vulkan                  x86_64 1.1.97.0-1.el7  base                      3.6 M
 vulkan-filesystem       noarch 1.1.97.0-1.el7  base                      6.3 k

事务概要
================================================================================
安装  1 软件包 (+8 依赖软件包)

总计:227 M
总下载量:341 k
安装大小:246 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/3): libdbusmenu-16.04.0-4.el7.x86_64.rpm                | 132 kB   00:00     
(2/3): vulkan-filesystem-1.1.97.0-1.el7.noarch.rpm         | 6.3 kB   00:00     
(3/3): liberation-narrow-fonts-1.07.2-16.el7.noarch.rpm    | 202 kB   00:15     
--------------------------------------------------------------------------------
总计                                                22 kB/s | 341 kB  00:15     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : libdbusmenu-16.04.0-4.el7.x86_64                            1/9 
  正在安装    : libdbusmenu-gtk3-16.04.0-4.el7.x86_64                       2/9 
  正在安装    : vulkan-filesystem-1.1.97.0-1.el7.noarch                     3/9 
  正在安装    : vulkan-1.1.97.0-1.el7.x86_64                                4/9 
  正在安装    : 1:liberation-narrow-fonts-1.07.2-16.el7.noarch              5/9 
  正在安装    : 1:liberation-fonts-1.07.2-16.el7.noarch                     6/9 
  正在安装    : libindicator-gtk3-12.10.1-6.el7.x86_64                      7/9 
  正在安装    : libappindicator-gtk3-12.10.0-13.el7.x86_64                  8/9 
  正在安装    : google-chrome-stable-84.0.4147.135-1.x86_64                 9/9 
Redirecting to /bin/systemctl start atd.service
  验证中      : vulkan-1.1.97.0-1.el7.x86_64                                1/9 
  验证中      : google-chrome-stable-84.0.4147.135-1.x86_64                 2/9 
  验证中      : 1:liberation-fonts-1.07.2-16.el7.noarch                     3/9 
  验证中      : libappindicator-gtk3-12.10.0-13.el7.x86_64                  4/9 
  验证中      : libindicator-gtk3-12.10.1-6.el7.x86_64                      5/9 
  验证中      : libdbusmenu-gtk3-16.04.0-4.el7.x86_64                       6/9 
  验证中      : 1:liberation-narrow-fonts-1.07.2-16.el7.noarch              7/9 
  验证中      : libdbusmenu-16.04.0-4.el7.x86_64                            8/9 
  验证中      : vulkan-filesystem-1.1.97.0-1.el7.noarch                     9/9 

已安装:
  google-chrome-stable.x86_64 0:84.0.4147.135-1                                 

作为依赖被安装:
  libappindicator-gtk3.x86_64 0:12.10.0-13.el7                                  
  libdbusmenu.x86_64 0:16.04.0-4.el7                                            
  libdbusmenu-gtk3.x86_64 0:16.04.0-4.el7                                       
  liberation-fonts.noarch 1:1.07.2-16.el7                                       
  liberation-narrow-fonts.noarch 1:1.07.2-16.el7                                
  libindicator-gtk3.x86_64 0:12.10.1-6.el7                                      
  vulkan.x86_64 0:1.1.97.0-1.el7                                                
  vulkan-filesystem.noarch 0:1.1.97.0-1.el7                                     

完毕!
[dalaojun@localhost chrome]$ ^C

安装好的浏览器在
在这里插入图片描述

看完这篇文章,那么你就可安装QQ了
QQ的地址是
https://im.qq.com/linuxqq/download.html
选择rpm在这里插入图片描述
打开一个新的终端
输入sudo yum localinstall 再打开下载好的文件夹 鼠标拖拽进来终端 就可以安装了

[dalaojun@localhost ~]$ sudo yum localinstall '/home/dalaojun/下载/linuxqq_2.0.0-b2-1082_x86_64.rpm' 
[sudo] dalaojun 的密码:
已加载插件:fastestmirror, langpacks
正在解决依赖关系
--> 正在检查事务
---> 软件包 linuxqq.x86_64.0.2.0.0-b2 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================
 Package     架构       版本            源                                 大小
================================================================================
正在安装:
 linuxqq     x86_64     2.0.0-b2        /linuxqq_2.0.0-b2-1082_x86_64      35 M

事务概要
================================================================================
安装  1 软件包

总计:35 M
安装大小:35 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : linuxqq-2.0.0-b2.x86_64                                     1/1 
  验证中      : linuxqq-2.0.0-b2.x86_64                                     1/1 

已安装:
  linuxqq.x86_64 0:2.0.0-b2                                                     

完毕!
[dalaojun@localhost ~]$ 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值