当前位置:千优问>常见问答>linux红帽子服务器安装教程

linux红帽子服务器安装教程

2023-01-03 15:18:17 编辑:join 浏览量:608

linux红帽子服务器安装教程

linux红帽子服务器安装教程

在网络服务中,web服务在人们生活中是必不可少的;人们每天在网站上浏览网页,获取最新的讯息,作为一个交互平台web服务是如何实现的呢?当然离不了我们的网站服务器,学了两天,有一些心得分享给大家!1,基于apache的web服务器基础搭建:(1)实验环境:一台ip为192.168.10.10的rhel5.9主机作为web服务器,一台ip为192.168.10.15的win7主机作为测试机(2)查看服务主机软件是否安装[root@ser1 ~]# rpm -q httpd httpd-manual httpd-develpackage httpd is not installedpackage httpd-manual is not installedpackage httpd-devel is not installed(3)安装软件包[root@ser1 ~]# yum install -y httpd httpd-manual httpd-devel(4)启动服务[root@ser1 ~]# service httpd start启动httpd: [确定][root@ser1 ~]# chkconfig httpd on(5)在win7上测试,无网页缺省下显示红帽测试页<报错页面存放位置/var/www/error/noindex.html>(6)打开配置文件[root@ser1 ~]# vim /etc/httpd/conf/httpd.conf可获得以下重要字段:目录设置: .. .. 访问位置设置: .. .. 虚拟主机设置: .. .. 常用的全局设置参数:ServerName本站点的FQDN名称DocumentRoot网页文档的根目录:缺省/var/www/html/DirectoryIndex默认索引页/首页文件:一般设为index.html index.phpErrorLog错误日志文件的位置CustomLog 访问日志文件的位置Listen 监听服务的IP地址、端口号ServerRoot 服务目录:/etc/httpd/Timeout网络连接超时,默认 300 秒KeepAlive是否保持连接,可选On或OffMaxKeepAliveRequests每次连接最多处理的请求数KeepAliveTimeout保持连接的超时时限Include 可包含其他子配置文件: /etc/httpd/conf.d/(7)创建测试网页[root@ser1 ~]# vim /var/www/html/index.html

This is a test page !!!

~(8)win7下测试,主页变为测试网页

标签:linux,红帽子,教程