随笔分类 - linux
摘要:block容量的大小直接关系到文件系统存储使用是否合理的问题; 因为每个block只能供一个文件使用,所以如果Linux系统的block容量太大,但系统经常存储的都是小文件那么会很浪费系统磁盘; 但如果block容量太小,那么会导致文件系统中inode记录过多的block编号,这样就又会导致读取效能
阅读全文
posted @ 2019-09-23 18:27
lishidefengchen
摘要:0、买服务 1、安装GIT 2、下载ss脚本 3、运行 4、开启bbr 5、重启reboot 6、验证 附:IP被封情况查询地址:http://t.cn/Ai9IymoR (完)
阅读全文
posted @ 2019-09-18 15:59
lishidefengchen
摘要:新建文件docker-clear-log,放在/usr/local/bin/目录下,文件内容如下: 赋予文件相应的权限,我仅仅给了它所有者读写执行的权限,其他人无权限执行: 最后,执行 即可清空相应容器的日志内容。 原文:https://www.axllent.org/docs/view/clear
阅读全文
posted @ 2019-09-12 10:44
lishidefengchen
摘要:文件权限共10个字符,第一个字符表示该文件是【文件夹】或【文件】——如果是字符“d"则表示该文件是文件夹;如果是字符“-”则表示是文件。 后九个字符,三个一组,共三组,分别表示【所有者权限】、【所属组权限】、【其他人的权限】,固定位置固定字符 rwx,分别表示为:r-读取;w-写入;x-执行。对应的
阅读全文
posted @ 2019-09-11 10:11
lishidefengchen
摘要:more的源码量大约2000行; less的源码量大约27000行; more历史比less久; less功能比more多; 其实本质没啥太大区别,都是为了查看文件方便。 (完)
阅读全文
posted @ 2019-09-10 14:39
lishidefengchen
摘要:从日志可以看到,SELinux的Mode已经修改位了permissive = 1,也就是允许模式,但它前面的日志仍然显示的是“denied"。本来我还以为是自己哪里没弄好导致的这个问题,但访问了Gentoo wiki上面的介绍后才知道,它就是这样设计的。 资源: https://wiki.gento
阅读全文
posted @ 2019-09-03 11:38
lishidefengchen
摘要:参考:https://www.jianshu.com/p/b1f573ca50c7 跟着做到,配置nginx访问dotnet core网站时,报错了。 错误如下所示—— 查看nginx的错误日志: cat /var/log/nginx/error.log | more 再查看系统的nginx相关的审
阅读全文
posted @ 2019-09-02 16:35
lishidefengchen
摘要:CentOS升级到7之后用firewall代替了iptables来设置Linux端口, 下面是具体的设置方法: []:选填 <>:必填 [<zone>]:作用域(block、dmz、drop、external、home、internal、public、trusted、work) <port>:端口号
阅读全文
posted @ 2019-09-02 14:40
lishidefengchen
摘要:$lsb_release -a #Ubuntu下执行 Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial $cat /etc/redhat-release #CentOS下执行
阅读全文
posted @ 2019-09-02 09:59
lishidefengchen
摘要:查看时区是否正确,命令date -R; 不正确先调整时区,命令tzselect; 安装ntp,命令yum install ntp; 同步时间,命令ntpdate cn.pool.ntp.org; 设置自动同步时间,参考:https://www.cnblogs.com/chenmh/p/5485829
阅读全文
posted @ 2019-08-31 14:16
lishidefengchen
摘要:vi /etc/modprobe.d/blacklist.conf 输入:blacklist i2c_piix4 保存退出::wq 重启:reboot (完)
阅读全文
posted @ 2019-08-27 15:02
lishidefengchen
摘要:需要删除多余内核 yum list kernel.x86_64 出现多个 执行yum remove kernel-3.10.0-957.10.1.e17.x86_64,会提示找不到对应的包 我也不知道是什么原因…… 索性直接执行删除操作,发现还挺智能,系统会跳过当前正在使用的内核,这样就不用我们一个
阅读全文
posted @ 2019-08-27 14:37
lishidefengchen
摘要:Red Hat: http://www.redhat.com SuSE: https://www.suse.com Fedora: https://getfedora.org/ CentOS: http://www.centos.org/ Debian: http://www.debian.org/
阅读全文
posted @ 2019-08-09 14:08
lishidefengchen
摘要:好东西就要多用,vi/vim越用越喜欢了。 删除多行怎么办呢? 命令输入“:32,65d”,回车键,32-65行就被删除了。
阅读全文
posted @ 2019-05-06 10:18
lishidefengchen
摘要:用正则表达式去匹配即可, scp *.tar root@11.11.11.12:/root/ 拷贝当前目录下的所有tar类型的文件到服务器上
阅读全文
posted @ 2019-04-15 11:59
lishidefengchen

浙公网安备 33010602011771号