Version 6 (modified by business@…, 3 years ago)

--

Set up dbNP instance on an NBX

Set up tomcat user

  • Login as manager
  • Create user tomcat:
    sudo adduser tomcat
    
  • Switch to user tomcat and its home directory
    sudo su - tomcat
    
  • Change default shell to bash:
    chsh -s /bin/bash
    
  • Check out deploy scripts and virtual host configurations
    svn checkout --username=anonymous https://svn.osx.eu/gscf-misc/scripts
    svn checkout --username=anonymous https://svn.osx.eu/gscf-misc/vhost
    
  • Download Tomcat (to find the newest version, go to  http://tomcat.apache.org/, find it, click Download and look up the Core .tar.gz file)
    wget http://apache.mirrors.webazilla.nl/tomcat/tomcat-7/v7.0.16/bin/apache-tomcat-7.0.16.tar.gz
    tar -zxvf apache-tomcat-7.0.16.tar.gz
    
  • Add CATALINA_OPTS parameter to default bash environment of Tomcat user (convenient when restarting Tomcat manually)
    echo "export CATALINA_OPTS=\"-Xms128m -Xmx2048m -XX:MaxPermSize=720m -XX:MaxHeapFreeRatio=70 -XX:MaxGCPauseMillis=10 -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled\"" >> ~/.bashrc
    
  • Return to your own (manager) shell
    exit
    
  • Copy the appropriate virtual host configuration from the SVN templates to the apache virtual host directory and adjust it to your wishes
    sudo cp /home/tomcat/vhost/dbnp.org_gscf-www.conf /etc/apache2/sites-available
    cd /etc/apache2/sites-enabled
    sudo ln -s ../sites-available/dbnp.org_gscf-www.conf
    sudo vi dbnp.org_gscf-www.conf
    
  • Restart Apache webserver
    /etc/init.d/apache2 reload