centos7 : inotify inotifywait convmv Hint

# yum install inotify # yum install convmv test.sh --------------------------- #!/bin/sh # /root/bin/inotifywaitWP.sh /home/*/*/wordpress/wp-content/uploads EVENTS="CREATE,MOVED_TO" if [ -z "$1" ]; then     echo "Usage: $0 cmd ..."     exit -1; fi inotifywait -e "$EVENTS" -mrq --format '%w%f' $1 | (         while read FILE;         do   […]

Read More

Centos7 : apache MPM Hint

# httpd -V | grep MPM Server MPM:     prefork CentOS provide 3 way modules, need to select only one. prefork => default worker event Change prefork to worker # vi /etc/httpd/conf.modules.d/00-mpm.conf #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so LoadModule mpm_worker_module modules/mod_mpm_worker.so #vi /etc/httpd/conf.modules.d/10-php.conf <IfModule prefork.c>   LoadModule php5_module modules/libphp5.so </IfModule> <IfModule worker.c>   LoadModule php5_module modules/libphp5-zts.so </IfModule> […]

Read More

cenos7 : firewall-cmd, Lockdown, fail2ban-firewalld Hint

masquerade firewall-cmd --zone=external --query-masquerade firewall-cmd --zone=external --add-masquerade external port forward firewall-cmd --zone=external --list-all firewall-cmd --zone=external --add-forward-port=port=22:proto=tcp:toport=2222:toaddr=192.168.0.11 Lockdown # vi /etc/firewalld/firewalld.conf Lockdown=yes # firewall-cmd --reload # firewall-cmd --query-lockdown # firewall-cmd --lockdown-on # firewall-cmd --lockdown-off Block IP # firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.0.41" accept' # firewall-cmd --list-all # firewall-cmd --zone=public --remove-rich-rule='rule family="ipv4" source address="192.168.0.41" accept' # […]

Read More

centos7 : logtop hint

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -ivh epel-release-7-5.noarch.rpm yum install git ncurses-devel uthash-devel git clone https://github.com/JulienPalard/logtop.git cd logtop make make install tail -f /var/log/httpd/access_log | awk {'print $1; fflush();'} | logtop

Read More

centos 7 : format over 4TB Hint

# yum install parted # lsblk fdisk -l /dev/sda Disk /dev/sda: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x4d1b22b4 Device Boot Start End Blocks Id System […]

Read More

named : master-slave notify Hint

master : in zone files masters  ip : 192.168.0.10 2015122601; serial => must changed when zone file edited         IN      NS      ns.owllab.org.         IN      NS      ns1.owllab.org.     slave : in named.conf file # vi /etc/named/named.conf zone "owllab.org" IN {type slave;masters […]

Read More