Initial Server Setup with Ubuntu 14.04
Initial Server Setup with Ubuntu 14.04
Introduction
Ubuntu is a popular Linux distribution that is commonly used for servers. In this tutorial, we will walk through the steps of setting up a new Ubuntu 14.04 server.
Step 1: Connect to Your Server
The first step in setting up your Ubuntu server is to connect to it. You will need to have your server's IP address and your login credentials handy.
To connect to your server, open a terminal window and type the following command:
ssh username@server_ip_address
Step 2: Update Your System
Before you begin installing any software on your server, it is important to update your system. To do this, run the following command:
sudo apt-get update
Step 3: Install Required Software
Next, we need to install some software that will be required for the rest of the setup process. Run the following command:
sudo apt-get install curl git
Step 4: Create a New User
It is not recommended to use the root account for everyday use. Instead, we will create a new user with sudo privileges.
To create a new user, run the following command:
sudo adduser newusername
Replace "newusername" with the username you want to use.
Step 5: Grant Sudo Privileges
Next, we need to grant sudo privileges to our new user. Run the following command:
sudo usermod -aG sudo newusername
Replace "newusername" with the username you created in Step 4.
Step 6: Disable Root Login
For security reasons, it is recommended to disable root login. To do this, edit the sshd_config file:
sudo nano /etc/ssh/sshd_config
Find the line that says "PermitRootLogin" and change it to:
PermitRootLogin no
Save and exit the file, then restart the ssh service:
sudo service ssh restart
Step 7: Configure Firewall
By default, Ubuntu does not have a firewall enabled. It is recommended to enable a firewall to protect your server from unauthorized access.
To enable the firewall, run the following commands:
sudo ufw enable
sudo ufw allow OpenSSH
The first command enables the firewall, and the second command allows SSH traffic through the firewall.
Conclusion
That's it! Your Ubuntu server is now set up and ready to go. Remember to always keep your system updated and secure.
Keywords: Ubuntu
Комментарии
Отправить комментарий