LinuxMint17.3Rosa下安装Apache流程

来源:互联网 发布:怎么做淘宝网页 编辑:程序博客网 时间:2024/05/17 20:01

LinuxMint17.3Rosa下安装Apache流程

环境:Linux Mint 17.3 Rosa

最近在学习android,目前学到android里面的网络技术,所以,需要搭一下Apache的环境进行深入学习。

One:
在网上也看了一些教程学习,然后,自己试着去弄,弄好了。所以,把学到的东西,一来分享出来,二来往后忘记的话,在这里也能重新找到。在这里,我把Apache以及需要的东西都安装在目录/usr/local/web/下。

直接在Apache官网下载安装的过程中会缺少一些依赖的东西。
如:
1.APR
2.APR-UTIL
3.PCRE

所以,在正式安装Apache之前,先:

安装APR
APR下载地址

tar jxvf apr-1.5.2.tar.bz2cd apr-1.5.2./configure --prefix=/usr/local/web/aprmake&&make install

安装APR-UTIL
APR-UTIL下载地址

tar jxvf apr-util-1.5.4.tar.bz2cd apr-util-1.5.3./configure --prefix=/usr/local/web/apr-util --with-apr=/usr/local/web/aprmake&&make install

安装PCRE
PCRE下载地址

tar jxvf pcre-8.38.tar.bz2cd pcre-8.38./configure --prefix=/usr/local/web/pcremake&&make install

Two:

安装Apache
Apache官网

tar jxvf httpd-2.4.18.tar.bz2cd httpd-2.4.18./configure --prefix=/usr/local/web/apache --enable-shared=max --enable-module=rewire --enable-module=so --with-apr=/usr/local/web/apr --with-apr-util=/usr/local/web/apr-util --with-pcre=/usr/local/web/pcremake&&make install

Three:
配置启动:

为了解决出现问题:
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

解决方法:

cd /usr/local/web/apachesudo gedit conf/httpd.conf

找到:
ServerName www.example.com:80
改为:
ServerName localhost:80

启动

cd /usr/local/web/apache./bin/apachectl start 

OK
这里写图片描述

参考资料

linux下手动安装apache详解andyhzw-ChinaUnix博客

0 0
原创粉丝点击