2019独角兽企业重金招聘Python工程师标准>>>
公司新到了几台服务器做Docker集群方面的应用,将这几台服务器搭建成一个集群。由于要经常同时操作这几台服务器,而我又不喜欢待在机房。TeamViewer很好的解决了该问题,Teamviewer可实现远程控制电脑,并可在你自己的电脑上同时控制几台台服务器,操作起来相当方便。
一、CentOS7命令行安装TeamViewer
1、进入官网下载软件包
2、安装
# yum
yum install -y teamviewer_13.0.5693.x86_64.rpm
或者
# rpm
rpm -ivh teamviewer_13.0.5693.x86_64.rpm
3、启动
默认会安装到/opt/teamview里面,并且安装成功会默认启动
cd /opt/teamviewer/tv_bin/
进入安装目录以后,一般使用的常用命令如下:
teamviewer --setup console #设置启动方式为控制台启动
teamviewer --daemon restart #重启teamview服务
teamviewer --info #查看teamview信息
teamviewer --passwd [PASSWD] #设置密码
teamviewer --help #查看帮助
设置固定密码
# 用teamviewer --info命令可查看teamview运行状态
teamviewer --info
# 如果没有设置密码,TeamViewer ID: 后面会是空的,
# 执行命令 teamviewer --passwd 你的密码
# 再次运行teamviewer --info命令就可以看到ID了
4、删除、卸载teamviewer
# 以关键字查看服务
rpm -q teamviewer
# 卸载rpm -e 查到的程序名
rpm -e teamviewer_13.0.5693.x86_64.rpm
二、CentOS7安装teamviewer遇到依赖包问题
由于yum可以自动下载依赖包,而现在依赖包下载不了,这很可能是yum安装或配置的有问题。当然,简单粗暴的方式,那就是重装 yum (安装源在国内的yum,亲测可行的!)。
但这是刚安装的最新的CentOS7 原生系统镜像啊!yum怎么会出问题呢?而且使用 " rpm -qa|grep yum " 查看,yum 确实已经安装。
排查 yum 的配置文件(源一定要换为国内的源,比如 http://mirrors.163.com/.help/centos.html ),问题的真正根源在于:CentOS-Base.repo配置文件。
在 /etc/yum.repos.d/ 目录下有个配置yum下载源的文件CentOS-Base.repo。由于之前没有设置好相关的配置源,所以不能正常的使用yum工具。
修改之前的 CentOS-Base.repo 文件:
三、CentOS7 原生系统不能从网上yum源中自动下载依赖包的解决方案
首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
CentOS7: http://mirrors.163.com/.help/CentOS7-Base-163.repo
运行以下命令生成缓存
yum clean all
yum makecache
修改以后的 CentOS-Base.repo 文件:
# 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 - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
相关链接
· 官方主页: http://www.centos.org/
· 邮件列表: http://www.centos.org/modules/tinycontent/index.php?id=16
· 论坛: http://www.centos.org/modules/newbb/
· 文档: http://www.centos.org/docs/
· Wiki: http://wiki.centos.org/
· 镜像列表: http://www.centos.org/modules/tinycontent/index.php?id=32
本文为博主原创文章,转载请注明出处!
https://my.oschina.net/u/3375733/blog/