任务1:画出vmware workstation的三种网络连接模式图,并给三个不同模式的网卡配置相应的ip参数并远程连接,测试哪种网络模式可以上网。 任务2:搭建一个基于https://www.zuoye.com:22222访问的web网站,网站首页在/www/https/,内容为zuoye
任务1:
NAT模式:
NAT模式下的网络连接模式图 通过此命令来查看当前网卡的配置信息
[root@localhost ~]
远程连接上虚拟机并能访问外网上网通信
仅主机模式
仅主机模式的网络连接图 仅主机模式下也是通过DHCP自动获取地址 但不能访问外网
桥接模式
桥接模式下的网络连接图 进入该配置进行配置IP参数信息
[root@localhost ~]
任务2:
搭建一个基于https://www.zuoye.com:22222访问的web网站,网站首页在/www/https/,内容为zuoye
步骤:
1.安装密码保护软件包
[root@localhost ~]
2.进入证书目录,创建密匙密码,
[root@localhost ~]
[root@localhost certs]
Generating RSA private key, 2048 bit long modulus (2 primes)
.+++++
............................................................................................................................................................+++++
e is 65537 (0x010001)
Enter pass phrase:
Verifying - Enter pass phrase:
3.创建安全证书
[root@localhost certs]
Enter pass phrase for openlab.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:xa
State or Province Name (full name) []:xa
Locality Name (eg, city) [Default City]:xa
Organization Name (eg, company) [Default Company Ltd]:xa
Organizational Unit Name (eg, section) []:xa
Common Name (eg, your name or your server's hostname) []:xian
Email Address []:admin@haha.com
[root@localhost certs]
[root@localhost certs]
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
4.进入http子配置文件配置网页信息
[root@localhost ~]
<VirtualHost 192.168.223.128:443>
ServerName 192.168.223.128
DocumentRoot /www/https
SSLEngine 'on'
SSLCertificateFile /etc/pki/tls/certs/openlab.crt
SSLCertificateKeyFile /etc/pki/tls/certs/openlab.key
</VirtualHost>
<Directory /www/https>
AllowOverride none
Require all granted
</Directory>
~
5.访问该网站信息显示 任务完成
|