个人总结Linux centos7 下载Apache 出现的问题总结
目前时间2020年4月24日,使用Linux安装apache。
1,yum安装:
简单粗暴省心少报错(搞完压缩包安装再用yum,我哭了@……@)
yum install httpd* -y
2,压缩包安装:
使用到的镜像网站:http://mirror.bit.edu.cn/apache/httpd/
https://mirrors.tuna.tsinghua.edu.cn/apache//apr/
[code]使用码源安装: 下载压缩包: wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.43.tar.gz
解压: tar –xvf httpd-2.4.43.tar.gz
进入目录: cd httpd-2.4.43
创建目录: mkdir /usr/local/ apache2
安装:./configure --prefix=/usr/local/apache2/
这里有报错缺少依赖包,configure: error: APR not found. Please read the documentation.
下载apr码源:wget https://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.5.tar.gz
解压:tar -xvf apr-1.6.5.tar.gz
[code]cd apr-1.6.5
[code]mkdir /usr/local/apr
[code]./configure --prefix=/usr/local/apr
在这里出了一个报错:-bash: ./configure: No such file or directory
原因是 为找到目录 解决 find -name configure 再次进入 cd /apr-1.6.5/
[root@TestServer apr-1.6.5]# ./configure --prefix=/usr/local/apr
make &&make install
再次安装仍有报错configure: error: APR-util not found. Please read the documentation.
安装apr-util
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
tar apr-util-1.6.1.tar.gz
mkdir /usr/local/apr-util
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make &&make install
一个报错configure: error: APR could not be located. Please use the --with-apr option. 要加上--with-apr=/usr/local/apr
出现一个报错:xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
解决:
yum install expat-devel
安装
yum -y install gcc
yum -y install openssl
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install bzip2
yum -y install bzip2-devel
再次安装:
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
[root@TestServer httpd-2.4.43]# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
Server Version: 2.4.43
Install prefix: /usr/local/apache2
C compiler: gcc -std=gnu99
CFLAGS: -g -O2 -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
----------------------------------------------------------------------------------------------------------------------------------------------------------
make &&make install
-----------------------------------------------------------------------------------------------------------------------------------------------------------
-bash: httpd: command not found 路径PATH未设置
PATH=$PATH:/usr/local/apache2/bin
永久更改 vim /etc/profile 里面加上 PATH=$PATH:/usr/local/apache2/bin 即可。
查看是否安装成功:httpd -t
- apache服务出现Forbidden 403问题的解决方法总结
- apache服务出现Forbidden 403问题的解决方法总结
- Apache服务出现Forbidden 403的问题总结
- apache服务出现Forbidden 403问题的解决方法总结
- 关于keil下载时出现Verify Failed! 问题的总结
- 导入网上下载的Android Studio项目出现的问题及解决方案总结:
- 关于apache上的CGI文件问题总结--为什么无法找到cgi文件、为什么找到了cgi文件却不执行反而询问是否下载或直接显示文件代码
- apache的org.apache.commons.net包 下载文件问题总结
- Mandriva 2007的下载地址以及安装中可能出现问题的解决办法
- 使用activereport时出现的问题总结
- Apache的ANT Project的主页访问的时候总是出现问题,还是把它的镜像站点记下来的好!
- Win下apache出现问题:“No services installed” || apache服务启动
- linux下出现的问题、解决方式总结【持续更新】
- Flex 4.x 下载进度不出现问题解决办法
- 关于文件下载的几个问题总结
- Django在使用mod_python+apache中配置VirtualHost的问题总结
- ubuntu9.04 apache配置问题总结
- 用户连接samba出现问题总结
- 关于文件下载出现乱码问题
- apache服务Forbidden 403问题精彩总结