linux 安装一站式服务
1.vim: 未找到命令
解决方案(分步骤操作)
- 首先确认是否真的没有安装
which vim || echo "Vim not installed"
- 安装 Vim(使用 yum 包管理器)
sudo yum install vim -y
如果报错:
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>
参考这里: https://www.cnblogs.com/javaxubo/p/18463117
然后重新安装
3. 如果提示没有 sudo 权限
su -   # 切换到root用户
yum install vim -y
- 最小化安装系统可能需要先安装 EPEL 仓库
yum install epel-release -y
yum install vim -y
- 验证安装是否成功
vim --version
2.虚拟机网络配置好以后,直接修改一下数据源
参考地址:  https://www.cnblogs.com/javaxubo/p/18463117
参考文章中的第三点更换数据源(阿里或者其他)。先把这一步做了最好,不然访问下载东西都会报错,原本配置的网站国内是访问不到的。
3.wget: command not found
1.CentOS/RHEL 系列
sudo yum install wget -y
2. 验证安装
安装完成后,运行以下命令测试:
wget --version
正常输出示例:
GNU Wget 1.14 built on linux-gnu. 


 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号