免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 792 | 回复: 0
打印 上一主题 下一主题

lamp和apache [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-25 10:59 |只看该作者 |倒序浏览
LAMP  :   http://www.xxlinux.com/linux/article/network/server/20061108/5714.html
APACHE:  
Apache服务器的最新稳定发布版本是httpd-2.2..0,官方下载地址是:http://httpd.apache.org/download.cgi。我们通过下面的步骤来快速的搭建一个web服务器。
1、      下载源码文件httpd-2.2.0.tar.gz 到linux服务器的某个目录。
2、      解压文件 # tar zxvf httpd-2.2.0.tar.gz .
3、      配置 # ./configure –refix=/usr/local/apache //指定安装目录,以后要删除安装就只需删除这个目录。
4、      编译和安装。 # make ; make install .
5、      编写启动脚本,把它放到目录 /etc/rc.d/init.d/里,这里取名为httpd,其内容如下:
  #!/bin/bash
  #description:http server
  #chkconfig: 235 98 98
  case "$1" in
  start)
      echo "Starting Apache daemon..."
      /usr/local/apache2/bin/apachectl -k start
      ;;
  stop)
      echo "Stopping Apache daemon..."
      /usr/local/apache2/bin/apachectl -k stop
      ;;
  restart)
      echo "Restarting Apache daemon..."
      /usr/local/apache2/bin/apachectl -k restart
      ;;
  status)
      statusproc /usr/local/apache2/bin/httpd
      ;;
     
  *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
  Esac
注意:#description:http server 这一行必须加上,否则在执行命令 # chkconfig –add httpd 时会出现“service apache does not support chkconfig”的错误报告。#chkconfig: 2345 98 98 表示在执行命令 # chkconfig –add httpd 时会在目录 /etc/rc2.d/ 、/etc/rc3.d/ /etc/rc5.d 分别生成文件 S98httpd和 K98httpd。这个数字可以是别的。
6、      执行命令 # chkconfig –add httpd ,进入目录/etc/rc3.d/检查是否生成文件 S98httpd及K98httpd.
7、      启动服务 # service httpd start .

Linux联盟收集整理     
   
   
  
http://www.xxlinux.com/linux/article/network/server/20070329/8006.html


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40952/showart_327881.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP