`

Linux下安装JDK和Apache

 
阅读更多

安装版本的Linux为64位:

 

查看linux的版本是否为64位:

getconf  LONG_BIT

 

一。拷贝jdk linux 64 到 /mapbar/tools/ 里面
   
   chmod +x jdk-6u31-linux-x64.bin
   ./jdk-6u31-linux-x64.bin
   jdk 已经被安装到:/mapbar/tools/jdk1.6.0_31/bin ,,,,,,


修改环境变量: vi /etc/profile

JAVA_HOME=/mapbar/tools/jdk1.6.0_31/ 
JRE_HOME=/mapbar/tools/jdk1.6.0_31/jre
CLASSPATH=/mapbar/tools/jdk1.6.0_31/lib/dt.jar:/mapbar/tools/jdk1.6.0_31/lib/tools.jar 
PATH=/mapbar/tools/jdk1.6.0_31/bin:$PATH 
export PATH JAVA_HOME JRE_HOME CLASSPATH  


二。安装apache:(没装zlib 单独安装2个包)

1. 安装apache: 安装到 /mapbar/app/ 下面

apache_map   ------  88 端口号


***************没有安装gcc , 先yum install gcc.****************
tar jxvf httpd-2.2.22.tar.bz2 
cd httpd-2.2.22
./configure --prefix=/mapbar/app/apache_map -enable-so -enable-rewrite -enable-info -enable-cgid -enable-mime-magic -enable-alias -enable-access -enable-forward 
make //编译
make install //安装

测试apache 是否正常:
/mapbar/app/apache_map/bin/apachectl configtest

/mapbar/app/apache_map/bin/apachectl start //第一次运行



(使用负载均衡需要使用的config的配置)

cd httpd-2.2.22_jsp
./configure --prefix=/mapbar/app/apache_jsp -enable-so -enable-rewrite -enable-info -enable-cgid -enable-mime-magic -enable-alias -enable-access -enable-forward --with-mpm=worker --enable-deflate  --enable-expires  --enable-proxy  --enable-proxy-http


make clean  ---- 如果不clean 会报错,
make install
/mapbar/app/apache_jsp/bin/apachectl start 


关于apache的一些命令:
ps -ef|grep httpd  查看apache 是否启动
关闭 进入bin 里面stop 

软启动: apache -k graceful
make distclean  

查看los 是否跳转了
tail -f logs/localhost_access_logtime.2012-12-24.txt

如果安装不上gcc:
vim /etc/yum.conf,注释掉exclude=kernel*
yum install make  libtool gcc gcc-c++

yum install make  libtool gcc gcc-c++ -y
如果安装不上zlib:
yum install zlib-devel -y

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics