随笔分类 -  Linux

About Linux
redhat防火墙管理
摘要:systemctl status firewalldsystemctl stop firewalldsystemctl start firewalldsystemctl enable firewalldsystemctl disable firewalld查看当前iptables规则iptables 阅读全文

posted @ 2018-07-26 14:52 deodara 阅读(162) 评论(0) 推荐(0)

AFD运维
摘要:1.afd 网址:https://www.dwd.de/AFD/html-en/contents.html 2.问题:拷贝了一个主机A配置后(HOST_CONFIG主机项),修改为另一个主机B配置;然后在DIR_CONFIG中配置主机B的收发项;更新配置后发现收发没有反应,SYTEM_LOG.0日志 阅读全文

posted @ 2018-07-26 11:20 deodara 阅读(3139) 评论(0) 推荐(0)

Remote X11 GUI for Linux/Unix
摘要:摘自:https://www.redwireservices.com/remote-x11-for-linux-unix The Problem One of my most feared questions from end users is “how can I interact with an 阅读全文

posted @ 2018-07-17 10:31 deodara 阅读(1117) 评论(0) 推荐(0)

Returning Values from Bash Functions
摘要:转自:https://www.linuxjournal.com/content/return-values-bash-functions Bash functions, unlike functions in most programming languages do not allow you t 阅读全文

posted @ 2018-06-25 19:34 deodara 阅读(110) 评论(0) 推荐(0)

转载: keepalived工作原理和配置说明
摘要:转自:http://outofmemory.cn/wiki/keepalived-configuration keepalived是什么 keepalived是集群管理中保证集群高可用的一个服务软件,其功能类似于heartbeat,用来防止单点故障。 keepalived工作原理 keepalive 阅读全文

posted @ 2018-05-16 10:45 deodara 阅读(203) 评论(0) 推荐(0)

RedHatEnterpriseLinuxServerRelease7.3上配置vsftpd服务器
摘要:0.vsftpd与ftp安装 1.vsftpd 服务启停相关命令 2.配置文件/etc/vsftpd/vsftpd.conf相关配置选项 a.如果allow_writeable_chroot为NO,ftp登录时出现以下错误。 3. sestatus -b|grep ftp查看SELinux相关boo 阅读全文

posted @ 2018-04-19 15:00 deodara 阅读(394) 评论(0) 推荐(0)

Linux c readdir是非线程安全,需用readdir_r,要注意用静态变量当做返回值的函数的非线程安全性
摘要:readdir函数: struct dirent *readdir(DIR *dirp); The data returned by readdir() may be overwritten by subsequent calls to readdir() for the same director 阅读全文

posted @ 2018-01-19 09:35 deodara 阅读(719) 评论(0) 推荐(0)

Linux下查看进程打开的文件句柄数
摘要:查看系统默认的最大文件句柄数,系统默认是1024 # ulimit -n 1024 查看当前进程打开了多少句柄数 # lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more 131 24204 57 24244 57 24231 ........ 其中 阅读全文

posted @ 2017-02-17 11:29 deodara 阅读(49143) 评论(1) 推荐(1)

linux C 刚初始化后的一个变量在调用一个静态库中函数后被异常修改为乱码
摘要:linux C 中声明并初始化一个变量const char a[512]="test";后,接着调用了一个静态库中的函数函数test(b);,a并没有传入test函数,但在调用这个函数后a的值就改变了,变成了类似于??@????的乱码。 原来是因为静态库头文件包含错误:静态库也是自己写的,在使用时包 阅读全文

posted @ 2016-02-18 15:45 deodara 阅读(352) 评论(0) 推荐(0)

linux shell数组
摘要:from: http://www.jb51.net/article/34322.htmbash shell只支持一维数组,但参数个数没有限制。声明一个数组:declare -a array(其实不用声明,按数组方式直接赋值给变量即可,BASH就知道那是数组)数组赋值:(1) array=(var1 ... 阅读全文

posted @ 2015-04-24 23:56 deodara 阅读(502) 评论(0) 推荐(0)

linux 下 `dirname $0`
摘要:from: http://blog.163.com/wb_zhaoyuwei/blog/static/183075439201181553840490/【`】,学名叫“倒引号”, 如果被“倒引号”括起来, 表示里面需要执行的是命令。比如 `dirname $0`, 就表示需要执行 dirname $... 阅读全文

posted @ 2015-03-02 09:07 deodara 阅读(594) 评论(0) 推荐(0)

Linux下DIR,dirent,stat等结构体详解
摘要:摘自:http://www.liweifan.com/2012/05/13/linux-system-function-files-operation/最近在看Linux下文件操作相关章节,遇到了这么几个结构体,被搞的晕乎乎的,今日有空,仔细研究了一下,受益匪浅。首先说说DIR这一结构体,以下为DI... 阅读全文

posted @ 2015-02-26 14:18 deodara 阅读(837) 评论(0) 推荐(0)

导航