87.yum源更新

发表于 linux 分类,标签:
先备份之前yum源,并清空目录cd/etc/yum.repos.d/下载阿里yum源wgethttp://mirrors.aliyun.com/repo/Centos-7.repo修改yum源链接vim /etc/yum.repos.d/Centos-7.repo替换$releasever为7:%s/$releasever/7/g清除缓存并重新生成缓存yumcleanall &&yummakecache...

86.kvm的yum安装

发表于 linux 分类,标签:
1.检查cpu是否支持虚拟化如果有vmx信息输出,就说明支持vt,如果没有任何的输出,说明你的cpu不支持,将无法使用kvm虚拟机grepvmx/proc/cpuinfo2.确保bios里开启了虚拟化功能查看是否加载kvm模块lsmod|grepkvm如果没有加载modprobekvmmodprobekvm-intel3.配置网络(1)桥接网络如果没有brctl命令(用来管理网桥的工具),则需要安装bridge-utilsyum-yinstallbridge-utils重启systemctlrestartnetwork(2)配置KVM的网桥模式cd/etc/sysconfig/network-scripts/cpifcfg-ens33ifcfg-br0修改新网卡vim/etc/sysconfig/network-scripts/ifcfg-br0##修改为...

85.开机报Entering emergenc mode

发表于 linux 分类,标签:
1.问题:开机提示Enteringemergencmode.Exittheshelltocontinue.2.解决办法:xfs_repair-v-L/dev/dm-0如果输入xfs_repair-v-L/dev/dm-0,报nosuchfileordirectionary的错误,是没有这个设备。输入journalctl,翻到最后一页,查看红色地方XFS()是什么。例如如果是XFS(3),那么就将命令对应的文件改为xfs_repair-v-L/dev/sda3即可。3.原因分析:因未关机直接断电导致该问题;强制删除日志,不会删除文件,重启即可。...

84.修改qcow2镜像密码

发表于 linux 分类,标签:
修改qcow2镜像密码1、安装libvirtd#Ubuntu$aptinstall-yqemu-kvmlibvirt-binbridge-utilsvirt-manager#CentOS$yuminstall-yqemu-kvmlibvirtvirt-installbridge-utils2、启动libvirtd服务systemctlstartlibvirtd3、生成密码[root@192home]#opensslpasswd-1123456$1$Nnv2QHyN$qu2bZyh7ef7xQJZnRtDSJ4、加载qcow2文件[root@192system]#guestfish--rw-aCentOS-7-x86_64-GenericCloud-1805.qcow2Welcometoguestfish,th...

83.inotifywait基本使用

发表于 linux 分类,标签:
https://blog.csdn.net/qq_37788558/article/details/104985262开始之前需要检测系统内核是否支持inotify方式一:使用uname-r命令检查Linux内核,如果低于2.6.13,就需要重新编译内核加入inotify的支持。方式二:使用ll/proc/sys/fs/inotify命令,是否有以下三条信息输出,如果没有表示不支持。-rw-r--r--1rootroot0Mar1615:43max_queued_events-rw-r--r--1rootroot0Mar1615:43max_user_instances-rw-r--r--1rootroot0Mar1615:43max_user_watchesyum安装$yumsearchinotify-tools$yumi...

82.error while loading shared libraries: libmcrypt.so.4

发表于 linux 分类,标签:
报错/usr/local/php/sbin/php-fpm:errorwhileloadingsharedlibraries:libmcrypt.so.4:cannotopensharedobjectfile:Nosuchfileordirectory解决方案yum-yinstalllibmcrypt————————————————版权声明:本文为CSDN博主「南柯一梦,笑谈浮生」的原创文章,遵循CC4.0BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/weixin_45537987/article/details/107451058...

81.error while loading shared libraries: libiconv.so.2

发表于 linux 分类,标签:
问题分析:应用运行时找不到需要的动态链接库libiconv.so.2,一般是文件不存在或者存在但是找不到两种情况解决方案:这时首先确认自己的系统中是否存在这个动态链接库sudofind/-namelibiconv.so.2如果找不到文件路径,请安装libiconvsudoyuminstalllibiconv或者使用源码安装,可以参考文章https://qiita.com/mist_dev/items/be3e0a1b9fc26ca4ce70如果找到libiconv.so.2文件路径,可以将此文件添加到ld.so.conf最上面sudovim/etc/ld.so.conf然后运行ldconfig文件sudo/sbin/ldconfig————————————————版权声明:本文为CSDN博主「孙雪峰」的原创文章,遵循CC4.0BY-SA版权协议,转载请附上原文出处链...

80.nginx文件存储

发表于 linux 分类,标签:
yuminstall-yhttpd-toolshtpasswd-cb/etc/nginx/htpasswdmynginx123456auth_basic"Pleaseentertheusernameandpassword";#这里是验证时的提示信息auth_basic_user_file/etc/nginx/htpasswd;location/{  if($request_filename~*^.*?\.(txt|pdf|doc|xls)$){  add_headerContent-Disposition:'attachment;';}  auth_basic"Pleaseentertheusernameandpa...

79.Error contacting service. It is probably not running.

发表于 linux 分类,标签:
zookeeper.out日志提示:ERROR[main:QuorumPeer@453]-Unabletoloaddatabaseondisk解决办法:删除/home/hadoop/data/zookeeper/zkdata/version-2目录原因:可能是先关闭了follower,关闭leader时出现选举问题,导致该故障发生...

78.修改docker目录

发表于 linux 分类,标签:
1)、停掉docker服务[root@localhost~]#systemctlstopdocker2)、修改配置文件[root@localhost~]#mkdir/data[root@localhost~]#vim/usr/lib/systemd/system/docker.service#找到ExecStart=/usr/bin/dockerd部分所在的行,行尾增加参数--data-rootExecStart=/usr/bin/dockerd-Hfd://--containerd=/run/containerd/containerd.sock--data-root=/data/docker3)、重启docker[root@localhost~]#systemctldaemon-reload[root@localhost~]#mv/var/lib/docke...