1、基于域名www.openlab.com可以访问网站内容为welcome to openlab!!!
[C:\~]$ ssh root@192.168.72.129
Connecting to 192.168.72.129:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Wed Jul 19 18:40:27 2023 from 192.168.72.1
[root@server ~]#
[root@server ~]# yum install httpd -y
上次元数据过期检查:0:20:30 前,执行于 2023年07月21日 星期五 14时32分02秒。
依赖关系解决。
==================================================================================
软件包 架构 版本 仓库 大小
==================================================================================
安装:
httpd x86_64 2.4.57-2.el9 AppStream 50 k
安装依赖关系:
apr x86_64 1.7.0-11.el9 AppStream 123 k
apr-util x86_64 1.6.1-23.el9 AppStream 95 k
apr-util-bdb x86_64 1.6.1-23.el9 AppStream 13 k
centos-logos-httpd noarch 90.4-1.el9 AppStream 252 k
httpd-core x86_64 2.4.57-2.el9 AppStream 1.5 M
httpd-filesystem noarch 2.4.57-2.el9 AppStream 15 k
httpd-tools x86_64 2.4.57-2.el9 AppStream 84 k
安装弱的依赖:
apr-util-openssl x86_64 1.6.1-23.el9 AppStream 15 k
mod_http2 x86_64 1.15.19-4.el9 AppStream 149 k
mod_lua x86_64 2.4.57-2.el9 AppStream 62 k
事务概要
==================================================================================
安装 11 软件包
总下载:2.3 M
安装大小:6.4 M
下载软件包:
(1/11): apr-util-bdb-1.6.1-23.el9.x86_64.rpm 32 kB/s | 13 kB 00:00
(2/11): apr-1.7.0-11.el9.x86_64.rpm 243 kB/s | 123 kB 00:00
(3/11): apr-util-openssl-1.6.1-23.el9.x86_64.rpm 113 kB/s | 15 kB 00:00
(4/11): apr-util-1.6.1-23.el9.x86_64.rpm 156 kB/s | 95 kB 00:00
(5/11): httpd-2.4.57-2.el9.x86_64.rpm 348 kB/s | 50 kB 00:00
(6/11): httpd-filesystem-2.4.57-2.el9.noarch.rpm 248 kB/s | 15 kB 00:00
(7/11): centos-logos-httpd-90.4-1.el9.noarch.rpm 703 kB/s | 252 kB 00:00
(8/11): httpd-tools-2.4.57-2.el9.x86_64.rpm 366 kB/s | 84 kB 00:00
(9/11): mod_lua-2.4.57-2.el9.x86_64.rpm 517 kB/s | 62 kB 00:00
(10/11): mod_http2-1.15.19-4.el9.x86_64.rpm 507 kB/s | 149 kB 00:00
(11/11): httpd-core-2.4.57-2.el9.x86_64.rpm 678 kB/s | 1.5 MB 00:02
----------------------------------------------------------------------------------
总计 831 kB/s | 2.3 MB 00:02
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
安装 : apr-1.7.0-11.el9.x86_64 1/11
安装 : apr-util-bdb-1.6.1-23.el9.x86_64 2/11
安装 : apr-util-openssl-1.6.1-23.el9.x86_64 3/11
安装 : apr-util-1.6.1-23.el9.x86_64 4/11
安装 : httpd-tools-2.4.57-2.el9.x86_64 5/11
运行脚本: httpd-filesystem-2.4.57-2.el9.noarch 6/11
安装 : httpd-filesystem-2.4.57-2.el9.noarch 6/11
安装 : httpd-core-2.4.57-2.el9.x86_64 7/11
安装 : mod_lua-2.4.57-2.el9.x86_64 8/11
安装 : centos-logos-httpd-90.4-1.el9.noarch 9/11
安装 : mod_http2-1.15.19-4.el9.x86_64 10/11
安装 : httpd-2.4.57-2.el9.x86_64 11/11
运行脚本: httpd-2.4.57-2.el9.x86_64 11/11
验证 : apr-1.7.0-11.el9.x86_64 1/11
验证 : apr-util-1.6.1-23.el9.x86_64 2/11
验证 : apr-util-bdb-1.6.1-23.el9.x86_64 3/11
验证 : apr-util-openssl-1.6.1-23.el9.x86_64 4/11
验证 : centos-logos-httpd-90.4-1.el9.noarch 5/11
验证 : httpd-2.4.57-2.el9.x86_64 6/11
验证 : httpd-core-2.4.57-2.el9.x86_64 7/11
验证 : httpd-filesystem-2.4.57-2.el9.noarch 8/11
验证 : httpd-tools-2.4.57-2.el9.x86_64 9/11
验证 : mod_http2-1.15.19-4.el9.x86_64 10/11
验证 : mod_lua-2.4.57-2.el9.x86_64 11/11
已安装:
apr-1.7.0-11.el9.x86_64 apr-util-1.6.1-23.el9.x86_64
apr-util-bdb-1.6.1-23.el9.x86_64 apr-util-openssl-1.6.1-23.el9.x86_64
centos-logos-httpd-90.4-1.el9.noarch httpd-2.4.57-2.el9.x86_64
httpd-core-2.4.57-2.el9.x86_64 httpd-filesystem-2.4.57-2.el9.noarch
httpd-tools-2.4.57-2.el9.x86_64 mod_http2-1.15.19-4.el9.x86_64
mod_lua-2.4.57-2.el9.x86_64
完毕!
[root@server ~]#
[root@server ~]# setenforce 0
setenforce: SELinux is disabled
[root@server ~]# systemctl stop firewalld
[root@server ~]# systtemctl disable firewalld
bash: systtemctl: command not found...
Similar command is: 'systemctl'
[root@server ~]# systemctl disable firewalld
[root@server ~]# systemctl start httpd
^H[root@server ~]#
[root@server ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@server ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor prese>
Active: active (running) since Fri 2023-07-21 14:57:27 CST; 1min 17s ago
Docs: man:httpd.service(8)
Main PID: 32482 (httpd)
Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes s>
Tasks: 213 (limit: 11984)
Memory: 34.4M
CPU: 163ms
CGroup: /system.slice/httpd.service
├─32482 /usr/sbin/httpd -DFOREGROUND
lines 1-11...skipping...
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-07-21 14:57:27 CST; 1min 17s ago
Docs: man:httpd.service(8)
Main PID: 32482 (httpd)
Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec"
Tasks: 213 (limit: 11984)
Memory: 34.4M
CPU: 163ms
CGroup: /system.slice/httpd.service
├─32482 /usr/sbin/httpd -DFOREGROUND
├─32483 /usr/sbin/httpd -DFOREGROUND
├─32484 /usr/sbin/httpd -DFOREGROUND
├─32485 /usr/sbin/httpd -DFOREGROUND
└─32486 /usr/sbin/httpd -DFOREGROUND
7月 21 14:57:16 server systemd[1]: Starting The Apache HTTP Server...
7月 21 14:57:23 server httpd[32482]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192>
7月 21 14:57:27 server systemd[1]: Started The Apache HTTP Server.
7月 21 14:57:27 server httpd[32482]: Server configured, listening on: port 80
~
~
~
~
~
~
~
~
~
~
~
~
[root@server ~]#
[root@server ~]# echo "welcome to openlab.com" > /var/www/html/index.html
[root@server ~]# systemctl start httpd
[root@server ~]# vim /etc/hosts
[root@server ~]# systemctl restart httpd
[root@server ~]# echo "welcome to openlab.com" > /var/www/html/index.html
[root@server ~]# systemctl restart httpd
[root@server ~]# mkdir -p /www/openlab
[root@server ~]# systemctl restart httpd
2、给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,基于www.openlab.com/student 网站访问学生信息,www.openlab.com/data网站访问教学资料www.openlab.com/money网站访问缴费网站。
[root@server ~]# systemctl restart httpd