Posts Under Category: VPS

For security reason it is recommended that you disable root SSH login to server. To SSH your server with root privileges you should create a new user and assign root privileges to this new user.

In this tutorial, we will assign root privileges to a new user ravi on a CentOS server.
read more

The main user / administrator of a Linux server is root. Here is how you can create a new user on your CentOS server / VPS.

Login to your server as root as run following command to create a new user named ravi.

/usr/sbin/adduser ravi

Now set password for new user ravi

passwd ravi

Screenshot

add-new-user

Done!!

read more

The current stable version of CentOS Linux OS is 6.5
If you want to upgrade your VPS / dedicated server to CentOS 6.5 from 6.4/6.3, follow below steps.
read more

In this tutorial, I will explain how to install Nginx on a CentOS server / VPS. This is very easy and will not take more than 5 minutes.

Before starting installation of Nginx, make sure you have installed PHP and MySQL
How to install PHP
How to install MySQL

Login to your server via SSH and as root.

Step 1:

If you have already installed Apache and is running, stop Apache.

service httpd stop

Step 2:

Create nginx repo file.

touch /etc/yum.repos.d/nginx.repo

Step 3

Edit nginx repo file.

nano /etc/yum.repos.d/nginx.repo

And add following code. Save the file.

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

Step 4

Install Nginx

yum install nginx

Step 5

Start Nginx

service nginx start

Step 6

Make nginx auto start on server reboot.

sudo chkconfig nginx on

Done!!

Default Web Directory

This is the default folder / directory of Nginx server. You should upload your website files in this directory.

/usr/share/nginx/html

read more

I was recently installing and configuring a new server. After installing CentOS I installed Apache. But server IP was not opening default Apache page. I was getting ping reply from my computer to server IP. So, I quickly figured out that Port 80 and Port 224 on server are blocked for incoming web traffic.

we need to open port 80 (http port) and port 443 (SSL / https port) for web traffic. So, here is how you can open port 80 and 443 on your server.

Login to your server as root via SSH and run following commands:

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart

Done!!!

Our Recommended VPS Hosting

In this tutorial, I will explain how to install cPanel on a new Linux server with CentOS installed on server.

Step 1:

Before installing cPanel, make sure you have a cPanel license for your VPS. If you do not have cPanel license, you can get a free 15-days trail license. It will take hardly 1-minute to get a 15-days trail licence.
Get cPanel 15-Days Trail Licence
read more

Following command will install PHP on your CentOS server / VPS.

Login to your server as root via SSH and run following command.

yum install php php-mysql

OR

yum install php

Installation wizard will ask your confirmation. Press Y to complete installation.

Check Installation

Once PHP is installed, you can check the PHP version installed using below command

php -v

It will show something like this:

[root@server ~]# php -v
PHP 5.3.3 (cli) (built: Nov 22 2013 10:45:17)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Restart Apache

After installing PHP, restart Apache using below command

service httpd restart

Test PHP

After installing PHP and restarting Apache, its time to test PHP installation on the server.
Create a phpinfo.php fie in /var/www/html/ with following code:

<?php
phpinfo();
?>

Now open your http://Server-IP/phpinfo.php in any browser.
This should show PHP settings on your server. You have successfully installed PHP on your server.

You can now edit various PHP settings like memory_limit, max_execution_time, max_upload_size, post_max_size etc. in:

/etc/php.ini

Done!!

Our Recommended VPS Hosting

Following command will install MySQL on a CentOS server / VPS.

Login to your server as root via SSH, and run following command.

Step 1:

yum install mysql-server
service mysqld start

Step 2:

Set MySQL server root password.

sudo /usr/bin/mysql_secure_installation

MySQL server will ask MySQL server root password. Since you just installed mysql, there is no MySQL root password. So, just press enter.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

MySQL will prompt you to set a root password. Press Y to set mySQL server root password.

Set root password? [Y/n]

Enter and re-enter root password for MySQL server. Please use a strong password and do not use your server root password.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

Now MySQL will ask a series of questions. Press Y for all.

Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]

At the end MySQL will show success message.

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Done!!!

Our Recommended VPS Hosting

If you want to see CPU details of your Linux server / VPS, here is how you can check.
Login to your server as root and via SSH, and run following command:

cat /proc/cpuinfo

This will show you your server CPU details like Total processors, CPU model number, speed, cache.

Our Recommended VPS Hosting

If you want to check how much disk space your server has, how much disk has been used and how much free disk space is left on your Linux server, here is simple command for that.

Login to your server as root via SSH and run following command.

df -h

This will show size, Used, Available, File system mount points.

If you want to check disk usage summery of any particular directory, say /home use below command:

df -h /home

Our Recommended VPS Hosting