Linux(Centos7)環(huán)境下在線或離線安裝wget全過程
一、在線安裝wget
使用以下命令查看是否安裝過wget,如果什么不顯示就說明沒有安裝過
rpm -qa | grep wget
以下為wget安裝命令
sudo yum install -y wget
如果顯示以下內(nèi)容時,說明安裝失敗,國外鏡像源封鎖加強(qiáng),需要更換國內(nèi)鏡像源后才能安裝 點(diǎn)擊更改鏡像源
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的錯誤"
One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
二、離線安裝wget
1、進(jìn)入wget[下載地址],下載wget的rpm安裝包到本地

2、將下載好的wget文件用Xftp或其他上傳軟件將文件上傳至 /opt下

3、運(yùn)行安裝wget包,并查詢是否安裝成功
rpm -ivh /opt/wget-1.14-10.el7.x86_64.rpm


總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
CentOS 7 中firewall-cmd命令詳細(xì)介紹
這篇文章主要介紹了 CentOS 7 中firewall-cmd命令詳細(xì)介紹的相關(guān)資料,這里對CentOS 7的firewall-cmd命令一一介紹,希望能幫助開始使用的朋友,需要的朋友可以參考下2016-11-11
Ubuntu18.04安裝vsftpd的實現(xiàn)代碼
這篇文章主要介紹了Ubuntu18.04安裝vsftpd的實現(xiàn)代碼,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-12-12
詳解Linux下出現(xiàn)permission denied的解決辦法
這篇文章主要介紹了詳解Linux下出現(xiàn)permission denied的解決辦法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-02-02
在CentOS VPS上通過SSH安裝 MySQL的方法圖解
這篇文章主要介紹了在CentOS VPS上通過SSH安裝 MySQL,需要的朋友可以參考下2018-12-12
Apache下開啟SSI配置使html支持include包含的方法
這篇文章主要介紹了Apache下開啟SSI配置使html支持include包含的方法,需要的朋友可以參考下2016-10-10
Linux中openssl/opensslv.h找不到問題的解決方法
最近在安裝scrapy過程中碰到了openssl某個文件找不到的問題,通過查找相關(guān)的資料進(jìn)行了解決,下面這篇文章主要給大家分享了關(guān)于Linux中openssl/opensslv.h找不到問題的解決方法,需要的朋友可以參考借鑒,下面來一起看看吧。2017-07-07

