欢迎来到天天文库
浏览记录
ID:12126683
大小:30.55 KB
页数:16页
时间:2018-07-15
《linux下安装apache的及反向代理配置完整过程》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、下面是linux下安装apache的完整代码,系统是redhat5.51、检查系统防火墙有没开,需要把防火墙关掉,可以执行SETUP查看,关闭。在开启了防火墙时,做如下设置,开启相关端口,修改/etc/sysconfig/iptables文件,添加以下内容:-ARH-Firewall-1-INPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT-ARH-Firewall-1-INPUT-mstate--stateNEW-mtcp-ptcp--dport8088-jACCEPT2、安装Apache下载地址:2、.apache.org/>1.安装Apache#tarzxvfhttpd-2.2.22.tar.gz//解压文件#cdhttpd-2.2.22//进入安装文件夹#./configure--prefix=/usr/local/apache--enable-so--enable-mods-shared=most--enable-proxy--enable-proxy-connect--enable-proxy-ftp--enable-proxy-http--enable-proxy-scgi--enable-proxy-ajp--enable-proxy-balancer//3、配置apache路径加载动态模块#make//编译apache#makeinstall//安装apache其它相关命令:下载httpd-2.2.22.tar.bz2把httpd-2.2.22.tar.bz2放到/soft下[root@localhost~]#cd/soft[root@localhostsoft]#tarjxvfhttpd-2.2.6.tar.bz2//解压apache的压缩包[root@localhostsoft]#cdhttpd-2.2.6//定位到httpd-2.2.6文件夹下[root@localhosthttpd-2.2.6]#ls//查看显示ht4、tpd-2.2.6文件夹下内容[root@localhosthttpd-2.2.6]#./configure--help5、more//查看安装apache配置参数[root@localhosthttpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so//配置apache路径[root@localhosthttpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so--enable-mods-shared=most--enable-proxy--ena6、ble-proxy-connect--enable-proxy-ftp--enable-proxy-http--enable-proxy-scgi--enable-proxy-ajp--enable-proxy-balancer//配置apache路径加载动态模块[root@localhosthttpd-2.2.6]#make//编译apache[root@localhosthttpd-2.2.6]#makeinstall//安装apache[root@localhosthttpd-2.2.6]#cd/usr/local/apache//进入apache的目录[root@7、localhostapache]#cdconf/[root@localhostconf]#cphttpd.confhttpd.conf_bak//备份apache配置文件[root@localhostconf]#chkconfig--listhttpd//查看httpd服务是否已存在[root@localhostconf]#chkconfighttpdoff//关闭系统自带了httpd的服务,如果存在httpd服务[root@localhostconf]#servicehttpdstatus//查看自带httpd服务状态[root@localhostconf]#/usr/8、local/apache/bin/apachectl-kstart//linux启动apache命令[root@localhostconf]#/usr/local/apache/bin/apachectl-kstop//linux停止apache命令[root@localhostconf]#netstat-an9、grep:80//查看linux80端口是否开启[root@localhostconf]#ps-aux10、grephttpd//linux下查看apache进程[root@localhostconf]#cd../..[r
2、.apache.org/>1.安装Apache#tarzxvfhttpd-2.2.22.tar.gz//解压文件#cdhttpd-2.2.22//进入安装文件夹#./configure--prefix=/usr/local/apache--enable-so--enable-mods-shared=most--enable-proxy--enable-proxy-connect--enable-proxy-ftp--enable-proxy-http--enable-proxy-scgi--enable-proxy-ajp--enable-proxy-balancer//
3、配置apache路径加载动态模块#make//编译apache#makeinstall//安装apache其它相关命令:下载httpd-2.2.22.tar.bz2把httpd-2.2.22.tar.bz2放到/soft下[root@localhost~]#cd/soft[root@localhostsoft]#tarjxvfhttpd-2.2.6.tar.bz2//解压apache的压缩包[root@localhostsoft]#cdhttpd-2.2.6//定位到httpd-2.2.6文件夹下[root@localhosthttpd-2.2.6]#ls//查看显示ht
4、tpd-2.2.6文件夹下内容[root@localhosthttpd-2.2.6]#./configure--help
5、more//查看安装apache配置参数[root@localhosthttpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so//配置apache路径[root@localhosthttpd-2.2.6]#./configure--prefix=/usr/local/apache--enable-so--enable-mods-shared=most--enable-proxy--ena
6、ble-proxy-connect--enable-proxy-ftp--enable-proxy-http--enable-proxy-scgi--enable-proxy-ajp--enable-proxy-balancer//配置apache路径加载动态模块[root@localhosthttpd-2.2.6]#make//编译apache[root@localhosthttpd-2.2.6]#makeinstall//安装apache[root@localhosthttpd-2.2.6]#cd/usr/local/apache//进入apache的目录[root@
7、localhostapache]#cdconf/[root@localhostconf]#cphttpd.confhttpd.conf_bak//备份apache配置文件[root@localhostconf]#chkconfig--listhttpd//查看httpd服务是否已存在[root@localhostconf]#chkconfighttpdoff//关闭系统自带了httpd的服务,如果存在httpd服务[root@localhostconf]#servicehttpdstatus//查看自带httpd服务状态[root@localhostconf]#/usr/
8、local/apache/bin/apachectl-kstart//linux启动apache命令[root@localhostconf]#/usr/local/apache/bin/apachectl-kstop//linux停止apache命令[root@localhostconf]#netstat-an
9、grep:80//查看linux80端口是否开启[root@localhostconf]#ps-aux
10、grephttpd//linux下查看apache进程[root@localhostconf]#cd../..[r
此文档下载收益归作者所有