INTRODUCTION
Cockpit is a web-based graphical interface for servers, intended for everyone, especially those who are:
New to Linux
(including Windows admins)
familiar with Linux
and want an easy, graphical way to administer servers
Expert admins
who mainly use other tools but want an overview on individual systems
STEP 1 : CREATE AN AMAZON EC2 LINUX INSTANCE
In this step you will create a virtual machine with the AWS service Amazon Elastic Compute Cloud(EC2). You need an AWS account to access all services within AWS.
- Log in to your AWS account, in the search bar type EC2
- In the pop-up that appears click EC2 under services
- Click launch instance
- Configure as follows :
- Name : WebServer ( You can choose the name you want )
- Amazon Machine Image : Ubuntu
- Instance type : t2.micro
- Under Key pair (login) click Create key pair choose the type RSA
- Name your key
- Private key file format : .ppk
- Click Create key pair
- On the Network settings check to allow HTTPS traffic from the internet
- Click launch instance at the right of the screen
- You should have something like this :
- Back to your instances wait until the status check of your instance is 2/2 checks passed.
STEP 2 : ALLOW TRAFFIC FOR COCKPIT
Cockpit operate on the port 9090. Our instance will need a rule to allow traffic for that port.
- Check the box next to your the instance name
- Click on the security tab down the screen
- Scroll down click on the link under security groups
- Click on edit inbout rules then Add rule
- Configure as follows :
- Type : Custom TCP
- Port range : 9090
- Source : Anywhere IPv4
- Click on Save rules
*STEP 3 : CONNECT TO YOUR INSTANCE REMOTELY *
In this step you will use PuTTY to connect to your instance remotely. PuTTY is an SSH and telnet client. You can donwload it here : https://www.putty.org/
- Do as shown in this image :
- Open PuTTY copy the public address in the Host name Field.
- To your left click on SSH and then on Auth
- Click on Browse and choose the .ppk file that was donwloaded when you created your Key pair
- Click on open
- Login as ec2-user You should get something like this :
STEP 4 : INSTALL COCKPIT INTO YOUR INSTANCE
In this step you can now install Cockpit on your Virtual machine.
- Type the following command in this order :
sudo su
apt update
apt upgrade -y
apt install cockpit -y
systemctl start cockpit
systemctl enable cockpit
passwd root
- You will need to change the password for your rootuser and confirm it
- Open your web browser and type : PublicIPofYourEC2:9090
- You should get something like this :
- Connect using root and the password you changed earlier. Specify the ip address of your instance by clicking other options under connect to.
*CONCLUSION *
Thanks to Cockpit intentionally using system APIs and commands, a whole team of admins can manage a system in the way they prefer, including the command line and utilities right alongside Cockpit.
Top comments (0)