Conteúdo do Curso
Introduction to Cloud Computing
Introduction to Cloud Computing
Basics of Working with EC2 Instance
Let's start working with the instance. As you may have understood from the previous chapter, all the work with the instance will happen in the Linux system, and we will manage it through the console. We'll manage the instance using the bash language, which you can also use to control your computer.
Let's take a look at the list of basic navigation commands in bash to understand what we'll be doing next:
Installation of Updates and Programs
First, we need to make sure that all the necessary updates are installed on the system. We'll do this using the following command:
After executing this command, the system will start automatically updating and installing the necessary components:
As you can see, in my case, there was nothing to download, and everything was already installed. However, it is highly recommended that this command be used during the initial instance setup to avoid future errors.
Since we own this instance and have the right to do whatever we want with it, we can confidently switch to the root user.
To switch to superuser mode, use the command sudo su
.
Now, we can try out some commands on our instance.
For example, let's create a folder named test_folder
. Inside this folder, we'll create a file named README.txt
and write "This is an EC2 instance!" in it.
Our commands will look like this:
mkdir test_folder
- Create a folder with the desired name;cd test_folder/
- Navigate to the folder we just created;touch README.txt
- Create a file with the desired name and extension;echo "This is an EC2 instance!" > README.txt
- Write the desired text to the corresponding file;cat README.txt
- Display the contents of the text file we created.
As a result, the following will be printed to the console:
Thus, we can manage our instance through the console.
You're probably interested in something completely different, and you want to host a website on your EC2 instance, right?
Don't worry; in the next chapter, we'll host our portfolio website on the instance and access it via a link. This will be your first fully-fledged website hosted in the cloud on an Amazon server!
Obrigado pelo seu feedback!