NEED SOME HELP
CLICK HERE OR CALL US ON
hosting provider in india 1-800-212-2022
web hosting services in USA 1-888-288-3570
Have questions? Let us answer them all!
Wiki

Ubuntu

Are you planning to use Ubuntu dedicated server hosting? Or perhaps you have already started using Ubuntu? But you do not know exactly how to install Ubuntu dedicated servers. 

 

Don’t worry, this is the issue of almost every beginner. That’s why, we have collected some of the best wiki to learn you several things about Ubuntu dedicated hosting. You’ll learn to do basic stuff in Ubuntu, learn what architecture is supported by ubuntu, the system requirements of ubuntu, how to install the Ubuntu server and other crucial things related to the Ubuntu server.  To understand Ubuntu in a better and more effective way, let’s dive in here.

Ubuntu Dedicated Servers

Ubuntu dedicated server is the professional solution you need. Go4hosting offers extremely reliable Ubuntu dedicated hosting. It is one of the most popular operating systems chosen by our customers, available on all of our Ubuntu dedicated server hosting packages including Ubuntu 10.04, Ubuntu 12.04, and Ubuntu 14.04.

 

An Ubuntu dedicated server is ideal for websites, hosting applications, databases, and email systems in a robust, secure environment.

What is the Ubuntu Server?

Ubuntu dedicated server is the leading operating system owned by a South African businessman named Mark Shuttleworth. Ubuntu is a Debian-based Linux operating system in which unity is its default desktop environment. Ubuntu is the utmost widespread desktop Linux distribution. It widely depends on the principles of open source development.

 

This operating system is developed by the canonical and a large number of open source developers across the world. It is used to give power to the modern-day servers that serve static and dynamic web pages, applications, files, containers, and many more. The ability of Ubuntu to run on a wide range of platforms and its architecture makes it a suitable choice for enterprises.

 

Moreover, the continuously growing ecosystem of Ubuntu makes it easy to install and manage demanding applications. Ubuntu will cover all types of platforms to develop. It works excellently with clouds and thus is a feasible solution for cloud service providers.

Which Architectures are Supported by Ubuntu?

Ubuntu dedicated server supports a wide range of architecture or hardware platforms for its server OS. Commonly, the frequently used platform is AMD64 or x86-64 architecture. It is the traditional 64-bit machines that power our personal computers. It also supports the x86 or 32-bit platforms. So that you can also convert any old computer into a personal server.

Apart from that, you can also run the Ubuntu dedicated server OS into mainframes and embedded systems. Ubuntu supports the IBM POWER pcs, IBM Z mainframes, and ARM-based server systems in this regard. 

What Are the System Requirements for Ubuntu?

One of the key benefits of Ubuntu dedicated hosting is that it does not need extremely advanced CPU resources. That means you can easily use old hardware or buy some modest resources to build a personal or home server system. The least required configuration of a system for a simple server setup is given below.

  • 1 GHz CPU
  • 512 MB of RAMs
  • 1 GB of Disk Storage(1.75 for all features)
  • Canonical recommends the following requirements for a server.

How to setup Ubuntu dedicated server

Here, learn about how to set up an Ubuntu dedicated server and increase its security.

Step 1: Log in via SSH

Once you create your server with go4hosting, you will get an email with your default username, password, and server IP address. To login into your server, use these credentials.

Step 2: Change the password

 

You need to change the default password allotted to you by go4hosting. You can use it by following the command.

 

$ passwd

 

But before changing the password, you will be asked for your current password first.

Step 3: Create a new Sudo user

 

Whether you are logged in as a root user or the default user that go4hosting gave you, it is always a best practice to create a new user with Sudo privileges. Your go4hosting user-id also has Sudo privileges.

 

To create a new user, you need to use the below-mention command. You can replace testuser with a username you like.

 

$ sudo adduser testuser

 

You can overlook using sudocommand if you are logged in as a root user.

 

Here, you need to answer several questions including your account password. Try to enter a strong and lengthy password. Other details are not mandatory to fill, so you can also skip them, and just hit ENTER.

 

client_xxxxx_x@vps:~$ sudo adduser testuser

Adding user `testuser' ...

Adding new group `testuser' (1001) ...

Adding new user `testuser' (1001) with group `testuser' ...

Creating home directory `/home/testuser' ...

Copying files from `/etc/skel' ...

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

Changing the user information for testuser

Enter the new value, or press ENTER for the default

        Full Name []:

        Room Number []:

        Work Phone []:

        Home Phone []:

        Other []:

Is the information correct? [Y/n] y

 

To give your account sudo privileges, use the following command.

 

$ sudo usermod -aG sudo testuser

Step 4: Update your server

It is essential to keep your server updated at all times. You can use the below-mentioned command, as it is will update your server with the package list. This package includes the details of how and from where to download software.

$ sudo apt update

Now, install the package upgrades.

$ sudo apt upgrade

Note: You may be asked for choosing between an updated config file or keeping the current one. Always go for the currently installed option.

Step 5: Set the timezone

To operate in the same timezone is beneficial. So, run the following command to get a list of all available time zones.

$ timedatectl list-timezones

To scroll through the list, press ENTER and once you reach the end, enter q to exit.

You can also grab the list from here.

Set your timezone by using the following command.

$ sudo timedatectl set-timezone Europe/Amsterdam

Confirm the new timezone by using the below-mention command.

$ date

Tue Mar  3 08:55:31 CET 2020

Step 6: Set up the Firewall

Ubuntu version 18.04 comes with an inbuilt firewall called UFW(Uncomplicated Firewall).

We need to set rules before enabling the firewall because if you enable the firewall witrhout setting any rules, you will get locked out of your own server.

An initial step is to set up default policies. These defined rules, handle the traffic that does not match with any other rules. By default, UFW deny all incoming connections and give permission to all outgoing connections. As a result, if anyone trying to reach your server can’t connect to it until any server application can reach the outside world.

Use the below-mention commands to set the default policies of UFW.

$ sudo ufw default deny incoming

$ sudo ufw default allow outgoing

With this command the default policy has been set, now its time to allow the default SSH port. For that, run the following command.

$ sudo ufw allow ssh

Several applications register themselves by their name with UFW. As a result, it knows that SSH refers to port 22. To achieve the same effect, you can also use the following command.

$ sudo ufw allow 22

It is time to enable the firewall.

$ sudo ufw enable

You will be asked for confirmation. Enter y since we have already enabled SSH.

To check the status of the firewall, you can use the following command.

$ sudo ufw status verbose

You should see a similar output.

Status: active

Logging: on (low)

Default: deny (incoming), allow (outgoing), disabled (routed)

New profiles: skip

 

To                         Action               From

--                         ------      ----

22/tcp                   ALLOW IN        Anywhere

22/tcp (v6)            ALLOW IN        Anywhere (v6)

 

You will only be shown the open ports and protocols after omit the verbose tag from the command. 

 

Step 7: Set the Hostname

First, check your existing hostname using the following command.

 

$ hostnamectl

You should see a similar output.

Static hostname: vps.testexample.site

Icon name: computer-vm

   Chassis: vm

   Machine ID: f0824f3916f24a298d6b2c10dc8c68fb

    Boot ID: 5c4ef23bc3dd4d39943e89d4563674c7

    Virtualization: kvm

    Operating System: Ubuntu 18.04.4 LTS

    Kernel: Linux 4.15.0-88-generic

    Architecture: x86-64

 

To set up a hostname, use the below-mention command.

 

$ sudo hostnamectl set-hostname host.testexample.site

Replace host.testexample.site with your actual hostname. Preferably, it should be an FQDN(Fully qualified domain name). But if you are not sure, you can always use a custom label to identify the server.

Next, you need to resolve your hostname to your server. This can be done by editing the /etc/hosts file. Use the following command to open the host's file in the Nano text editor.

$ sudo nano /etc/hosts

Append your hostname at the end of the line that initiates with 127.0.0.1 like this.

127.0.0.1     localhost host.testexample.site

Close the editor by pressing Ctrl + X and entering y when asked for confirmation to save the updated file.

Step 8: Log in as a new user

By using logout, exit from the current session and log in again via SSH using the new recently created user.

$ ssh [email protected]

Replace 192.168.0.1 with the actual IP address of your server.

Step 9: Disable Root login via SSH

This is a very important step in securing your server from brute force attacks. Let us check the current status of SSH root login by using the following command.

$ sudo cat /etc/ssh/sshd_config | grep PermitRootLogin

This is a set of two commands - grepcommand and catcommand. grepcommand searches for the string PermitRootLogin in the file /etc/ssh/sshd_config and catcommand outputs it to the terminal.

You might see a similar output.

PermitRootLogin without-password

# the setting of "PermitRootLogin without-password".

Here, it is set without a password. This means public-key authentication is enabled. Make sure, it should not be commented out or not set to yes.

To completely disable the root login via SSH, edit the config file by using the following command.

$ sudo nano /etc/ssh/sshd_config

Change the line containing PermitRootLogin as below.

 

PermitRootLogin no

Save the file by pressing Ctrl + W and entering Y when prompted.

Restart the SSH server to apply the changes.

$ sudo systemctl restart sshd

You can check by logging out and try logging back in as root user. The server will refuse.

Step 10: Change SSH Port (Optional)

This part is not mandatory to follow, but it is good from a security aspect. Modifying the default SSH port(22) prevents the server from malicious bots. 

To change the port, you need to open the SSH configuration file again with the help of the below-mention command.

$ sudo nano /etc/ssh/sshd_config

Find the line which says the following.

#Port 22

Uncomment the line by removing the hash and change the value into any port between 1024 and 65535. Here we are using port 2254.

Port 2254

Save the file by pressing Ctrl + W and entering y when prompted.

We will also need to allow this new port in our firewall. Open port 2254using UFW.

$ sudo ufw allow 2254

Since, we are no longer the default port, we can delete it from our firewall’s list.

$ sudo ufw delete allow ssh

Restart the SSH server to apply the changes.

$ sudo systemctl restart sshd

Reload the firewall to apply the new settings.

$ sudo ufw reload

Now, without specifying a port you won’t be able to log in via SSH. Modify your SSH command as follows to login via the changed port.

 

$ ssh -p 2254 [email protected]

Step 11: Reboot Server

Finally, after the installation and up-gradation packages, the server needs to reboot to apply some of those changes. Use the command mentioned below to reboot your server.

$ sudo reboot

Why choose a go4hosting Ubuntu dedicated server hosting?

Ubuntu environment

With Ubuntu, you can benefit from customizable software as it is based on open-source technology.

Therefore, you can use and configure your software package as per your needs. Ubuntu offers a flexible environment to develop your applications without limits.

Security

 

Ubuntu dedicated hosting puts a priority on your server’s security and the data that is stored on it. With online technical documentation, we ensure you that you get the right level of infrastructure protection for your application and websites.

 

Backups of your data

 

Go4hosting offers Ubuntu dedicated servers with a 500GB storage space. It is isolated from your server, and provides space to store backups of your data. For example, folders from your web hosting space’s FTP server, configuration files, and other critical data.

Services included

 

If you opt for Ubuntu dedicated hosting services from Go4hosting, then along with an external disk for your backups, you will also get several other services. 

Our services included minimum guaranteed public bandwidth, anti-DDoS protection, and a wide range of OS to choose from. It also comes with a service level agreement (SLA), ensuring increased hardware available for your applications.

SUBMIT YOUR QUERY

  • I'm not a robot

CONNECT WITH US

Did We Miss Out on Something?

Relax, we have you covered. At Go4hosting, we go the extra mile to keep our customers satisfied. We are always looking out for opportunities to offer our customers “extra” with every service. Contact our technical helpdesk and we’d be more than happy to assist you with your Cloud hosting, Colocation Server, VPS hosting, dedicated Server or reseller hosting setup. Get in touch with us and we’d cover all your hosting needs, however bizarre they might be.

Submit Query

Please fill in the form below and we will contact you within 24 hours.