linux常用命令和经验总结
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 onlysafe 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 workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo= ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable orsubscription-manager repos --disable=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 muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=.skip_if_unavailable=trueCannot 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
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
