Load Balancing using Ldirectord on Linux (Apache) web server

For this setup, we need four nodes (two Apache nodes and two load balancer nodes) and five IP addresses: one for each node and one virtual IP address that will be shared by the load balancer nodes and used for incoming HTTP requests.

I will use the following setup here:

Apache node 1: webserver1.tm.local (webserver1) – IP address: 192.168.0.103; Apache document root: /var/www
Apache node 2: webserver2.tm.local (webserver2) – IP address: 192.168.0.104; Apache document root: /var/www
Load Balancer node 1: loadb1.tm.local (loadb1) – IP address: 192.168.0.101
Load Balancer node 2: loadb2.tm.local (loadb2) – IP address: 192.168.0.102
Virtual IP Address: 192.168.0.105 (used for incoming requests)

In this tutorial I will use Ubuntu 8.04 LTS for all four nodes, just install basic Ubuntu 8.04 LTS on all four nodes. I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! I also recommend you to have a DNS server in place. Continue reading “Load Balancing using Ldirectord on Linux (Apache) web server” »

Share

Add Linux machine on LibreNMS

Install SNMPD first

SNMPd is not installed by default. You must first install snmpd.

apt-get update
apt-get install snmpd lsb -y

Backup default snmp.conf file on the ‘/etc/snmp/’ directory and copy new one from the librenms directory.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.asli
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf

or instead copy-paste below snmpd text Continue reading “Add Linux machine on LibreNMS” »

Share

Upgrade mysql 5.5 to 5.6 in Ubuntu 14

While I was installing idoit- the cmdb and IT documenting platform, struggling with a pre-requisite of having mysql version 5.6 which is not shipped by native in ubuntu 14 installations. So had to google it and found some solution, however the one that worked for me which I’m sharing below:

step 1 : remove old mysql

sudo apt-get remove mysql-server
sudo apt-get autoremove

step 2 : install new version of mysql

sudo apt-get install mysql-client-5.6 mysql-client-core-5.6
sudo apt-get install mysql-server-5.6
Share

Install SVN Server on Ubuntu and Test it with Tortoise

Execute the following commands to update the Ubuntu repository list and install apache + svn.

sudo apt-get update
sudo apt-get install subversion apache2 libapache2-svn apache2-utils

*If asked type Y (Yes). If you have trouble updating check your internet connection, proxy, try update fix-missing etc.

Create your repository folder in this case /svn/repos/ Continue reading “Install SVN Server on Ubuntu and Test it with Tortoise” »

Share

Remove apache, phpmyadmin etc from ubuntu 16.04

You can remove the packages in Ubuntu by executing the commands:

dpkg --purge phpmyadmin
dpkg --purge mysql-server
dpkg --purge apache2.2-common

Or

You have option also to remove the following packages:

sudo apt-get remove apache2*
sudo apt-get remove phpmyadmin 
sudo apt-get remove mysql-server
sudo apt-get remove php5

Or

sudo apt-get --purge apache2*
sudo apt-get --purge phpmyadmin 
sudo apt-get --purge mysql-server
sudo apt-get --purge php5
Share

Create a Sudo User on Debian or Ubuntu

Log in to your server as the root user.

ssh root@server_ip_address

Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create.

adduser username

Set and confirm the new user’s password at the prompt. A strong password is highly recommended! Continue reading “Create a Sudo User on Debian or Ubuntu” »

Share

Server Monitoring with Munin and Monit on Ubuntu 14.04 LTS

Our system’s hostname is server1.example.com, and we have a website www.example.com on it with the document root/var/www/www.example.com/web.

The following steps have to be performed as root user. To become root user on your server, run this command:

sudo su

Ensure that the system is up to date before you start to install Munin, run:

apt-get update
apt-get upgrade

Apache is used to show the Munin pages, the apache fcgid module is required for the Munin graph zoom feature. I will install apache and the libapache2-mod-fcgid module with apt. Continue reading “Server Monitoring with Munin and Monit on Ubuntu 14.04 LTS” »

Share

SVN Server on Ubuntu 12.04 LTS with Web Access

To install SVN server, run this command at the command prompt:

sudo apt-get install subversion libapache2-svn apache2

Make the directory where you want to keep the svn repositories and edit the dav_svn.conf file:

sudo mkdir /svn
sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Delete all the data and make it simple like this 🙂

<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>

To create a svn user , use the following command: Continue reading “SVN Server on Ubuntu 12.04 LTS with Web Access” »

Share

How to setup vsftpd FTP with SSL on Ubuntu 12.04

This tutorial teaches you, how to setup vsftpd server on Linux based dedicated Web server. The tutorial also teaches you how to add the ftp users and lock the directory to individual users(In this scenario,lock the users into their individual web directory).

In Ubuntu 12.04, vsftpd with chrooted users gives the following error message:

500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
To overcome this problem, we need to add the following vsftpd PPA:

sudo add-apt-repository ppa:thefrontiergroup/vsftpd

Continue reading “How to setup vsftpd FTP with SSL on Ubuntu 12.04” »

Share