Apache-rhel5.8环境下编译安装
2015-05-01 23:54
351 查看
Apache安装过程
Step 1:安装包gcc或gcc-c++
# yum install gcc
#yum install gcc-c++
Step 2:安装包APR和APR-Util
apr-1.4.8.tar.gz apr-util-1.5.2.tar.gz
# tar -zxf apr-1.4.8.tar.gz
# cd apr-1.4.8
新建目录/usr/local/apr,用作安装目录:
# mkdir /usr/local/apr
# ./configure --prefix=/usr/local/apr
# make
# make install
安装apr-util
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install
Step 3:安装包PRCE
# cd pcre-8.33
#mkdir /usr/local/pcre
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
# make
# make install
Step 4:安装Apache Http Server
# tar zxvf httpd-2.4.6.tar.gz
#cd httpd-2.4.6
#./configure --prefix=/opt/data/apache2 \
--enable-so \
--enable-mods-shared=most \
--with-mpm=worker \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--with-included-apr \
--with-pcre=/usr/local/pcre \
#make
#make install
Step 5:启动Apache服务
#/opt/data/apache2 /bin/apachectl start
用浏览器访问http://localhost时提示It works!
启动报错:
# /usr/local/apache/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using getlnx05.gfg1.esquel.com. Set the 'ServerName' directive globally to suppress this message
这个时候需要编辑httpd.conf配置文件,添加SeraverName的具体IP地址。
SeraverName 192.168.1.123:80
如果从其它电脑连接访问Apache时,输入url地址:http://ip 页面没有显示正常,而上面配置也OK,那么你必须关闭防火墙,有时候甚至需要重启电脑才能OK,重启Apache服务都无效。
# chkconfig iptables off
# chkconfig iptables off
# /usr/local/apache/bin/apachectl restart
Step 1:安装包gcc或gcc-c++
# yum install gcc
#yum install gcc-c++
Step 2:安装包APR和APR-Util
apr-1.4.8.tar.gz apr-util-1.5.2.tar.gz
# tar -zxf apr-1.4.8.tar.gz
# cd apr-1.4.8
新建目录/usr/local/apr,用作安装目录:
# mkdir /usr/local/apr
# ./configure --prefix=/usr/local/apr
# make
# make install
安装apr-util
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install
Step 3:安装包PRCE
# cd pcre-8.33
#mkdir /usr/local/pcre
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
# make
# make install
Step 4:安装Apache Http Server
# tar zxvf httpd-2.4.6.tar.gz
#cd httpd-2.4.6
#./configure --prefix=/opt/data/apache2 \
--enable-so \
--enable-mods-shared=most \
--with-mpm=worker \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--with-included-apr \
--with-pcre=/usr/local/pcre \
#make
#make install
Step 5:启动Apache服务
#/opt/data/apache2 /bin/apachectl start
用浏览器访问http://localhost时提示It works!
启动报错:
# /usr/local/apache/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using getlnx05.gfg1.esquel.com. Set the 'ServerName' directive globally to suppress this message
这个时候需要编辑httpd.conf配置文件,添加SeraverName的具体IP地址。
SeraverName 192.168.1.123:80
如果从其它电脑连接访问Apache时,输入url地址:http://ip 页面没有显示正常,而上面配置也OK,那么你必须关闭防火墙,有时候甚至需要重启电脑才能OK,重启Apache服务都无效。
# chkconfig iptables off
# chkconfig iptables off
# /usr/local/apache/bin/apachectl restart
相关文章推荐
- 在CentOS/RHEL6.2/5.8,Fedora17/16上安装Nginx/PHP-FPM环境
- LAMP环境配置三步曲之(一) CentOS 编译安装 Apache
- Centos 6.5 配置分离式LAMP平台环境 多服务器编译安装Apache2.4.x PHP5.4.x MariaDB5.5.x
- Rhel6.5_Nginx1.45_Php5.59_MySQL5.6.16编译安装(集成LNMP环境)
- PXE+DHCP+Apache+KickStart无人值守安装RHEL5.8
- mac编译安装apache+php+mysql开发环境
- RHEL5.1下安装GCC编译环境
- Linux环境下apache阿帕奇安装配置失败报错,编译失败的解决方案,Apache安装升级OpsenSSL步骤
- Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
- centos5.8 x64编译安装apache httpd 2.4.9
- RHEL5.1下安装GCC编译环境
- 虚拟机VMWare安装RHEL 7.0以及安装配置LAMP环境(Apache+PHP+MariaDB)
- Linux 环境下手工编译安装Apache
- 在ubuntu linux下以编译方式安装LAMP(apache mysql php)环境
- RHEL 5 下安装GCC编译环境
- ubuntu12.04下编译安装lamp(apache2.2.26 mysql5.5.36 php5.2.17)环境
- 在Linux上编译安装php开发环境(install apache)-2
- wdOS系统下源码编译安装LAMP环境(linux+apache+php+mysql)
- rhel-server-6.0-i386上安装GCC编译环境
- RHEL6系统安装时配置支持LVS和MEMCACHED编译环境的方法