install apache, tomcat installation, tomca single multi-instance installation

apache installation

yum -y install gcc gcc-c++

takes -jxvf Apr 1.5.1.tar.bz2

CD April-1.5.1

./configure --prefix=/usr/local/apr && make && make install

takes -jxvf April-util-1.5.2.tar.bz2

cd apr-util-1.5.2
./configure --with-apr=/usr/local/apr/ --prefix=/usr/local/apr-util
make && make install

tar -zxvf pcre-8.32.tar.gz
cd pcre-8.32
./configure --help
./configure --prefix=/usr/local/pcre
make && make install

tar -zxvf httpd-2.4.41.tar.gz
cd httpd-2.4.41
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --prefix=/usr/local/apache2 --enable-so

make && make install

tomcat installation

tar -zxvf apache-tomcat-8.5.40.tar.gz # decompression
mv apache-tomcat-8.5.40 / opt / tomcat # mobile
tar -zxvf jdk-8u201-linux- x64.tar.gz -C / usr / local /

Vim / etc / Profile
Export the JAVA_HOME = / Data / Server / jdk1.8 modify the environment variable #
export CLASSPATH = .: JAVA_HOME / lib / dt.jar: J A V A H O M E / j i b / t o o l s . j a r e x p o r t P A T H = JAVA_HOME/jib/tools.jar export PATH= PATH:$JAVA_HOME/bin

source / etc / profile # the configuration file to take effect

/data/server/tomcat8/bin/startup.sh # open service

Stand-alone multi-instance

Tomcat install
another copy to tomcat, you can modify the ports do not conflict
vim /opt/tomcat/conf/server.xml
8005/8080/8009

The tomcat hosting to superviosr management
yum -y install EPEL-Release
yum -y install Supervisor

vim /etc/supervisord.conf

[program:tomcat1]
command=/opt/tomcat1/bin/catalina.sh run

[program:tomcat2]
command=/opt/tomcat2/bin/catalina.sh run

Start supervisord
Service supervisord Start

View tomcat1 and tomcat2 listening port, you can see a whole is listening
SS -ntl | grep 8080
SS -ntl | grep 8081

Released two original articles · won praise 0 · Views 42

Guess you like

Origin blog.csdn.net/weixin_46369755/article/details/104673605