前言:
linux下,默认安装软件,在开发过程中会经常不知道到什么路径下找到所需的程序,因此手动安装程序对后续的使用会提供非常大的便利。在此,以安装apache为例。
一,准备
1,安装 apr
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-1.5.0.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# ./configure --prefix=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make install
2,安装 apr-util
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-util-1.5.3.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# ./configure --prefix=/work/installed/apr-util --with-apr=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make install
3,安装 pcre
下载地址:http://pcre.org/
[root@ubuntu:/work/soft/apache]# tar jxvf pcre-8.35.tar.bz2
[root@@ubuntu:/work/soft/apache/pcre-8.35]# ./configure --prefix=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make install
注意:如果在安装 pcre 时,遇到问题:configure: error: You need a C++ compiler for C++ support.
解决方法:sudo apt-get install build-essential
二,安装apache
下载地址:http://httpd.apache.org/
[root@ubuntu:/work/soft/apache]# tar jxvf httpd-2.4.9.tar.bz2
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# ./configure --prefix=/work/installed/apache --with-apr=/work/installed/apr --with-apr-util=/work/installed/apr-util --with-pcre=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make install
三,配置
1,修改配置文件
否则会出现问题:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
解决方法:
[root@ubuntu:/work/installed/apache]# sudo gedit conf/httpd.conf
把:
# ServerName www.example.com:80
改为:
ServerName localhost:80
2,启动
[root@ubuntu:/work/installed/apache]# ./bin/apachectl start
3,开机启动
打开文件:/etc/rc.local
[root@ubuntu:/]# sudo gedit /etc/rc.local
添加:/work/installed/apache/bin/apachectl start
ref :http://blog.chinaunix.net/uid-28458801-id-4211258.html
相关推荐
httpd-2.4.9.tar.bz2源码 学习apache ,学习web服务器搭建
Apache 2.4.9 Win64 找了好久才找到的
apache 2.4.9版 tar包安装源
分享一个我找到的APACHE,应该是最新的。
1)软件资源列表:《httpd-2.4.9.tar.gz》;《apr-1.5.1.tar.gz》;《apr-util-1.5.3.tar.gz》;《pcre-8.12.tar.gz》。 2)安装步骤详解:http://blog.csdn.net/clevercode/article/details/45438495。 3)欢迎...
apache 2.4.38版本,官网原版,官网下载太慢了,自己下载了好几个小时下载下来的,且用且珍惜
linux 安装 httpd apr-1.6.2.tar.gz apr-util-1.5.4.tar.gz apr-util-1.6.0.tar.gz
centos7.6下httpd的离线安装包,适用centos7.5,centos7.4,centos7.8等
apache httpd-2.4.3 安装所需的包,里面包含了: apache 安装包:httpd-2.4.3.tar.gz 依赖的包:apr-1.4.6.tar.gz、apr-util-1.4.1.tar.gz、pcre-8.20.tar.bz2
linux的httpd服务 源码安装 yum安装 制作三类虚拟主机 https加密
CentOS 7安装httpd所需RPM包
#注释这里是因为只要将解压后的apr-1.6.3,apr-util-1.6.1放到httpd-2.4.33/srclib下,用--with-included-apr指令会自动配置编译安装。 #cd /home/webapp/httpd-2.4.33/srclib/apr #./configure --prefix=/home/...
apache2 httpd 安装 一键安装,有文档说明 个人在centos上使用的
在Linux中安装HTTPD服务 Apache http Server的安装
此内容主要用于CentOS7.6、CentOS7.9操纵系统中,并且操作系统不能够链接外网无法使用yum安装httpd服务,所以只能使用离线安装包进行安装。其中步骤在实际的CentOS与服务器验证过,可能安装过程中会有问题,请根据...
Linux下安装Apache httpd.doc
主要介绍在linux环境下如何安装httpd,具有一定的参考价值
文件包含了 zabbix4.4 、httpd、php 源码包以及安装脚本,配置好 yum 源后,直接运行脚本即可完成安装。
httpd安装相关软件:包含, aprz, apr-util,zlib, pcre,openssl。安装教程:https://download.csdn.net/download/qq_15067055/10628158
编译安装httpd-2.4.251