构建httpd网站服务器

构建httpd网站服务器

 需要描述:
编译安装httpd服务器,要求支持动态模块扩展、地址重写、多字符集
网站名称设置为www.bdqn.com默认首页设置为index.html和index.php
将/usr/share/dco/HTML/zh-CN目录下的index.html复制到网站根目录下并改名为redhat
在浏览器中分别访问http://www.bdqn.com/redhat与http://www.bdqn.com
 推荐步骤:
1、 安装DNS
2、 编译安装httpd软件包
3、配置并启动httpd服务器
一、配置DNS
(1)卸载yum源根目录及挂载光盘
构建httpd网站服务器
(2)安装工具
构建httpd网站服务器
(3)配置DNS主配置文件
构建httpd网站服务器
构建httpd网站服务器
(4)检查是否报错
构建httpd网站服务器
(5)配置正向区域解析文件
构建httpd网站服务器
(6)修改权限
构建httpd网站服务器
(7)检测正向解析是否错误及配置开机自启
构建httpd网站服务器
二、编译安装httpd服务器
(1)卸载光盘
构建httpd网站服务器
(2)安装新的光盘镜像
构建httpd网站服务器
(3)把光盘挂载到mnt目录下
构建httpd网站服务器
(4)拷贝httpsd-2.2.17到所有程序目录下 /usr/src/
构建httpd网站服务器
(5)解压缩源文件到当前目录
构建httpd网站服务器
(6)解压完成并切换到展开后的源代码目录中
构建httpd网站服务器
(7)–prefix:指定将httpd程序安装到哪个目录
–enable-so:加载一下动态模块
–enable-rewrite:地址重写功能
–enable-chrset-lite:支持更多的字符支持
–enable-cgi:脚本
构建httpd网站服务器
(8)编译及安装apache
构建httpd网站服务器
(9)确认安装结果
构建httpd网站服务器
构建httpd网站服务器
(10)优化执行路径及查看
构建httpd网站服务器
三、配置并启动htpd服务器
(1)添加apache系统服务和执行权限
构建httpd网站服务器
(2)修改apache服务
构建httpd网站服务器
构建httpd网站服务器
(3)添加系统服务
构建httpd网站服务器
(4)设置服务的开机自动启动
构建httpd网站服务器
(5)查看httpd服务的自动启动状态
构建httpd网站服务器
(6)检查apache服务配置文件是否有错误
构建httpd网站服务器
(7)启动httpd服务 stop关闭服务
构建httpd网站服务器
(8)网站名称设置为www.bdqn
构建httpd网站服务器
构建httpd网站服务器
构建httpd网站服务器
(9)客户端配置IP地址访问
构建httpd网站服务器
(10)创建网站根目录
构建httpd网站服务器
(11)将www.bdqn.com放到网站根目录下并查看
构建httpd网站服务器
(12)修改网络主页面的根目录及权限
构建httpd网站服务器
构建httpd网站服务器
构建httpd网站服务器
构建httpd网站服务器
(13)把index.html复制到网站目录下并改名为redhat
构建httpd网站服务器
(14)访问
构建httpd网站服务器