为什么80%的码农都做不了架构师?>>>   

BerkeleyDB

./dist/configure --prefix=/usr/local/BerkeleyDB --enable-dbm --enable-share
make
make install

安装完成后,需要将 BerkeleyDB 的动态库,写入 /etc/ld.so.conf,否则有的程序找不到 BerkeleyDB 相应的动态库

echo "/usr/local/BerkeleyDB/lib" > /etc/ld.so.conf
ldconfig

Apr

安装 apache http server 和 apr-util,需要依赖于 apr。

./configure --prefix=/usr/local/apr
make
make install

Apr-util

安装 apache http server,需要依赖于 apr-util

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-berkeley-db=/usr/local/BerkeleyDB
make
make install

Cronolog

apache 日志自动切割工具,可以减小 apache 日志文件大小,提高读写效率

./configure --prefix=/usr/local/cronolog
make
make install

Apache HTTP Server 安装

./configure --prefix=/usr/local/apache --with-port=8080 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-shared=max --enable-deflate --disable-authn-user --enable-cache--enable-file-cache  --enable-cache-disk --enable-mime-magic --enable-expires --enable-remoteip --enable-static-support --enable-static-htpasswd --enable-info
make
make install

Apache HTTP Server 参数设置

ff

Apache HTTP Server service 脚本

将以下内容,写入脚本:/etc/init.d/httpd

#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible
#              server implementing the current HTTP standards.
# processname: httpd
# config: /usr/local/apache/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Short-Description: start and stop Apache HTTP Server
# Description: The Apache HTTP Server is an extensible server
#  implementing the current HTTP standards.
### END INIT INFO# Source function library.
. /etc/rc.d/init.d/functionsif [ -f /etc/sysconfig/httpd ]; then. /etc/sysconfig/httpd
fi# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.# Path to the apachectl script, server binary, and short-form for messages.
APACHE_HOME=/usr/local/apache
apachectl=${APACHE_HOME}"/bin/apachectl"
httpd=${HTTPD-${APACHE_HOME}"/bin/httpd"}
PROG=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}STOP_TIMEOUT=${STOP_TIMEOUT-10}
RETVAL=0# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {echo -n $"Starting $PROG: "LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONSRETVAL=$?echo[ $RETVAL = 0 ] && touch ${lockfile}return $RETVAL
}reload() {echo -n $"Reloading $PROG: "if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; thenRETVAL=6echo $"not reloading due to configuration syntax error"failure $"not reloading $httpd due to configuration syntax error"else# Force LSB behaviour from killprocLSB=1 killproc -p ${pidfile} $httpd -HUPRETVAL=$?if [ $RETVAL -eq 7 ]; thenfailure $"httpd shutdown"fifiecho
}# When stopping httpd, a delay (of default 10 second) is required
# before SIGKILLing the httpd parent; this gives enough time for the
# httpd parent to SIGKILL any errant children.
stop() {echo -n $"Stopping $PROG: "killproc -p ${pidfile} -d ${STOP_TIMEOUT} $httpdRETVAL=$?echo[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}case "$1" instart)start;;force-reload|reload)reload;;restart)stopstart;;stop)stop;;status)status -p ${pidfile} $httpdRETVAL=$?;;condrestart|try-restart)if status -p ${pidfile} $httpd > &/dev/null; thenstopstartfi;;graceful|help|configtest|fullstatus)$apachectl $@RETVAL=$?;;*)echo $"Usage: $PROG {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|configtest|help}"RETVAL=2
esacexit $RETVAL

chmod +x /etc/init.d/httpd

Apache HTTP Server 开机自启动

chkconfig --add httpd
chkconfig --level 235 httpd on

转载于:https://my.oschina.net/eduosi/blog/269169

Apache 编译安装相关推荐

  1. 查看nginx php mysql apache编译安装参数

    纯记录 参考链接 http://www.itlearner.com/article/4554 http://bbs.chinaunix.net/thread-926713-1-1.html 查看php ...

  2. Linux apache编译安装

    Linux apache编译安装 1.下载httpd-2.2.15.tar.gz wget  http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.17.t ...

  3. apache 编译安装php mysql_编译安装APACHE+PHP+MYSQL

    adminjun qq:279872 网络技术研究会群:8070045 中国linux公社论坛群:4478487 其实这是我用RouterOS和redhat linux进行pppoe服务器的配置及在r ...

  4. linux apr文件解压失败,Apache编译安装提示configure: error: APR not found错误解决方法...

    在配置Apache的时候,出现configure: error: APR not found错误 原因是缺少一些依赖包,安装这些依赖包就行了 下载依赖包,注意我这里下载的与参考链接上的有些不同,安装上 ...

  5. 末学者笔记--apache编译安装及LAMP架构上线

    apache介绍 一.Apache的三种工作模式 Apache一共有3种稳定的MPM模式(多进程处理模块),它们分别是prefork.worker.event.http-2.2版本的httpd默认的m ...

  6. linux 安装apache apu,Apache编译安装

    环境信息: 主机1:dns-ftpcentos6.5提供dns解析和yum源码ftp等192.168.200.254 主机2:www.leslie.comcentos6.5架设网站192.168.20 ...

  7. centos 7.1 apache 源码编译安装

    Apache编译安装 一,需要软件: http://mirrors.cnnic.cn/apache//apr/apr-1.5.2.tar.gz 1.apr-1.5.2.tar.gz http://mi ...

  8. linux 安装so,linux下apache的安装及so文件的编译

    apache编译安装 需要修改一个文件 vi /usr/local/apache2/build/libtool build_libtool_libs=no build_libtool_libs=yes ...

  9. LAMP 全功能编译安装 for CentOS6.3笔记(更新)

    最近抽空在虚拟机上测试成功了LAMP各个最新版本的整合编译安装,算是把之前的博文整合精简,以下内容均在CENTOS6.3(安装minimal desktop和默认开发包)下测试安装成功,并做了相应优化 ...

最新文章

  1. 图文详解南方CASS 7.1简体中文版
  2. 整数、浮点数在计算机中的存储,-128二进制怎么表示,
  3. idc机房建设费用_idc机房服务器带宽租用费用
  4. Nunit-Writing Tests
  5. 大规模Schedule任务实现方案
  6. MITRE 发布防御知识库 Shield
  7. OpenCart多图片拖放式上传管理器
  8. 数据结构上机实践第14周项目2 - 二叉树排序树中查找的路径
  9. 【数学逻辑思维】A 好玩的数独游戏——002
  10. matlab时域频域信号特征提取资料整合
  11. 研究生能合作发表论文吗?
  12. Magento清空购物车
  13. 知道创宇入选第九届CNCERT国家级网络安全应急服务支撑单位
  14. 《点石成金》 思维导图
  15. 成都Java培训班帮你分析如何通过企业面试
  16. 关于echarts中格式化lengend标注问题
  17. Map.Entry与entrySet与entry,getKey()与entry.getValue()的用法
  18. 334. 递增的三元子序列 increasingTriplet
  19. raspberry树莓派 -- CAN收发 - waveshare微雪
  20. 大三SE计组II开火车问题答案整理(第六章 自用

热门文章

  1. ISA2006实战系列之三:防火墙策略部署深度分析(附图)
  2. 你是否真的了解全局解析锁(GIL)
  3. 肯尼亚政府部署RFID系统进行车辆识别登记
  4. 金融科技公司采用大数据领先银行的三种方式
  5. 如何快速实现物联网行业中的实名认证
  6. ant 的 copy 使用
  7. php和js中,utf-8编码转成base64编码
  8. 【树莓派 Raspberry-Pi 】系统安装及一些必要的配置
  9. javascript 生成一个一亿长度的随机数组,从中排列出最大的1000个项;
  10. vim-addon-manager install youcompleteme