Hi, I'm a pig guy. I had a PC with Ubuntu at home, but I didn't use it at all. We will build the server.
First, we will update.
At this point, the firewall could not be installed. ``` $apt install ufw $sudo apt install ufw $sudo apt-get install uff ```
If the above does not work, check the firewall status with the following command. ``` $sudo ufw status Status:Inactive ```
Is the firewall installed? So
Try to enable it. ``` $sudo ufw enable The firewall is active and enabled at system startup. ```
Let's check the status. ``` $sudo ufw status Status:Active ```
This completes the firewall settings.
In this case, open port 22.
If successful ``` Added rules Added rules(v6) ``` You will see the notation
.
3.
If you get the following error ``` E:Lock~ ```
Delete the target file referring to the following
https://qiita.com/jizo/items/9496496a3156dd39d91a
https://ankyo.blog.ss-blog.jp/2011-10-25
This is no good ...
Possibly there was a problem with the last shutdown,
Restart Ubuntu.
This worked ``` Do you want to continue? [Y/n] $ Y ``` This completes the Apache installation.
Let's check if the server is started.
If the initial Ubuntu page is displayed, it is successful.
First, check the IP address here
$Ip a
It's hard to understand, but it is displayed in the following place.
https://linuxfan.info/ip-address
If you enter IP address in the address bar ...
You're done here.
If you leave it as it is, it may be attacked, so stop Apache once. It's just for learning purposes.
(My acquaintance also self-taught and built a server and received some kind of attack.
Some security measures may be required)
$service apache2 stop
If it is not displayed, there should be no problem.
Recommended Posts