apache安装、配置、启动及添加服务

apache安装、配置、启动及添加服务

ID:8805459

大小:14.85 KB

页数:3页

时间:2018-04-08

apache安装、配置、启动及添加服务_第1页
apache安装、配置、启动及添加服务_第2页
apache安装、配置、启动及添加服务_第3页
资源描述:

《apache安装、配置、启动及添加服务》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、Apache安装、配置、启动及添加服务1安装下载:httpd-2.4.1.zipapr-1.4.5.tar.gzapr-util-1.3.12.tar.gzpcre-8.10.zip编译:unziphttpd-2.4.1.zipcdhttpd-2.4.1./configure--prefix=/usr/local/apache--enable-so异常:添加可执行权限:chmod+x*.sh安装依赖软件包:yum-yinstallgcc;yum-yinstallgcc+gcc-c++(1)解决aprnotfound问题tar-zxfapr-1.4.5.tar.gzcdapr-1.4

2、.5./configure--prefix=/usr/local/aprmake&&makeinstall(2)解决APR-utilnotfound问题tar-zxfapr-util-1.3.12.tar.gzcdapr-util-1.3.12./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr/bin/apr-1-configmake&&makeinstall(3)解决pcre问题unzippcre-8.10.zipcdpcre-8.10/configure--prefix=/usr/local/pcre

3、make&&makeinstall再次编译Apache时加上:--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre即:./configure--prefix=/usr/local/apache--enable-so--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre最后安装:make&&makeinstall(4)遇到usr/bin/ld:.

4、libs/pcrecpp.o:relocationR_X86_64_32Sagainst`.bss'cannotbeusedwhenmakingasharedobject;recompilewith-fPIC.libs/pcrecpp.o:couldnotreadsymbols:Badvaluecollect2:ldreturned1exitstatusmake[1]:***[libpcrecpp.la]错误1make[1]:Leavingdirectory`/usr/app/pcre-8.00'make:***[all]错误2解决办法:./configure--disable-s

5、hared--with-pic再次安装:make&&makeinstall2启动cd/usr/local/apache/bin./apachectlstart异常:(1)httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname进入安装目:cd/usr/local/apache/conf,编辑httpd.conf文件,搜索“#ServerName”,添加ServerNamelocalhost:80,再重新启动即可:/usr/local/apache/bin/apachectlrestart;(2)Addres

6、salreadyinuse:AH00072:make_sock:couldnotbindtoaddress0.0.0.0:80netstat-lnp

7、grep80,发现已经有进程占用80端口,kill掉,再启动Apache;3验证在IE中打开localhostIP。此刻显示的网页是对应Apache安装目录/usr/local/apache/htdocs下的index.html页面,此页面可以自定义编辑;4为Apache添加service以apachectl脚本为模板生成Apache服务控制脚本:grep-v"#"/usr/local/apache/bin/apachectl>/et

8、c/init.d/apache编辑Apache服务控制脚本/etc/init.d/apache:vi/etc/init.d/apache在文件最前面插入下面的行,使其支持chkconfig命令:  #!/bin/sh#chkconfig:23458515#description:ApacheisaWorldWideWebserver.保存后退出vi编辑器,执行下面的命令增加Apache服务控制脚本执行权限:chmod+x/etc/init.d/apache执行下面的命

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。