Posts Under Category: Dedicated Server

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

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

If you want to see the list of users who are logged in server and their IP and what they are doing, here is how you can do.

Login to your server as root and run following command.

w

OR

who

Above command will list all logged in users, their IP, what they are doing.

Our Recommended VPS Hosting

If for some reason you do not want to update your server kernel but want to update other packages running on CentOS, here is how you can do.

Update can be done using yum command and to exclude kernel from update we need to add exclude command.
Login to your server as root via SSH and run following command:

yum -y --exclude=kernel\* update

OR

yum -y -x 'kernel*' update

Above command will update all packages but will leave kernel update on a CentOS server.

Our Recommended VPS Hosting

If you want to copy a file / folder from one server to another, you can use wget or scp command. In this tutorial I will show how to use scp command to copy files / folder from one server to another.

Let us suppose

Server One IP is: 1.1.1.1
Server Two IP is: 2.2.2.2

How to copy a file

Suppose you want to copy a file from server one to server two.
Location of file on server one is: /home/filename.txt

Login to server two via SSH and run following command

scp root@1.1.1.1:/home/filename.txt /home/

This will copy filename.txt file from server one to server two and save in /home directory.

How to copy a folder / directory

Suppose you want to copy a complete folder from server one to server two.
Let’s say you want to copy /backup folder from server one to server two.

Login to server two via SSH and run following command

scp -r root@1.1.1.1:/backup /foldername

This will copy /backup directory from server one to server two and save in /foldername directory.

Our Recommended VPS Hosting

We can test server disk read / write speed from SSH. Below command will show the speed that the server can read and write a 1GB file.

Login to your server via SSH and run below command:

dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync

Higher scores is better.

SSD disk will give you very fast read / write speed compared to SATA disks. There are many providers offering SSD VPS like DigitalOcean, RamNode etc

Our Recommended VPS Hosting

Apache is the most popular HTTP server. Hers is how you can install Apache server on a CentOS / RedHat server.
Login to your server as root via SSH and run below command:

yum install httpd

Now start Apache

service httpd start

Done!!

Our Recommended VPS Hosting