编写翻译安装apache2,lamp编写翻译安装与nginx共存

作者: 金沙澳门官网网址  发布:2019-10-09

下载软件包:

lamp编写翻译安装与nginx共存

wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.33.tar.gz
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.gz
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz

 

率先必要安装apr和apr-util

01

tar xf apr-1.6.3.tar.gz 
cd apr-1.6.3/
./configure
sudo make
sudo make install

置顶处[lnmp编写翻译安装][1]的php安装在/usr/local/路线下,本篇为lamp编译安装。apache与nginx共存,适用于apache的php安装在/usr/下

 安装apr-util:

02

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

apache安装

sudo make

03

sudo make install

依据七个包apr,apr-util,财富都在apache官方网址下。

那三个必备,借使非常不够任何的依赖,请自行百度

04

安装apr-util的,在编写翻译的时候报错:

1.apr

xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

05

减轻方式:

tar xf apr-1.4.6.tar.bz2

sudo apt-get install libexpat1-dev

06

 

cd apr-1.4.6

还可能有其余依赖:

07

1,pcre

sudo ./configure --help | less             (能够查阅扶助文件)

sudo apt-get install libpcre3 libpcre3-dev

08

 

sudo ./configure --prefix=/usr/local/apr  (指定安装路线)

2,openssl

09

sudo apt-get install openssl libssl-dev

sudo make

 

10

3,zlib

sudo make install

sudo apt-get install zlib1g-dev

11

 

 

编译apache

12

./configure 
--prefix=/usr/local/httpd24 
--sysconfdir=/etc/httpd24 
--enable-so 
--enable-ssl 
--enable-cgi 
--enable-rewrite 
--with-zlib 
--with-pcre 
--with-mpm=prefork 
--enable-modules=most 
--enable-mpms-shared=all  

2.apr-util

最后make makeinstall

13

 

tar xf apr-util-1.5.2.tar.bz2

root@dev:~# /usr/local/httpd24/bin/apachectl start
root@dev:~# ps -ef | grep httpd
root     24411 17534  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
daemon   24412 24411  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
daemon   24413 24411  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
daemon   24414 24411  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
daemon   24415 24411  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
daemon   24416 24411  0 06:15 ?        00:00:00 /usr/local/httpd24/bin/httpd -k start
root     24418 24367  0 06:15 pts/19   00:00:00 grep --color=auto httpd

14

修改配置文件( vim /etc/httpd24/httpd.conf )

 cd apr-util-1.5.2

ServerName 127.0.0.1

15

DocumentRoot 前边钦命二个网址根目录 

 sudo ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

16

(--prefix指虞升卿装路线;--with-apr内定apr的安装路径,apr-util正视于apr)

17

sudo  make && make install

18

 

19

3.appache

20

始于编写翻译

21

tar xf httpd-2.4.4.tar.bz2

22

cd httpd-2.4.4

23

sudo ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mods-shared=most --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-mpms-shared=all --with-mpm=event

24

--sysconfdir=/etc/httpd  :钦点布署文件安装地方

25

--enable-so              :援助动态分享模块若无这些模块PHP将不能与apache结合专门的学业

26

--enable-ssl             :启用帮忙ssl

27

--enable-cgi             :支持cgi

28

--enable-rewrite         :支持URL重写

29

 --with-zlib             :压缩库,在互联英特网传来时可节省带宽

30

--with-apr=/usr/local/apr :指定apr路径

31

--with-apr-util=/usr/local/apr-util :指定apr-util路径

32

本文由金沙澳门官网发布于金沙澳门官网网址,转载请注明出处:编写翻译安装apache2,lamp编写翻译安装与nginx共存

关键词: 金沙澳门官网

上一篇:Kafka集群部署
下一篇:没有了