Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos 7 doc #70

Closed
51ckb01 opened this issue Jul 13, 2019 · 3 comments
Closed

Centos 7 doc #70

51ckb01 opened this issue Jul 13, 2019 · 3 comments

Comments

@51ckb01
Copy link

51ckb01 commented Jul 13, 2019

Centos 7 - Setup Guide

Install java 1.8 - openjdk

yum install java-1.8.0-openjdk.x86_64

Tomcat 8 setup:

  • Create Tomcat user and group:

    sudo groupadd tomcat
    sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat	
    
  • Install Tomcat 8:

    cd /tmp
    wget http://mirror.nohup.it/apache/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz
    

    Info:

    sudo mkdir /opt/tomcat
    sudo tar xvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1
    cd /opt/
    sudo chown -R tomcat. tomcat
    sudo chmod -R g+r conf
    sudo chmod g+x conf
    
  • Systemd Unit:

    sudo vi /etc/systemd/system/tomcat.service

    Paste this:

# 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
:wq
sudo systemctl daemon-reload

Install Airsonic:

sudo mkdir /var/airsonic/
sudo chown -R tomcat. /var/airsonic/
sudo mv airsonic.war /var/lib/tomcat8/webapps/airsonic.war
sudo chown tomcat. /opt/tomcat/webapps/airsonic.war

Start tomcat service:

sudo systemctl start tomcat.service

Info:

  • Logs are stored in /opt/tomcat/logs/catalina.out

  • Change default port:

    vi /opt/tomcat/conf/server.xml
    

    Change the Connector port="8080" port to any other port number:

     -->
        <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
        <!-- A "Connector" using the shared thread pool-->
        <!--
    
    

    For example

     -->
        <Connector port="9999" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
        <!-- A "Connector" using the shared thread pool-->
        <!--
    
    
@51ckb01
Copy link
Author

51ckb01 commented Jul 13, 2019

Markdown version (just rename into .md):

Airsonic_Centos_Guide_md.txt

@jvoisin
Copy link
Contributor

jvoisin commented Jul 13, 2019

Feel free to directly issue a pull-request :)

@51ckb01
Copy link
Author

51ckb01 commented Jul 13, 2019

Done! :) #71
Close this issue!

@51ckb01 51ckb01 closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants