![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Linux自学问题
自学
Outlook(^_^)
越努力,越幸运。细水长流,念念不忘,必有回响。
展开
-
Case_16 touch vim mv cp命令的补充
[root@localhost Desktop]# touch file1 file2 file3[root@localhost Desktop]# lltotal 4drwxr-xr-x. 2 root root 4096 Mar 31 20:27 20220401之前drwxr-xr-x. 2 root root 36 Apr 5 20:28 20220406-rw-r--r--. 1 root root 0 Apr 5 20:29 file1-rw-r--r--. 1 roo原创 2022-04-06 18:20:17 · 1157 阅读 · 0 评论 -
Case_15 gnome-terminal 扩展用法
学习原文:gnome-terminal技巧基本用法常用参数:打开终端后,最大化gnome-terminal --maximize全屏gnome-terminal --full-screen设置标签gnome-terminal --title='happy'打开多个新终端gnome-terminal --window --window # 2个终端打开多个终端,多个tabgnome-terminal --window --tab --window --tab --tab.转载 2022-04-02 10:29:24 · 184 阅读 · 0 评论 -
Case_14 man -k 关键字
学习原文: man -k 关键字 用法 [root@localhost Desktop]# whatis passwdpasswd (5) - password fileopenssl-passwd (1ssl) - compute password hashespasswd (1) - update user's authentication tokens'[root@localhost Desktop]# man -k passwdchgpassw.原创 2022-04-02 09:34:59 · 165 阅读 · 0 评论 -
Case_13 获取本地私有仓库中镜像的方法
获取本地私有仓库中的镜像[root@server61 new]# curl -XGET http://172.25.21.61:5000/v2/_catalog{"repositories":["game2048"]}获取本地私有仓库中镜像的标签[root@server61 new]# curl -XGET http://172.25.21.61:5000/v2/game2048/tags/list{"name":"game2048","tags":["latest"]}参考:How to原创 2021-06-02 14:13:33 · 76 阅读 · 0 评论 -
nginx: [emerg] invalid number of arguments in “rewrite“ directive in /usr/local/nginx/conf/nginx.con
文章目录确认问题问题分析问题定位确认问题实现nginx防盗链,报错[root@lnmp1 conf]# nginx -tnginx: [emerg] invalid number of arguments in "rewrite" directive in /usr/local/nginx/conf/nginx.conf:162nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed问题分析[root@lnm原创 2021-06-02 12:14:50 · 5245 阅读 · 0 评论 -
nginx: [warn] conflicting server name “www.yqq.org“ on 0.0.0.0:80, ignored
实现nginx重定向,出现下述警告:[root@lnmp1 conf]# nginx -s reloadnginx: [warn] conflicting server name "www.yqq.org" on 0.0.0.0:80, ignored原因:www.yqq.org这个域名出现了两次甚至多次,把同一个域名解析到了不同的目录。一般将配置文件单独分离出来容易出现这个错误。重复绑定server name,会出现警告。但这个警告不会影响到服务器运行。而且,这个重复绑定的意思是现在运原创 2021-06-02 11:26:43 · 230 阅读 · 0 评论 -
Case_12 WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled
开机之后,检查docker是否可以正常启动报错:docker infoWARNING: bridge-nf-call-iptables is disabledWARNING: bridge-nf-call-ip6tables is disabled解决方法:修改内核参数[root@server61 ~]# cd /etc/sysctl.d/[root@server61 sysctl.d]# ls99-sysctl.conf[root@server61 sysctl.d]# sysct原创 2021-05-25 10:08:47 · 261 阅读 · 1 评论 -
Case_11 编写检测文件类型脚本
file_check.sh 在执行时,如果脚本后未指定检测文件时,报错:“please input filename!”如果脚本后指定文件不存在时,报错:“filename is not exist”当文件存在时,请检测文件类型并显示到输出中如果脚本后无输入的参数,那么输出警告:please input filename!如果脚本后有输入的参数,那么检测该参数是否真正存在,存在,则继续检测该参数的类型;若不存在,则输出警告:filename is not exist!以下是脚本执行结果原创 2021-05-06 16:25:08 · 102 阅读 · 0 评论 -
ERROR 1010 (HY000): Error dropping database (can‘t rmdir ‘./yao‘, errno: 39 “Directory not empty“)
Case_10 ERROR 1010 (HY000): Error dropping database (can't rmdir './yao', errno: 39 "Directory not empty")首先,出现这个错误的原因:我尝试修改数据库中库的名字,采用暴力的方式,直接在数据目录中,将最初的WESTOS目录名字改成了yao这样错误的方式导致数据损坏该目录yao下存在着mysql数据库不知道的文件,即mysql数据库中没有该文件的数据字典信息。解决方法:手动删除数原创 2021-04-28 20:54:02 · 1334 阅读 · 0 评论 -
Case_10 Nginx出现 403 forbidden 错误
在Nginx的默认发布目录中创建了一个新的子发布目录/usr/local/nginx/html/download,在目录里我添加了 自己的图片 。通过火狐测试,一直报错:403 forbidden之后,我又换了一张别的图片,这时候,测试成功。。。。。我修改了很多次配置文件,都没有用最后,查看了日志,找到了错误的原因。日志一直显示报错:2021/04/08 17:18:11 [error] 3885#0: *23 open() "/usr/local/nginx/html/download/cat.原创 2021-04-08 20:00:38 · 65 阅读 · 0 评论 -
Case_9 KVM创建快照(补充)
原创 2021-03-27 16:33:55 · 50 阅读 · 0 评论 -
Case_8 KVM虚拟机联网(大发)
瞎猫碰上死耗子吧,我不确定这样联网一定对注意!我的真实主机连接了wifi后的IP是192.168.43.173我的网桥设置的是192.168.43.23虚拟机设置的是192.168.43.123虚拟机只有通过网桥才可以和外网连接[root@westos ~]# ifconfigbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.43.23 netmask 255.255.25原创 2021-03-27 15:48:48 · 214 阅读 · 1 评论 -
Case_7 网络文件系统问题积累
树连接失败的原因(??)[root@westoslinux Desktop]# smbclient //172.25.254.123/home -U westosEnter SAMBA\westos's password: tree connect failed: NT_STATUS_BAD_NETWORK_NAME树连接失败:NT\u STATUS\u BAD\u NETWORK\u NAME原因1:没有配置共享系统级别的目录(??)原因2:不是本地用户的家目录(??)全局设置的白名.原创 2021-03-25 18:47:23 · 535 阅读 · 0 评论 -
Case_6 2.4 建立vdo失败,系统提示`ERROR - Not enough available memory in system for index requirement of 256M`
建立vdo失败,系统提示ERROR - Not enough available memory in system for index requirement of 256M[root@westoslinux Desktop]# vdo create --name=westos_vdo1 --device=/dev/vdbCreating VDO westos_vdo1vdo: ERROR - Not enough available memory in system for index requir原创 2021-03-23 09:54:49 · 1431 阅读 · 1 评论 -
Case_5 Apache错误问题积累
在一个目录中不能创建名字相同的目录和文件[root@westoslinux Desktop]# mkdir /var/www/html/westosmkdir: cannot create directory ‘/var/www/html/westos’: File exists问题:编写了httpd的子配置文件/etc/httpd/conf.d/vhost.conf,/etc/hosts文件,最后测试:Firefox:www.westos.org不成功,显示的依旧是测试页,之前写的/va.原创 2021-03-17 20:36:43 · 56 阅读 · 0 评论 -
Case_4 Vsftpd服务问题积累
当把相同的用户写入/etc/vsftpd/ftpusers和/etc/vsftpd/user_list(此时,user-list是黑名单)时,vsftpd服务都会禁止该用户登陆。但是,禁止登陆的提示是不同的。[root@localhost vsftpd]# lftp 192.168.0.18 -u westosPassword: lftp westos@192.168.0.18:~> ls ls: Login failed: 530 Login inco.原创 2021-03-04 21:42:31 · 52 阅读 · 1 评论 -
Case_3 Linux网络配置中的错误积累
错误提示以及常见问题如下Network is unreachablenmcli device connect ens160'ens160' is not an active connectionnmcli connection down up ens160 问题二次修改网络配置文件后,没有down up 网卡Network is unreachable网络不可达[root@localhost Desktop]# ping 192.168.0.25connect: Network is unreach原创 2021-02-23 18:56:53 · 2577 阅读 · 0 评论 -
Case 1——碎知识
在Linux中进行C开发,可以使用vimvim hello.c : C文件编辑过程gcc hello.c : C文件编译过程命令 gcc -o hello.c : 把编译的结果放在指定的文件内。若没有“ -o”,会生成 a.out 文件( ./a.out 可以运行文件)企业一般不会采用图形界面,这样会有额外的开销,对CPU的需求也会增大。企业使用命令行进行操作。Windows ——> 个人电脑,内存不够,我们可以自行购买扩容。Linux ——> 使用命令行操作,.原创 2020-12-02 16:58:00 · 617 阅读 · 0 评论 -
Case2_用户和用户组管理(杂)
/etc/nologin 文件引起普通用户无法登录/etc/nologin文件给系统管理人员提供了一种在Linux系统维护期间禁止用户登陆的方法。为了提高系统的安全性和防止数据不同步的现象,系统管理人员在对系统进行维护时,通常建立0字节的/etc/nologin文件,如果存在/etc/nologin文件,非root用户的登陆尝试将失败。touch /etc/nologin这种保护机制也被应用到系统的关机,重启等环节中。通常系统在关闭时,自动创建/etc/nologin文件,禁止所有用户.原创 2021-02-11 11:46:26 · 131 阅读 · 3 评论