飞道的博客

linux常用命令和经验总结

450人阅读  评论(0)

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命令,但是会出现报错,这是因为没有下载到本地

问题:


  
  1. curl #6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
  2. One of the configured repositories failed (Unknown),
  3. and yum doesn't have enough cached data to continue. At this point the only
  4. safe thing yum can do is fail. There are a few ways to work "fix" this:
  5. 1. Contact the upstream for the repository and get them to fix the problem.
  6. 2. Reconfigure the baseurl/etc. for the repository, to point to a working
  7. upstream. This is most often useful if you are using a newer
  8. distribution release than is supported by the repository ( and the
  9. packages for the previous distribution release still work).
  10. 3. Run the command with the repository temporarily disabled
  11. yum --disablerepo=<repoid> ...
  12. 4. Disable the repository permanently, so yum won 't use it by default. Yum
  13. will then just ignore the repository until you permanently enable it
  14. again or use --enablerepo for temporary usage:
  15. yum-config-manager --disable <repoid>
  16. or
  17. subscription-manager repos --disable=<repoid>
  18. 5. Configure the failing repository to be skipped, if it is unavailable.
  19. Note that yum will try to contact the repo. when it runs most commands,
  20. so will have to try and fail each time (and thus. yum will be be much
  21. slower). If it is a very temporary problem though, this is often a nice
  22. compromise:
  23. yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
  24. 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的时候会出现以下问题


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

解决方案:

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


转载:https://blog.csdn.net/MyxZxd/article/details/109611491
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场