How to Setup your Own web Hosting Server?

How to Setup your Own web Hosting Server?

Ever needed to set up your own webserver to have a site or share records with family?

Making a web server is extremely simple to do and we’ll demonstrate to you all that you have to begin.

In this instructional exercise, we’ll introduce the majority of the parts required for setting up a web server.

This will set up the majority of the fundamental parts of a web server.

In the event that you need to host many sites, or need progressively vigorous site the executives, you ought to introduce a control panel like cPanel.

Things to know first before setting up your own webserver

Connectivity:

Consumer-grade web and PC equipment are not intended for the worries of 24×7 utilization and connections from around the world.

Our site, then again, utilizes enterprise-grade equipment and connections with guarantee everybody can connect with your server at exceptionally quick speeds.

Maintenance and Support:

One of the significant downsides of hosting your own site is that you are in charge of any help issues.

 Expenses

While it might sound less expensive to utilize that PC lying around doing nothing when making your web server when you factor in the expense of fuelling an old PC 24 hours per day, it can get over the top expensive.

A 500W work station running 24 hours of the day at 12 pennies for every KW/h is an incredible $524 every year! Also the expenses of the web, equipment substitution, and so on.

Note: Setup your own server only when you’re able to afford electricity expense

System Requirements

The framework necessities for setting up an individual web server rely upon the sort of websites you expect to run. The base necessities are as per the following:

A Hybrid, Cloud, or Dedicated Server

CentOS 7+

512MB RAM

2GB Disk Space

Database driven websites may require more prominent framework assets to run viably.

Server Components - LAMP

There are a few noteworthy parts to setting up a web server: This is regularly alluded to as the LAMP Stack.

Linux: The working framework behind the LAMP stack is Linux. It’s a lightweight and secure OS, making it one of the most famous decisions for the best web servers.

Apache: This is the software used to control the HTTP convention which conveys web content from the server to the internet browser.

MySQL: A mainstream database utilized for database-driven sites.

PHP: The main programming language of numerous sites, PHP is required for well-known site scripts like WordPress.

Installations Instructions

Connect to root via SSH to your server.

Install screen, wget and unzip

yum -y install wget screen unzip

Download the LAMP installation code from GitHub using wget:

wget –no-check-certificate -O lamp.zip https://github.com/teddysun/lamp/archive/master.zip

Unzip the installation files:

unzip lamp.zip

Change into the lamp-master folder:

cd lamp-master

Set the installation script to be executable:

chmod +x *.sh

Open a screen to start the installation process:

screen -S lamp

Execute the install script:

./lamp.sh

Complete these steps during the introduce procedure:

  1. Pick an apache version. We prescribe the most recent version recorded.

  2. Select the database you wish to introduce. We suggest MySQL and choosing the most recent variant.

  3. Snap enter to utilize the default MySQL information directory

  4. Enter a root password of MySQL

  5. Select a PHP version. We prescribe choosing the most recent form.

  6. Introduce any required PHP modules. php-imagick is a decent alternative in case you don’t know what you need.

  7. Select 1 to introduce PHPMyAdmin

  8. Press any key to start the installation

Web Hosting

Manage Components of Web Server

Since your LAMP stack is done installing, you can utilize these commands to begin, stop, and restart components of the webserver:

Apache

/and so forth/init.d/httpd (start|stop|status|restart)

MySQL

/and so forth/init.d/mysqld (start|stop|status|restart

Building a new site

Since the LAMP stack is introduced, you can now deploy your first site on the webserver.

The command below will add a site to your Apache configuration file:

lamp add

Pursue the steps in the script, giving the domain name and database data (whenever required).

You would now be able to add records (files) to the directory of your site. The default index is:

/data/www/domain.com

You can utilize the SCP command from your local machine to transfer records to the directory.

Indicating a Domain to the Web Server

You should log in to the admin interface at your domain provider. Our instructional exercise did not set up any nameservers on the server, so you should utilize an outer nameserver provider. Most domain providers give this to free.

Essentially copy the IP address of your server into the A record of the domain name DNS zone.

When you point the A record of the domain to your servers open IP address, the information in this folder will be visible for clients in their web browser

Conclusion

Your web hosting server is now setup.

You would now be able to introduce prevalent software to your web servers like WordPress, or transfer documents to the server for download by clients.

If any problem ask Question on our community and comments

Leave a Reply