$ useradd -s /sbin/nologin -g bigdinosaur-d /home/bigdinosaur/apache-tomcat-8.0.9
$ passwd bigdinosaur
Owner ship to user for directory .Give ownership to tomcat user bigdinosaur for ownership to apache-tomcat-8.0.9 directory
chown -R bigdinosaur.bigdinosaur /home/bigdinosaur/apache-tomcat-8.0.9
It gives user write access for the webapps directory.
chmod 775 /home/bigdinosaur/apache-tomcat-8.0.9
whether tomcat is running or not
ps -ef | grep tomcat
tail -f logs/catalina.out
it should return this
netstat -a | grep 8080
creating tomcat user and running tomcat as specific user
sudo adduser tomcat
sudo -u tomcat ${CATALINA_HOME}/bin/catalina.sh run
removing default webapps
sudo rm -rf apache-tomcat-6.0.20/webapps/*
Remove write permissions:
sudo chmod -R go-w apache-tomcat-6.0.20
Allow write on needed directories only:
sudo chown -R tomcat work/ temp/ logs/
sudo mkdir /opt/java
sudo mkdir /opt/server
cd /opt/java
sudo cp /home/bigdinosaur /jdk1.8.0_11
No comments:
Post a Comment