今天在因為工作的關系,需要用到screen命令,所以就在系統中安裝screen:yum install screen
這下子就報錯了:
Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve
在百度上搜索了一圈,提供的解決方法是:修改配置文件
vim /etc/yum/pluginconf.d/fastestmirror.conf
#enabled=1把這個修改成0
enabled=0
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
vim /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
#plogins=0把這個修改成1
可是,我改了配置文件后還是不行,后面慢慢思索,原來是服務器沒連接到外網。
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=addons error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
配置好DNS vim /ets/resolv.conf
然后 繼續yum,這下子好了。
screen常用到的幾個命令:
screen -S name 創建一個name的session
screen -R name 打開name這個session
screen -ls 列出所有已經存在的session
ctrl + a d退出當前的session