master
artemdolgiy 2021-10-09 16:27:29 +03:00
parent 44dbccc33c
commit bc817a75da
2 changed files with 50 additions and 13 deletions

View File

@ -2,18 +2,59 @@
*** ***
**Для выполнения лабораторных работ потребуется настроить 2 виртуальных хоста**
server1 - 192.168.10.10
user: student
password: student
root password: redhat
server2 - 192.168.10.11
user: student
password: student
root password: redhat
Дополнительно необходимо:
*SERVER1*
1. Установить httpd
```bash
[student@server2 ~]$ sudo -i
[sudo] пароль для student:
[root@server2 ~]# yum install httpd -y
[root@server2 ~]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@server2 ~]# echo "This is SERVER2 WEB-SERVER" > /var/www/html/index.html
[root@server2 ~]# firewall-cmd --add-service=http
success
[root@server2 ~]# firewall-cmd --add-service=http --permanent
success
[root@server2 ~]# mkdir /test
[root@server2 ~]# echo "This is the html file for the SELinux final lab on SERVER2." > /test/lab.html
[root@server2 ~]# mv /test/lab.html /var/www/html/
[root@server2 ~]# ls -lZ /var/www/html/
итого 8
-rw-r--r--. 1 root root unconfined_u:object_r:httpd_sys_content_t:s0 27 окт 9 16:03 index.html
-rw-r--r--. 1 root root unconfined_u:object_r:default_t:s0 60 окт 9 16:07 lab.html
[root@server2 ~]# rmdir /test/
[root@server2 ~]# curl http://server2/index.html
This is SERVER2 WEB-SERVER
[root@server2 ~]# curl http://server2/lab.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
```
***
###### top ###### top
*лабораторные работы начинаются в 3-й главы* *лабораторные работы начинаются в 3-й главы*
***server1 - 192.168.10.10 ***
user: student
password: student
root password: redhat***
***server2 - 192.168.10.11
user: student
password: student
root password: redhat***
3. [Управление локальными пользователями и группами.](#chapter3) 3. [Управление локальными пользователями и группами.](#chapter3)
4. [Управление доступом к файлам.](#chapter4) 4. [Управление доступом к файлам.](#chapter4)

View File

@ -1,4 +0,0 @@
<span style="color:blue">some *This is Blue italic.* text</span>
<span style="color:red">some **This is Red Bold.** text</span>