chmod +x ~/tmp/jdk-6u30-linux-i586.bin
~/tmp/jdk-6u30-linux-i586.bin
sudo mv jdk1.6.0_31 /usr/local/webserver/
sudo touch /etc/profile.d/jdk_config.sh
sudo vim /etc/profile.d/jdk_config.sh#写入下边内容
export JAVA_HOME=/usr/local/webserver/jdk1.6.0_30
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
source /etc/profile.d/jdk_config.sh#加载java配置
cd ~/tmp/
tar -zxvf apache-ant-1.8.2-bin.tar.gz
mv apache-ant-1.8.2 /usr/local/webserver/
sudo touch /etc/profile.d/ant_config.sh
sudo vim /etc/profile.d/ant_config.sh #写入下边内容
export ANT_HOME=/usr/local/webserver/apache-ant-1.8.2
export PATH=$PATH:$ANT_HOME/bin
source /etc/profile.d/ant_config.sh
debug-》debug configurations
新建一个launch configuration,工程选择当前工程,主函数填org.apache.tools.ant.Main,也就是ant的主函数
选择argument选项卡,在program argument中填写你本来想运行的ant参数
classpath中添加所有ANT_HOME/lib目录下的库
在源文件中打上断点,启动调试
cd ~/tmp/
tar -zxvf apache-tomcat-6.0.35.tar.gz
mv apache-tomcat-6.0.35 /usr/local/webserver/
vim /usr/local/webserver/apache-tomcat-6.0.35/conf/tomcat-users.xml #修改tomcat manager用户名密码
去掉user相关注释
将<user username="tomcat" password="tomcat" roles="tomcat"/>改为<user username="tomcat" password="tomcat" roles="tomcat,manager"/>
sudo yum install logrotate
sudo touch /etc/logrotate.d/tomcat
sudo vim /etc/logrotate.d/tomcat
/usr/local/webserver/apache-tomcat-6.0.35/logs/catalina.out {
copytruncate
daily
dateext
rotate 60
maxage 60
compress
delaycompress
olddir archive
missingok
}
#初次配置完强制执行一次logrotate
/usr/sbin/logrotate -f /etc/logrotate.d/tomcat
#更改logrotate切分时间,默认为/etc/cron.daily,执行时间不同系统会有区别,所以需要手动更改logrotate执行时间
su root
cd ~
mkdir cron
mv /etc/cron.daily/logrotate cron/
crontab -e
# m h dom mon dow command
0 0 * * * /root/cron/logrotate
解决subeclipse报javahl错,sudo apt-get install libsvn-java, 在eclipse.ini里-vmargs后面加入-Djava.library.path=/usr/lib/jni