Archive for 2008



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.


Set catch all email address for cPanel using SSH

Monday, September 29th, 2008

On a cPanel server, you have a domain and want to set a catch all email address using SSH. You just have to do the following:

Login to your server as root

root# nano /etc/valiases/yourdomain.com

If you want to set the catch all email to something@somedomain.com do the following:

*: something@somedomain.com

That’s it!

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.


Plesk : Configure qmail to use alternate SMTP port 26

Thursday, September 25th, 2008

You have a plesk dedicated server and having issues related to SMTP port 25. There are issues where ISP blocks SMTP port 25, in this case we can use alternate port (I will use port 26).
Kindly follow the below steps to change SMTP port on your plesk dedicated (linux) server to 26.

Login to your server as root

root# cd /etc/xinetd.d
root# ls -l | grep smtp*
root# cat smtp_psa
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
root# nano /etc/services

Add the below lines

smtp_psa_new 26/tcp mail
smtp_psa_new 26/udp mail
root# cp smtp_psa smtp_psa_new

Change the service line in the new file “smtp_psa_new” to be this:

service smtp_psa_new
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
root# /etc/init.d/xinetd restart

And you should see smtp listening on ports 25, and 26:

root# netstat -anp | grep xinetd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6989/xinetd
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 6989/xinetd

That’s it!

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.


Timezone for PHP scripts

Wednesday, September 24th, 2008

If you only want particular PHP scripts (and not shell or other cgi scripts) to use a specific timezone, set the timezone environmental variable in your PHP code like so:


<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=US/Eastern");
echo "New Time: ". date("h:i:s")."\n";
?>

If you put the line putenv(“TZ=US/Eastern”); in a file that is include()’ed by all your other PHP scripts, then your all PHP scripts will use that timezone.

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.


How to install qmHandle on plesk server ?

Wednesday, September 24th, 2008

On your plesk dedicated server you already have qmail as your mail server and now you’re looking to manage the qmail message queue. qmHandle is the simple program for this.

Install qmHandle on plesk dedicated server using the below steps:

Login to the sever as root.

Download the tar from here using the following command:

root# wget
http://jaist.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz
root# tar -zxvf qmhandle-1.3.2.tar.gz
root# chmod 755 qmHandle
root# ./qmHandle –h

Few commands of qmhandle :

List help for qmhandle commands.

qmHandle -h

Show statistics for qmail mail queue

qmHandle -s

Deliver all mails in mail queue.

qmHandle -a

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.


Lost Joomla admin password – how to reset ?

Friday, September 19th, 2008

On cPanel dedicated server, I have come around where people have lost their Joomla admin password and don’t know what to do. Don’t get panicked, be patient – I will show how you can reset your lost admin password for your Joomla website.

First within you cPanel control panel; goto PHPMyAdmin and select the Joomla database that you have, once selected check for the table named jos_users click on it and browse the table; on the right side you will see your admin login name (I assume it is admin, some may have different as they have set when Joomla was installed) in front of the username under the column named “password” you will see some encrypted value make sure the “usertype” column contains “super administrator”. Now, click on the pencil (to edit) and in front of password put the value “21232f297a57a5a743894a0e4a801fc3” without the quotes, which means that your password is “admin” and click on “Go”. That’s all , you have reset the password.

Now, you can check by logging in to your Joomla site. It should be working now.

Note: Works for both Joomla 1.0 and Joomla 1.5 versions.

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.


FTP failed on plesk server

Wednesday, September 10th, 2008

On a plesk server I could not connect to ftp so when I checked the logs I found

- warning: unable to determine IP address of ‘myhostname.server.com’
- error: no valid servers configured
- Fatal: error processing configuration file '/etc/proftpd.conf'

Then, I checked the /etc/hosts and found hostname entry missing:

[root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost

So to get this fixed I added the below entry in the /etc/hosts file

xx.xx.xx.xx   myhostname.server.com

And, then restarted xinetd which fixed the issue.

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.


Windows 2003 plesk 8.4 – IP address conflict

Wednesday, August 6th, 2008

While working on a windows 2003 server which has a plesk 8.4 control panel, I got the following error:

Unable to add ip xx.xx.xx.xx with mask 255.255.255.0 to interface PublicNetwork, WMI error code 42
Execute file name: C:\Program Files\SWsoft\Plesk\admin\bin\ifmng.exe

This means that there is an IP conflict, to get this fixed – you have to contact your dedicated server provider and ask them to remove the IP address or to provide a new IP address.

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.


Rvskin giving error on cPanel server

Thursday, July 3rd, 2008

For some reason when upcp completed on cPanel server rvskin started giving errors like below:


......................
.....................
main::cpanel_parse('GLOB(0x9c3af58)') called at cpanel.pl line 2912
main::doinclude('rvbranding/indexheader.html', 2) called at cpanel.pl line 1673
main::exectag('<cpanel relinclude="rvbranding/indexheader.html">') called at cpanel.pl line 4797
main::dotag(undef) called at cpanel.pl line 4664
......................................................
.....................................................

To get this fixed do the following:

root# mkdir /root/rvadmin
root# cd /root/rvadmin
root# rm -f rvauto.tar.bz2
root# wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2
root# tar -xvjf rvauto.tar.bz2
root# perl /root/rvadmin/auto_rvskin.pl

This worked 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.