I decided to use Linux for business I don't know what to study from I posted it so that people can see it. If you have any questions, please comment. I will edit it as appropriate!
There is an environment where you can operate Linux freely. There are many articles about OS installation, so I will omit it. (It is recommended to build it on the cloud rather than at home.)
I think this is the best way to learn about Linux.
--General user (user who can execute only limited commands) Login with saito --Confirm that you can log in as a saito user
$ id
uid=1000(saito) gid=1000(saito) groups=1000(saito)
Supplement: When there is no general user who can operate
# useradd saito
# passwd saito
(Any PW is OK. There is no output on the screen, so enter it twice.)
--Switch to root user
The prompt changes from $ to #.
$ su -
Password: (Enter root PW)
#
# id
uid=0(root) gid=0(root) groups=0(root)
--Check if the required packages are installed on the web server
If you think of a package as software, it's OK. This time, Apache (httpd) is assumed. If you do the following and there is no output, you know that you have not installed it.
# rpm -qa | grep httpd
Note: How to install httpd I will post the difference between rpm and yum if I have a chance.
# rpm -ivh httpd*
Or
# yum -y install httpd
--Open your browser and try to access it
Enter "http: // localhost" in the URL of the browser and execute. I get an error because the HTTP service has not started.
--Check and start HTTP service status
# systemctl status httpd
:
Active: inactive (dead)
:
# systemctl start httpd
:
Active: active (running)
:
--Open your browser and try accessing it again
If you update with the F5 key on the browser, a test page will be output.
Bonus: Create your own HTML file
# vi index.html
--from here--
<html>
<head>
<title>Test Page</title>
</head>
<body bgcolor=skyblue>
<h1>hello world</h1>
</body>
</html>
--So far--
--Check the created HTML
# ls
(index.Make sure you have html)
# cat index.html
(If you need to edit, vi index.html)
--Copy and check the created HTML file
# cp index.html /var/www/html
# ls /var/www/html
-Open your browser and try accessing it again You can check the HTML you created!
By building a web server --Login --User switching --File operation --File editing --Package management --Service startup -(Process) You can learn a lot of things.
Recommended Posts