Archive for the ‘Install’ Category



Secure SSH root access

Friday, April 4th, 2008

Any web hosting provider would like to secure SSH root access on their dedicated web servers, to achieve this, my little contribution to you all. I hope this helps you all.


Add a user on the dedicated server

To begin, SSH into your server as root. Once you’re logged in, you should see a shell prompt similar to:

root@server[~]#

The command to add a user is as below. I will be using the username as “support”.

root@server[~]# /usr/sbin/adduser support

Once the user is added you can verify by using the below command:

root@server[~]# cat /etc/passwd | grep support

Set a password for the user (support)

Use the below command to set password for the user “support”:

root@server[~]# passwd support

Note: Make sure you pick a secure password which will consist between 6-8 characters, and will contain letters, numbers, and punctuation marks.

To make sure this user account that you have created works, open another SSH window and proceed to log in with the user “support”. Once you’ve successfully verified that this account works, you may exit the session.

Verifying su’s command permissions, and ownership

Verifying “su” command is owned by root and the wheel group is suggested. At the same time check the permissions are set correctly.
This can be checked by the below command:

root@server [~]# ls -la /bin/su

The output should be:

-rwsr-x---  1 root wheel 61168 Nov 18 07:17 /bin/su*
If the output is as above you can skip this below command:


Su user ownership, permission can be set by the below command:
root@server [~]# chmod 4750 /bin/su
root@server [~]# chown root:wheel /bin/su

Now, add the user to the wheel group

We will have to add our new user “support” to the wheel group in order to allow it to gain root access, with *NO* root privileges. That means that this user will be able to log into the server, but won’t be able to perform any root tasks until the user switches to the root user.

In SSH you have to type the below command:

root@server[~]# /usr/sbin/usermod –G wheel support

Before proceeding, re-login to your server using the “support” account. At the SSH prompt, type “su” followed by the Enter key, and then enter in the root password. If you were successful, you should be at a root prompt:

root@server [~]#

To confirm that you are root, at the SSH prompt type the command whoami , which should display your root account.

Editing the sshd_config file, and restarting SSH daemon

Now we have to disable direct root access to your dedicated web server. Use the below command:

nano /etc/ssh/sshd_config

Scroll down until you see the following come across the screen:

#LoginGraceTime 600
#PermitRootLogin yes
#StrictModes yes

To disable SSH root login, remove the hash symbol (#) before PermitRootLogin , and change the “yes” next to PermitRootLogin to “no” so now it looks like:

#LoginGraceTime 120
PermitRootLogin no
#StrictModes yes

Note: If you see the value of LoginGraceTime different from my value of 120, you do not need to worry as it does not affect the functionality.

Restarting SSH daemon

Finally, to make the changes take effect, you have to restart SSH by running the following command (as root):

root@server [~]# service sshd restart

Best of luck!

Outsource support

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 ioncube on cpanel dedicated server

Thursday, April 3rd, 2008

ionCube is an encoder (encryption method) used to help protect the php files from software piracy. It is normally used by software vendors to deliver their php software(s) in some sort of encoded format to help protect their copyrights and licensing distribution.

The ionCube version of Ultimate Locator is meant for Linux, Unix and FreeBSD platform servers. ionCube can also be run on a Windows server though.

Here are the installation steps for ionCube loader:

Download link: http://www.ioncube.com/loaders.php

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar -zxvf ioncube_loaders.tar.gz
cd ioncube
mv ioncube /usr/local/

You can check the path of the php.ini file with the below command:

php -i | grep php.ini

Edit the php.ini file with the following command:

nano php.ini

Then, add the below line in the php.ini

zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so

So, now determine if ionCube is on your dedicated web server, do the following:

Add the below code in you a php file, usually in case of cPanel server it is under your public_html directory

<?php phpinfo() ?>

And, access the file in your favourite browser.

Using SSH you can check it with the command:

php –v

Best of luck for your installation.

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 wordpress blog

Tuesday, October 23rd, 2007

There are many websites who use blogs on their website, I thought someone would be interested in knowing how to get a blog installed for their personal or business website. I would recommend wordpress blog – it’s the best blog I have ever used. And the installation procedure is very simple, just go through the following steps:

First of all make sure that your web hosting company supports PHP 4.2 or greater, MySQL 4.0 or greater and the mod_rewrite apache module.

You can download a zip or tar.gz of wordpress from http://wordpress.org/download/ then unzip the files. Now, you can create database from your web hosts control panel when this is done you will find a file named wp-config-sample.php which is to be renamed as wp-config.php, edit it and add your database details over there. And, now upload the files to your web space provided by your web hosting company.

Now, you are ready just type in the browser http://yourdomain.com/blog-directory/wp-admin/install.php fill in the Site name and email address and you’re done. It will provide you admin login and password. Where yourdomai.com means your website name.

Happy blogging!

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.


Secure ssh on your dedicated web server

Monday, October 8th, 2007

 

If you’re looking to secure ssh on your dedicated web server, here are the steps that you need to follow to get your web server secured.

You need to login into your dedicated sever with root access. As you know the default port number of a web server is 22, and this known by any person on the earth who knows about Linux web servers. Now, we will switch the default port number (22) of SSH to something random. This will prevent server login attempts done on the default port number. For this you’ll have to edit the sshd_config which can be done by the command – nano /etc/ssh/sshd_config now find the line #Port 22, uncomment it and replace 22 by some random port number.

You need to take care to add this random port number to your firewall allow list. If you fail to do so, you’ll NOT have access to the server.

Now, we will have to change the protocol in the sshd.config, so you can edit it again with the command – nano /etc/ssh/sshd_config and find the line #Protocol 2, 1 and change it to Protocol 2.

Remember to restart sshd daemon once you have saved the configuration file. Your dedicated server ssh is secured now!

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 PEAR Module on web server

Friday, September 28th, 2007

Simply login via SSH at the root level and execute the following command:

pear -v install module_name

For example to install the mail_queue PEAR module you would execute:

pear -v install mail_queue

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.


Installing PHP Pear modules

Thursday, September 27th, 2007

To install a PHP Pear module, you will want to use this command…
pear install –alldeps [name of module]

The “–alldeps” switch makes it so that it installs all of the dependencies that the Pear module you want to install needs to function.

For instance, the Pear Mail module needs several dependencies to work so installing each of its dependencies would be a pain, so you use the –alldeps switch and it installs all of the dependencies in one step.

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.


Installing zend optimizer on cPanel

Saturday, September 22nd, 2007

It is very easy to install zend optimizer on a cPanel based web servers, the steps are as below:

Login to your web server as root

Execute the script: /scripts/installzendopt

You’ll have to follow the instructions which are given on the screen.

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 webmin on dedicated server

Saturday, September 22nd, 2007

Webmin is a web based control panel interface for system administrators, you can download webmin from the following URL http://www.webmin.com/download.html to get it installed on your dedicated web server.

The rpm needs to be downloaded in one of the directory for ex. Webmin

Create a directory on the server
mkdir webmin
cd webmin

Download it in the directory
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.360-1.noarch.rpm

Install webmin now
rpm –ivh webmin-1.360-1.noarch.rpm

When webmin is installed on the dedicated web server, to make sure that webmin is working properly on your dedicated web server – start your browser and goto http://xxx.xxx.xxx.xxx:10000/ , where xxx.xxx.xxx.xxx is the main IP of your dedicated web server – you’ll get webmin login screen in which you can login with your root login.

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.