linux常用命令和经验总结

   日期:2020-11-13     浏览:92    评论:0    
核心提示:1、将字体变大Alt+P2、如何将光标由粗线(块)变成竖线在Xshell中,查看属性,然后修改即可。3、linux 在执行这个命令yum -y install vim-enhanced 出现Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile解决方案:4、 当我们刚使用一个新的linux的时候,会有yum命令的使用和wget命令,但是会出现报错,这是因为没有下载到本地问.

1、将字体变大

Alt+P

2、如何将光标由粗线(块)变成竖线

在Xshell中,查看属性,然后修改即可。

3、linux  在执行这个命令yum -y install vim-enhanced 出现

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

解决方案:

4、 当我们刚使用一个新的linux的时候,会有yum命令的使用和wget命令,但是会出现报错,这是因为没有下载到本地

问题:

curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"


 One of the configured repositories failed (Unknown),
 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

解决方案:

vi /etc/resolv.conf

在上面文件中添加下面一行的命令就可以。

nameserver 114.114.114.114

 这是国内的DNS服务器系统,谷歌的可以使用8.8.8.8

修改完成后执行service network restart进行重启,试一下yum update命令,就可以了。

5、

问题;

Error: NetworkManager is not running.

 解决方案:

systemctl restart NetworkManager

 

6、在我们安装mysql的时候会出现以下问题

[root@quzhujianju-ykt-beifen1 mysql]# rpm -ivh mysql-community-server-5.7.24-1.el7.x86_64.rpm
warning: mysql-community-server-5.7.24-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
	perl(Getopt::Long) is needed by mysql-community-server-5.7.24-1.el7.x86_64

解决方案:

这是由于yum安装了旧版本的GPG keys造成的,所以我们只需要在命令的后面加上 --force --nodeps

 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服