Last active
April 28, 2019 10:33
-
-
Save synsh/8d3c08b3879bf0622eee89e1d2b1f77f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Install JAVA | |
# | |
yum -y update | |
yum -y install java-1.8.0-openjdk | |
java -version | |
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java | |
#Source .bash_profile | |
echo $JAVA_HOME | |
## | |
# Install tomcat | |
# https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7 | |
# | |
sudo groupadd tomcat | |
sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat | |
wget http://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.19/bin/apache-tomcat-9.0.19.tar.gz | |
sudo mkdir /opt/tomcat | |
sudo tar xvf apache-tomcat-9.0.19.tar.gz -C /opt/tomcat --strip-components=1 | |
# sudo chown -R tomcat /opt/tomcat | |
sudo chgrp -R tomcat /opt/tomcat | |
sudo chmod -R g+r /opt/tomcat/conf | |
sudo chmod g+x /opt/tomcat/conf | |
sudo chown -R tomcat /opt/tomcat/webapps/ /opt/tomcat/work/ /opt/tomcat/temp/ /opt/tomcat/logs/ | |
sudo cp tomcat.service /etc/systemd/system/tomcat.service | |
sudo systemctl daemon-reload | |
sudo systemctl enable tomcat | |
sudo systemctl start tomcat | |
sudo systemctl status tomcat | |
## | |
# Oracle Database 18c Express Edition (XE) | |
# https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html | |
# https://www.server-world.info/en/note?os=CentOS_7&p=oracle18c&f=6 | |
# | |
wget https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm | |
yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm | |
/etc/init.d/oracle-xe-18c configure | |
systemctl start oracle-xe-18c | |
systemctl enable oracle-xe-18c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Systemd unit file for tomcat | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
Environment=JAVA_HOME=/usr/lib/jvm/jre | |
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid | |
Environment=CATALINA_HOME=/opt/tomcat | |
Environment=CATALINA_BASE=/opt/tomcat | |
#Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' | |
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom' | |
ExecStart=/opt/tomcat/bin/startup.sh | |
ExecStop=/bin/kill -15 $MAINPID | |
User=tomcat | |
Group=tomcat | |
UMask=0007 | |
RestartSec=10 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment