Redis installation in Ubuntu 12.04 with init support

Here is a quick installation script to install redis in ubuntu 12.04 with init support:

I am using redis version: 2.6.13

https://raw.github.com/rrana/installation-scripts/master/redis-installation-ubuntu.sh

wget https://raw.github.com/rrana/installation-scripts/master/redis-installation-ubuntu.sh

sudo sh redis-installation-ubuntu.sh

You can check your installation with a ping in redis cli:

~$ redis-cli

redis 127.0.0.1:6379> ping
PONG
redis 127.0.0.1:6379>

All this installation script does is just download the redis source and compile it locally and then run a script supplied by redis to create the necessary redis init configuration.

Before running the script please make sure that your are downloading the latest stable release of redis from: http://redis.io/download

Then simply change the download information (line 8), tar file name (line 9), and directory name (line 10) in the script.

 

Apache (and nginx) log parsing with goaccess

Goaccess is a realtime log parser utility and very handy to get some quick insights from your log file.

http://goaccess.prosoftcorp.com/

ubuntu 12.04 Installation:
apt-get install goaccess

Download/Install instruction for older releases and other distribution:

http://goaccess.prosoftcorp.com/download

To parse all log files (including .gz ones):
zcat -f access.log* | goaccess -a -s -b

libxml2.so.2 problem Ubuntu 12.04 (apache, php5, wordpress)

(This is a note I’m keeping for my future references)

I was doing a wordpress installation in EC2 instance using Ubuntu 12.04 with Apache and php5. Found this error during apache reload.

Error Message:
root@ip-*-190-46-*# /etc/init.d/apache2 restart
apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/proxy_html.load: Cannot load /usr/lib/libxml2.so.2 into server: /usr/lib/libxml2.so.2: cannot open shared object file: No such file or directory
Action ‘configtest’ failed.
The Apache error log may have more information.
…fail!

SOLUTION: (Please note, there might be a package version number difference. So match the file names with your downloaded package version)

# aptitude download libxml2
# ar -xf libxml2_2.7.8.dfsg-5.1ubuntu4_amd64.deb

You will get the following files extracted from the deb package:
control.tar.gz data.tar.gz debian-binary libxml2_2.7.8.dfsg-5.1ubuntu4_amd64.deb

# rm libxml2_2.7.8.dfsg-5.1ubuntu4_amd64.deb
# rm control.tar.gz

# tar xf data.tar.gz
# cd usr/lib/x86_64-linux-gnu/

Check if you have the following files here:
libxml2.so.2 libxml2.so.2.7.8

# mv * /usr/lib/x86_64-linux-gnu/
# cp /usr/lib/x86_64-linux-gnu/libxml2.so.2* /usr/lib/
# /etc/init.d/apache2 start

And thats it!