GNU/Linux >> Belajar Linux >  >> Linux

Menginstal Tomcat 7 di sistem Linux dengan Native Library

Pemasang

wget ftp:\\yourdeployment.server.local/tomcat7.tar.gz  
tar xvzf tomcat7.tar.gz   
cp -f tomcat /usr/share/tomcat7 
rm -f /usr/share/tomcat  
ln -s /usr/share/tomcat7 /usr/share/tomcat    
chmod 777 /usr/share/tomcat7/bin/ *.sh    
useradd -d /usr/share/tomcat -s /sbin/nologin tomcat  
chown -R tomcat /usr/share/tomcat7    
rm -f /etc/init.d/tomcat  
cp -f /usr/share/tomcat7/tomcat /etc/init.d/  
chmod +x /etc/init.d/tomcat    
rm -f /etc/profile.d/env.sh  
cp -f /usr/share/tomcat7/env.sh /etc/profile.d/  
chmod +x /etc/profile.d/env.sh    
chmod 755 /etc/init.d/tomcat    

Instalasi paket asli

cd /usr/share/tomcat7/bin  
tar -xvzf tomcat-native.tar.gz  
cd tomcat-native-<replace with current version>-src/jni/native  
./configure --with-apr=/usr && make && sudo make install  
cd /usr/lib  
rm -f libtcnative-1.so  
ln -s /usr/local/apr/lib/libtcnative-1.so libtcnative-1.so  
init 6  

berkas kucing jantan:

#!/bin/bash  
 chkconfig: 234 20 80  
 description: Tomcat Server basic start/shutdown script  
 processname: tomcat  

export JAVA_HOME=/jdk7  
export TOMCAT_HOME=/usr/share/tomcat7  
export JEE_JAR=/jdk7  
export JRE_HOME=/jdk7/jre  
export PATH=$PATH:$JAVA_HOME/bin  
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar  

case $1 in  
start)  
  sh /usr/share/tomcat7/bin/startup.sh  
;;
stop)
  sh /usr/share/tomcat7/bin/shutdown.sh
;;  
restart)  
  sh /usr/share/tomcat7/bin/shutdown.sh  
  sh /usr/share/tomcat7/bin/startup.sh  
;;  
esac  
exit 0  

env.sh

export JAVA_HOME=/jdk7  
export JRE_HOME=$JAVA_HOME  
export TOMCAT_HOME=/usr/share/tomcat7  
export PATH=$PATH:$JAVA_HOME/bin  
export CLASSPATH=.:$JRE_HOME/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar  

Linux
  1. Pantau sistem Linux Anda di terminal Anda dengan procps-ng

  2. Memahami panggilan sistem di Linux dengan strace

  3. Menjadwalkan tugas sistem dengan Cron di Linux

  1. Tingkatkan kinerja sistem Linux dengan noatime

  2. Perintah Shutdown Linux (dengan Contoh)

  3. Menyeimbangkan keamanan Linux dengan kegunaan

  1. Menginstal Tomcat 8 pada CentOS 7 Linux VPS

  2. Howto:Pemrograman C dengan Direktori di Linux

  3. Cara menggunakan ekspor dengan Python di Linux