apache安装
来源:互联网 发布:网络市场推广方案 编辑:程序博客网 时间:2024/05/29 13:27
1.下载安装包:
httpd http://httpd.apache.org/
2.下载依赖包:
apr http://apr.apache.org/
apr-util http://apr.apache.org/
pcre http://www.pcre.org/
3.解压安装:先安装依赖包
apr:
拷贝文件到任意目录下
gzip-d xxx.gz
tar-xvf xxx.tar
cdxxx
./configure
make
make install
安装完成以后会在/usr/local下有apr目录
apr-util:
(前同apr)
./configure --with-apr=/usr/local/apr
安装完成以后会把文件拷贝到usr/local/apt/lib/中
pcre:
unzip-d xxx.zip
./configure--prefix=/usr/local/pcre
make
make install
这里依赖c++运行库,安装的时候发现缺少可以用apt-get install g++,apt-get install gcc, 在configure阶段如果缺少包会被提示
4.解压安装apache
同apr,任意一个路径解压了,然后安装
安装以后默认目录在/usr/local/apache2/
5.配置apache
在apache2/conf/httpd.conf可以配置apache的参数
6.启动
如果机器没有注册域名, 请把配置文件中的#ServerName localhost:80这解开注释
apache2/bin/apachectl-k start
还有别的指令可以直接apachectl -k获得帮助
或者使用这个命令重启service httpd restart
(在启动的时候可能会遇到找不到share lib的情况,运行ldconfig这个命令更新一下动态链接库即可,其配置文件在:/etc/ld.so.conf)
- Apache安装图解 Apache
- 安装apache
- 安装Apache
- apache安装
- Apache安装
- apache 安装
- 安装Apache
- 安装apache
- 安装Apache
- 安装Apache
- apache 安装
- 安装apache
- apache安装
- 安装 Apache
- apache安装
- apache安装
- 安装Apache
- 安装apache
- UVa 674 - Coin Change 动态规划入门
- 字符串匹配算法之KMP
- apache 不能使用本机IP访问的解决办法
- ubuntu环境下C编程小例
- 2012国信蓝桥初赛试题
- apache安装
- 博客地址搬家-》http://itedge.sinaapp.com
- Json解析详解
- 一道C语言面试题printf输出问题,高手们都来看看吧
- 美团云计算方面面试题
- [Windows] 4k对齐(无损对齐) [ 技术分享 ]
- 用Eclipse把.java文件打包成.jar文件
- Linux下C语言中调用其他程序的办法
- [Linux] 查看硬盘是否4K对齐 [ 技术分享,知识分享 ]