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. p>
At this point, the firewall could not be installed. p> ``` $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. p> ``` $sudo ufw status Status:Inactive ```
Is the firewall installed? So p>
Try to enable it. p> ``` $sudo ufw enable The firewall is active and enabled at system startup. ```
Let's check the status. p> ``` $sudo ufw status Status:Active ```
This completes the firewall settings. p>
In this case, open port 22. p>
If successful p> ``` Added rules Added rules(v6) ``` You will see the notation
. p>
3. p>
If you get the following error span> p>
```
E:Lock~
```
Delete the target file referring to the following span> p>
https://qiita.com/jizo/items/9496496a3156dd39d91a https://ankyo.blog.ss-blog.jp/2011-10-25 This is no good ... p>
Possibly there was a problem with the last shutdown, p>
Restart Ubuntu. p>
This worked p>
```
Do you want to continue? [Y/n]
$ Y
```
This completes the Apache installation.
Let's check if the server is started. p>
If the initial Ubuntu page is displayed, it is successful. p>
First, check the IP address here p>
It's hard to understand, but it is displayed in the following place. p>
https://linuxfan.info/ip-address IP address span> in the address bar ... p>
You're done here. p>
If you leave it as it is, it may be attacked, so stop Apache once. p>
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) If it is not displayed, there should be no problem. p>
Recommended Posts
6. Confirmation h1>
$Ip a
$service apache2 stop