Archive for October, 2008



Install munin on Plesk dedicated server

Friday, October 31st, 2008

Get your servers monitored by munin and you can see the output in graphical view for the following:

  • load average
  • memory usage
  • CPU usage
  • MySQL throughput
  • eth0 traffic and more…

I have used centos for munin installation. The steps for installation are as below:

Add rpmforge repositories

root# rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
root# yum -y install munin

My document root is /var/www/html/ (Plesk server)

root# cp -r /var/www/munin /var/www/html/
root# chown -R munin:munin /var/www/html/munin

Now, restart apache server

root# /etc/init.d/httpd restart

Now, check it using the browser

http://xxx.xxx.xxx.xxx/munin (xxx.xxx.xxx.xxx is your server IP)

Now, add a munin node – for this do the following

root# yum -y install munin-node

Now configure it using editor of your choice

root# nano /etc/munin/munin-node.conf

Find the line and make the necessary changes

* Allow the graph server (server.example.com/xxx.xxx.xxx.xxx) to poll the node.
allow ^xxx\.xxx\.xxx\.xxx$

Start the munin node on your server

root# service munin-node start
root# nano /etc/munin/munin.conf
[client.example.com]
address xxx.xxx.xxx.xxx
use_node_name yes

Remember to open port tcp/4949 in the firewall of the node

root# iptables -A INPUT -p tcp --dport 4949 -j ACCEPT

Let us know if this helped you.. your feedback is very vital for us.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Install VNCserver on linux (Remote desktop linux)

Tuesday, October 28th, 2008

Windows can be connected using Remote Desktop, linux users can connect to shell (ssh) using ssh clients like putty. Now, what if you need to view linux gnome desktop and that too remotely? Yes, this is possible with VNC ( Virtual Network Computing ) server. I will show you how to install it on centos.

You’ll need gnome desktop environment – if it is not installed on your system you can get it installed using yum; the commands are:

root# yum groupinstall "X Window System"
root# yum groupinstall "GNOME Desktop Environment"

If you get any errors about dependencies, I am sure you know how to get those packages installed.

Now, the VNC server is installed with the X Windows system. We will configure the VNC server now:

Edit the /etc/sysconfig/vncservers file with your favourite editor and uncomment the following two lines:

VNCSERVERS="5:root" # display port and username
VNCSERVERARGS[2]="-geometry 800×600 -nolisten tcp -nohttpd -localhost"

Set password to VNC Server

root# vncpasswd

Edit the local config file in the root folder:

nano ~/.vnc/xstartup
Replace "twm &"   with "gnome-session &"

To start VNC server issue command

root# vncserver :5

To stop VNC server issue command

root# vncserver -kill :5

Connecting with VNC client

Start VNC Server by issuing the command

root# vncserver :5

Open your favourite VNC client and type your server’s IP followed by the port number

xxx.xxx.xxx.xxx:5 (where xxx.xxx.xxx.xxx is the IP)

5 is the port set within the /etc/sysconfig/vncservers file

VNC login

Enter your servers password and access the linux remote desktop.

VNC authentication

Here is your remote desktop

VNC server

Did this post help you? please leave your feedback for us.


ionCube autoinstaller script

Thursday, October 16th, 2008

ionCube php loader is the PHP extension that decodes encrypted PHP files on runtime, usually this is already installed on any web server whether it be used for shared hosting, reseller hosting or on your dedicated web servers.

If for some reason you don’t have it installed on your linux server, you can use the below shell script created by one of our system administrator.

Create a file named ioncubeinstaller.sh and paste the below code in the file:


#!/bin/bash
# Supportfacility.com

WHO=$(whoami)
if [ ${WHO} == "root" ]
then
echo "Script Initialized ..."
else
echo "You must be logged in as root to install ionCube Loader."
echo "Terminating ..."
exit 0
fi

echo "Changing directory"

cd /usr/local/

echo "Done."

if [ -e ioncube_loaders_lin_x86.tar.gz ]
then
rm -f ioncube_loaders_lin_x86.tar.gz
fi

echo "Downloading files"

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

echo "Done."

echo "Installing files"

tar -zxvf ioncube_loaders_lin_x86.tar.gz

echo "Done."

echo "Changing ownership"

chown -R root.root ioncube

echo "Done."

phpline=`php -v | grep ^PHP | cut -f2 -d " "| awk -F "." '{print "zend_extension=\"/usr/local/ioncube/ioncube_loader_lin_"$1"."$2".so\""}'`
phpinifile=`php -i | grep php.ini | grep ^Configuration | cut -f6 -d" "`

echo "Adding line $phpline to file $phpinifile"
echo "$phpline" >> $phpinifile

rm -f ioncube_loaders_lin_x86.tar.gz

echo "Ioncube installed sucessfully"

Then, change the permissions of the file to 755

root# chmod 755 ioncubeinstaller.sh

And execute it with

root# ./ioncubeinstaller.sh

This has been tested on cPanel, Plesk, DirectAdmin dedicated servers and will work on any linux server

Let us know if this script was helpful for you.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.