Cloud-init doesn’t work with predictable network names … So In favor of cloud-init automated network set up disable them. In: /etc/default/grub Change to: GRUB_CMDLINE_LINUX=”net.ifnames=0 biosdevname=0″ source
Tag: server
How to install mod_security for Apache
1 |
<strong><span style="font-size: x-large;">Description</span></strong> |
1 2 3 |
BFD is a modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. The regular expressions are parsed against logs using the ‘sed’ tool (stream editor) which allows for excellent performance in all environments. In addition to the benefits of parsing logs in a single stream with sed, BFD also uses a log tracking system so logs are only parsed from the point which they were last read. This greatly assists in extending the performance of BFD even further as we are not constantly reading the same log data. The log tracking system is compatible with syslog/logrotate style log rotations which allows it to detect when rotations have happened and grab log tails from both the new log file and the rotated log file. <span style="font-size: x-large;">Installing on <strong>Ubuntu</strong>/<strong>Debian</strong></span> |
1 2 3 |
sudo apt-get install libxml2 libxml2-dev libxml2-utils sudo apt-get install libaprutil1 libaprutil1-dev sudo apt-get install libapache-mod-security |
regards, @specktator
Cacti installation for monitoring servers and routers
This is done with Ubuntu 12.04 Precise, but, it may be done with othe distros too. First install the required packages:
1 |
sudo apt-get install snmp snmpd apache2 mysql-server mysql-client rrdtool |
Go to /var/www/ download cacti, unpack it and rename it:
1 |
cd /var/www/ && sudo wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz && sudo tar zxvf cacti-0.8.8a.tar.gz && sudo mv cacti-0.8.8a cacti |
Create a database for cacti, a user for the database and insert the cacti tables in it:
1 |
mysqladmin -u root -p create cactidb |
1 |
mysql -u root -p -e "GRANT ALL ON cactidb.* TO 'cacti-admin'@'localhost' IDENTIFIED BY 'yourpassword';" |
1 |
mysql -u root -p cactidb < /var/www/cacti/cacti.sql |
Edit […]
How To solve – ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
Something like: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) Ok this was tough enough to find. :PThree simple things. the number inside parenthesis indicates the error number we want to think about firstly. The number two means that mysql daemon cannot find that file. So, to solve this, try […]
Linux Server Monitoring – Schedule a Command Output to be Sent via Email on Boot
Scheduling a command on boot it’s easy and it can be done with different ways. One, with cronjobs and second, with the rc.local file (/etc/rc.local). Third, by putting your own script in /etc/init.d/. Fow now I’ll take the easy way to do it, the one with the rc.local. Requirements: sSMTP Mutt email client Implementation Open […]
How to install PDO sqlite3 on Ubuntu
SQlite is a serverless Relational Database Management System. In plain words, it’s an SQL database without the need of running an SQL server. From my experience it’s not included in LAMP stack, so you have to install it by yourself. 1. Install php5-sqlite via apt …
1 |
$ sudo apt-get install php5-sqlite |
If SQLite is installed but the PHP driver is […]