Version 8 (modified by business@…, 7 years ago) (diff) |
---|
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
Set up Apache virtual host configuration
- Copy the appropriate virtual host configuration from the SVN templates to the apache virtual host directory and adjust the
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 }}}
- Install modproxy and restart Apache webserver
sudo apt-get install libapache2-mod-proxy-html sudo ln -s /etc/apache2/mods-available/proxy* /etc/apache2/mods-enabled/ sudo /etc/init.d/apache2 reload
Set up Postgres database
- As user postgres, create a new database user account
sudo -u postgres createuser -d -R -P dbnp;
You will be asked for a password, it is advisable to create a secure (e.g. 20 characters) random password, for example with a password generator website
- Create a gscf database and make the newly created database account owner
sudo -u postgres createdb -O dbnp gscf-www;
Set up custom GSCF configuration
You can create the configuration by running GSCF setup wizard. Alternatively, you can write it from scratch:
- As user tomcat, write the GSCF configuration:
sudo -u tomcat nano /home/tomcat/.gscf/www.properties
You can copy the default configuration from https://trac.nbic.nl/gscf/browser/trunk/grails-app/conf/default.properties, but make sure to change the application URL, the database driver, the database user name and password (to what you just entered).