文件名称:Linux操作系统实验四.doc
文件大小:1.11MB
文件格式:DOC
更新时间:2021-03-13 09:53:32
linux linux操作系统 大学实验 计算机系 一、 实验目的 1、通过实验了解和熟悉Linux网络服务; 2、掌握Linux下建立Web服务器; 3、掌握Linux下建立FTP服务器。 二、 开发工具和运行环境 1、虚拟机VMware 2、Linux操作系统 三、 实验内容 1、了解和熟悉Linux网络服务 了解NFS网络文件系统,NFS网络文件系统架设及挂载方法,Web服务器的架设方法,FTP服务器的架设方法及访问方法,Samba服务器的架设方法。 2、Linux下建立Web服务器 (1)Apache 服务器的安装及启动 ●检测与安装 Apache rpm -qa | grep httpd ●如果没有检测到软件包,需要进行安装,在安装目录中,执行如下命令: rpm -ivh httpd-tools*. Rpm rpm -ivh mailcap-2.1.31-2.el6.noarch.rpm rpm - ivh httpd-2*. rpm rpm -ivh httpd-manual-2.*.rpm ●重新启动/停止/启动Apache服务: systemctl restart/stop/start httpd.service 或service httpd restart/stop/start ●查看 Apache服务器的运行状态: systemctl status httpd. service 或service httpd status ●测试 Apache服务器运行状态: 在图形界面打开火狐浏览器输入http://127. 0.0.1呈现测试页(CentOS 用户可以在终端使用lynx 浏览器打开,如没有安装,则使用rpm在光盘中安装lynx 浏览器) 在/var/www/html目录下创建test. html页面,使用vi编辑保存内容,重启apache服务 在火狐浏览器输入http://127. 0. 0.1/test. html查看test. html内容 (2)Apache 服务器的配置 Apache主要配置文件为httpd.conf,存储位置在/etc/httpd/conf目录下 (3)个人Web站点配置 RedHat方式: a:修改配置文件,使用vi编辑器修改主配置文件 /etc/httpd/conf/httpd. conf,修改如下配置,去掉原文中的注释符号