公司新到了幾臺服務器作Docker集羣方面的應用,將這幾臺服務器搭建成一個集羣。因爲要常常同時操做這幾臺服務器,而我又不喜歡待在機房。TeamViewer很好的解決了該問題,Teamviewer可實現遠程控制電腦,並可在你本身的電腦上同時控制幾臺臺服務器,操做起來至關方便。php
一、進入官網下載軟件包html
二、安裝centos
# yum yum install -y teamviewer_13.0.5693.x86_64.rpm
或者 緩存
# rpm rpm -ivh teamviewer_13.0.5693.x86_64.rpm
三、啓動
默認會安裝到/opt/teamview裏面,而且安裝成功會默認啓動
bash
cd /opt/teamviewer/tv_bin/
進入安裝目錄之後,通常使用的經常使用命令以下:服務器
teamviewer --setup console #設置啓動方式爲控制檯啓動 teamviewer --daemon restart #重啓teamview服務 teamviewer --info #查看teamview信息 teamviewer --passwd [PASSWD] #設置密碼 teamviewer --help #查看幫助
設置固定密碼less
# 用teamviewer --info命令可查看teamview運行狀態 teamviewer --info # 若是沒有設置密碼,TeamViewer ID: 後面會是空的, # 執行命令 teamviewer --passwd 你的密碼 # 再次運行teamviewer --info命令就能夠看到ID了
四、刪除、卸載teamviewer工具
# 以關鍵字查看服務 rpm -q teamviewer
# 卸載rpm -e 查到的程序名 rpm -e teamviewer_13.0.5693.x86_64.rpm
因爲yum能夠自動下載依賴包,而如今依賴包下載不了,這極可能是yum安裝或配置的有問題。固然,簡單粗暴的方式,那就是重裝 yum (安裝源在國內的yum,親測可行的!)。this
但這是剛安裝的最新的CentOS7 原生系統鏡像啊!yum怎麼會出問題呢?並且使用 " rpm -qa|grep yum " 查看,yum 確實已經安裝。url
排查 yum 的配置文件(源必定要換爲國內的源,好比 http://mirrors.163.com/.help/centos.html ),問題的真正根源在於:CentOS-Base.repo配置文件。
在 /etc/yum.repos.d/ 目錄下有個配置yum下載源的文件CentOS-Base.repo。因爲以前沒有設置好相關的配置源,因此不能正常的使用yum工具。
修改以前的 CentOS-Base.repo 文件:
首先備份/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
本文爲博主原創文章,轉載請註明出處!