Category: ubuntu
script to rotate backups
Delete all files except the ones the first day of the month. root@DiskStation:/volume1/homes/scripts# find /volume1/NetBackup/Servers/MIA/Asterisk/Admin/Cron/ -type f -mtime +7 ! -name ‘*01-*’ -exec rm -rf {} \;
ubuntu: resolve out of memory
Out of memory: Kill process 10356 (mysqld) This happens because the system is out of memory, you should investigate the reason. It is not necessarily a MySQL problem, there may be a memory leak somewhere else that leaves […]
iptables
To have the tables load after reboot sudo apt-get install iptables-persistent Then after you edit the iptables, if you want to update the initial file you should sudo /etc/init.d/iptables-persistent save To enable the log, you need to: iptables -N […]
apache http2: activation on ubuntu 14.04
http/2 is apparently where the web is going on the next generation web data transfer. I’m interested on trying to configure it, to see if that gives me an edge on the SEO side. The process to activate it is […]
crontab: executing java shell commands for example talend
To run talend scripts on you ubuntu box, you need to add the path on your cron otherwise it will not run. You can see the explanation below, obviously need to change the path with your current java path (mine […]
ubuntu: enable password authentication
You need to change the config file for the ssh server and restart the server. alter /etc/ssh/sshd_config: PasswordAuthentication yes then restart the ssh server: /etc/init.d/sshd restart
ubuntu: extract emails from txt file
grep -E -o “[-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]{2,4}” Bounced_Emails.txt > bounced_clean.txt
ubuntu: connect via webservice
First we need to check that there’s a viable connection between the two servers, in my case two ubuntu servers. new SoapClient($wsdl);
ubuntu: how to zip files created on a specific month
I’ve got a couple of gigabytes of files created daily by my Asterisk Server. This files are created on every call (asterisk records all calls) so the memory is full so I would like to create a monthly snapshot of […]