Posts

Lxc - Linux containers

https://en.m.wikipedia.org/wiki/LXC Done configuring Linux lxc. As for now my recommendation is to be used only for in house servers since it is fairly new compared to xen,VMware and other virtulization .

Script to report linux login yesterday

Create a script for yesterday.. yesterday.sh #jmazaredo 4-19-2016 #Get the date month and date cut the necessary date ystd=$(date --date yesterday | cut -d' ' -f2,3) tdy=$(date --date today | cut -d' ' -f2,3) #show the date yesterday Month and date echo ${ystd} #show the date today Month and date echo ${tdy} #grep the date try checking the tdy since you may have no login yesterday last | grep "$tdy" Crontab Entry email it 8 * * * /user/yesterday.sh | mail -s "Last Login Yesterday" me@example.net

cannot start mariadb after update

https://ask.fedoraproject.org/en/question/40736/mariadb-service-dont-start-permission-denied/ you have to give ownership permissions to the  mysql  user of the logging directory/location: do sudo chown mysql : mysql / var / log / mariadb - chR followed by sudo systemctl restart mariadb . service && sudo systemctl status mariadb . service https://ask.fedoraproject.org/en/question/40736/mariadb-service-dont-start-permission-denied/

dos deflate centos7

Kindly check if this work for your dosdeflate ss -ntu | awk '{print $6}' | cut -d: -f1  | sort | uniq -c | sort -nr > $BAD_IP_LIST for comments and fix please post so I can edit

Close all open only ssh port

# Generated by iptables-save v1.4.12 on Wed Dec  7 20:10:49 2011 *filter :INPUT DROP [45:2307] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1571:4260654] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m tcp -s 1xx.xx.xx.xx --dport 22 -j ACCEPT COMMIT # Completed on Wed Dec  7 20:10:49 2011

cacti virtualmin instalaltion

after installing cacti on a virtual host you need to add cronjab to run the poller */5 * * * * cacti2 /usr/bin/php /home/cacti2/public_html/poller.php > /dev/null 2>&1

virtualmin mailman problem

nano /etc/mailman/mm_cfg.py #------------------------------------------------------------- # Default domain for email addresses of newly created MLs DEFAULT_EMAIL_HOST = 'venus.domain.com' #------------------------------------------------------------- # Default host for web interface of newly created MLs DEFAULT_URL_HOST   = 'venus.domain.com' #------------------------------------------------------------- newlist mailman