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