分享
 
 
 

resin安装脚本

王朝other·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

# time: 2003-01-18

# place: /usr/src of redhat 8.0

# people: qiong.wei

# 4 basic packages:

# apache_1.3.27.tar.gz

# mysql-4.0.7-gamma.tar.gz

# j2sdk-1_4_0_03-fcs-linux-i586.rpm.bin

# resin-2.1.6.tar.gz

# 确保所有文件属性为可执行的

#

#-----------------------------------------------------------------

# Part01 install apache

#-----------------------------------------------------------------

cd /usr/src

tar xvfz apache_1.3.27.tar.gz

cd apache_1.3.27

./configure --enable-module=most --enable-shared=max

make

make install

#-----------------------------------------------------------------

# Part02 configure apache

#-----------------------------------------------------------------

cd /etc/rc.d

cp /usr/local/apache/bin/apachectl init.d/apache

ln -s ../init.d/apache rc0.d/K02apache

ln -s ../init.d/apache rc1.d/K02apache

ln -s ../init.d/apache rc2.d/K02apache

ln -s ../init.d/apache rc3.d/S98apache

ln -s ../init.d/apache rc4.d/S98apache

ln -s ../init.d/apache rc5.d/S98apache

ln -s ../init.d/apache rc6.d/K02apache

#-----------------------------------------------------------------

# Part03 install mysql

#-----------------------------------------------------------------

cd /usr/src

tar xvfz mysql-4.0.7-gamma.tar.gz

cd mysql-4.0.7-gamma

./configure --prefix=/usr/local/mysql --enable-thread-safe-client

make

make install

scripts/mysql_install_db

#-----------------------------------------------------------------

# Part04 configure mysql

#-----------------------------------------------------------------

groupadd mysql

useradd -g mysql mysql

chown -R root /usr/local/mysql

chown -R mysql /usr/local/mysql/var

chgrp -R mysql /usr/local/mysql

cp support-files/my-medium.cnf /etc/my.cnf

cd /etc/rc.d

cp /usr/local/mysql/share/mysql/mysql.server init.d/mysql

ln -s ../init.d/mysql rc0.d/K10mysql

ln -s ../init.d/mysql rc1.d/K10mysql

ln -s ../init.d/mysql rc2.d/K10mysql

ln -s ../init.d/mysql rc3.d/S90mysql

ln -s ../init.d/mysql rc4.d/S90mysql

ln -s ../init.d/mysql rc5.d/S90mysql

ln -s ../init.d/mysql rc6.d/K10mysql

#-----------------------------------------------------------------

# Part05 install j2sdk

#-----------------------------------------------------------------

cd /usr/src

./j2sdk-1_4_0_06-fcs-linux-i586.rpm.bin

rpm -ivh j2sdk-1_4_0_06-fcs-linux-i586.rpm

#-----------------------------------------------------------------

# Part06 set global variable

#-----------------------------------------------------------------

echo 'export JAVA_HOME=/usr/java/j2sdk1.4.0_03' >> /etc/profile

echo 'export RESIN_HOME=/usr/local/resin' >> /etc/profile

echo 'export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib' >> /etc/profile

echo 'export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:/usr/local/mysql/bin:/usr/local/apache/bin:/usr/local/resin/bin'>> /etc/profile

reboot

#-----------------------------------------------------------------

# Part07 install resin

#-----------------------------------------------------------------

cd /usr/src

tar xvfz resin-2.1.6.tar.gz -C /usr/local

cd /usr/local

mv resin-2.1.6 resin

cd resin

./configure -with-apache=/usr/local/apache

make

make install

#-----------------------------------------------------------------

# Part08 configure resin

#-----------------------------------------------------------------

cd /usr/local/resin/conf

sed 's#<doc-dir>doc#<doc-dir>/usr/local/apache/htdocs#' resin.conf > resin.bak

mv -f resin.bak resin.conf

cd /usr/local/apache/conf

sed 's/AddModule mod_caucho.c/#&/' httpd.conf > httpd.bak

mv -f httpd.bak httpd.conf

echo "<IfModule mod_caucho.c>" >> httpd.conf

echo "CauchoConfigFile /usr/local/resin/conf/resin.conf" >> httpd.conf

echo "</IfModule>" >> httpd.conf

cd /etc/rc.d/init.d

cp /usr/local/resin/contrib/init.resin resin

chkconfig resin reset

sed 's/ fi/&

sleep 15/' resin > resin.bak

sed 's#JAVA_HOME=/usr/java#JAVA_HOME=/usr/java/j2sdk1.4.0#' resin.bak > resin

chmod +x resin

#-----------------------------------------------------------------

# Part9 prepare jsp script

#-----------------------------------------------------------------

echo '<%@page language="java"%>' > /usr/local/apache/htdocs/test.jsp

echo '2+2=<%=2+2%>' >> /usr/local/apache/htdocs/test.jsp

#-----------------------------------------------------------------

# Part10 test & over

#-----------------------------------------------------------------

# open http://ip/test.jsp in browser, see 2+2=4

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有