Instalaciones adicionales del Tomcat y Apache aeioros servicios

Dado que el anterior artículo me ha creado ciertas dudas, he decidido crear esta entrada para mostrar un proceso más meticuloso para los no familiarizados con CentOS.

Instalación de la máquina virtual de Java:

yum clean allr
yum update -y
yum install -y java-1.8.0-openjdk-devel

Instalacion de net-tools

yum -y install net-tools

Con el comando ifconfig sabremos la dirección IP para conectarnos vía SSH (Secure FTP) a través de un cliente FTP como el Filezilla.

Una vez instalado tomcat 

chown tomcat -R /opt/tomcat/


Una vez instalado el Apache hay que abrir estos puertos para poder acceder a través del explorador:

yum install telnet
telnet 127.0.0.1 8080
curl http://127.0.0.1:8080/manager
ps -aux | grep tomcat
netstat
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=8443/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload


cat tomcat-users.xml
cd ..
./bin/shutdown.sh
./bin/startup.sh
tail -600f logs/catalina.out
./bin/shutdown.sh
vim conf/server.xml
vi conf/server.xml
yum install vim
vim
vim conf/server.xml
ps -aux | grep tomcat
kill -9 11909
ps -aux | grep tomcat
./bin/startup.sh
tail -600f logs/catalina.out
netstat
netstat |grep 8080
ps -aux | grep tomcat
vim conf/server.xml
vim conf/tomcat-users.xml
ls webapps/
cat conf/server.xml
vim conf/server.xml
./bin/shutdown.sh
./bin/startup.sh
tail -600f logs/catalina.out
./bin/startup.sh
tail -600f logs/catalina.out
yum install tomcat-native.x86_64
vim conf/server.xml
./bin/shutdown.sh
ps -aux | grep tomcat
./bin/startup.sh ; tail -5000f logs/catalina.out
find / -name "httpd"
cd /etc/httpd/
ls
cd run/
ls
cd ..
cd conf
ls
cd mo
cd ..
cd modules/
ls
:q
yum remove
yum remove httpd
yum install httpd
yum install httpd-devel apr apr-devel apr-util apr-util-devel gcc gcc-c++ make autoconf libtool
Shell
mkdir -p /opt/mod_jk/
cd /opt/mod_jk
wget http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz
tar -xvzf tomcat-connectors-1.2.41-src.tar.gz
cd tomcat-connectors-1.2.41-src/native
mkdir -p /opt/mod_jk/
ls
wget http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz
yum install wget
wget http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.41-src.tar.gz
wget http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.44-src.tar.gz
tar -xvzf tomcat-connectors-1.2.41-src.tar.gz
tar -xvzf tomcat-connectors-1.2.414-src.tar.gz
tar -xvzf tomcat-connectors-1.2.44-src.tar.gz
cd tomcat-connectors-1.2.44-src
./configure --with-apxs=/usr/sbin/apxs
ls
cd native/
./configure --with-apxs=/usr/sbin/apxs
./configure
make
./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
./configure  --enable-api-compatibility
systemctl enable httpd
systemctl start httpd
./configure  --enable-api-compatibility