Bhutan Biodiversity Portal (BBP) - A repository of information designed to harness and disseminate collective intelligence on the biodiversity of Bhutan.
JavaScript Groovy CSS XSLT Python Java Other
Pull request Compare This branch is 26 commits ahead, 1730 commits behind strandls:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
app-conf
grails-app
lib
scripts
serialized-php-parser-rev.16
src
userscripts
web-app
.bashrc
.bashrc_kk
.classpath
.gitignore
.project
.vimrc
README
README_BHUTAN
application.properties

README

A. FOR REDHAT BASED LINUX (CentOS):

* Install grails 2.3.9 http://grails.org/download/archive/Grails

* Install git http://git-scm.com/book/en/Getting-Started-Installing-Git

* Install postgresql http://wiki.postgresql.org/wiki/Detailed_installation_guides 
    a. Edit pg_hba.conf and set authentication method to trust instead of peer for localhost
    b. createdb -Upostgres biodiv

* Get a copy of the application
    a. cd ~; mkdir git; cd git;
    b. git clone https://github.com/kxt5258/bbp.git
    c. cd bbp; 
    d. grails upgrade

* Install postGIS
    a. service postgresql stop
    b. yum install postgis2_92
    c. Run following to make biodiv a spatially enabled database (required for map module)
        a. createlang -Upostgres plpgsql biodiv;
        b. psql -Upostgres biodiv 
	c. CREATE Extension postgis;
	d. CREATE Extension postgis_topology (If you need topology feature);


* Install following plugins to convert and optimize images 
    a. yum install ImageMagick
    b. curl -O http://centos.alt.ru/repository/centos/6/x86_64/jpegoptim-1.3.0-1.el6.x86_64.rpm  (For 64bit machines)
    c. rpm -ivh jpegoptim-1.3.0-1.el6.x86_64.rpm

* Tune jvm memory settings for the application. Some of the commands that would be useful for development are mentioned in repoHome/.bashrc file. Add it to your bashrc profile settings as shown below  
    a. vim ~/.bashrc
    b. add line : source ~/git/bbp/.bashrc
    c. save and run : source ~/.bashrc

* Run application 
    a. cd ~/git/bbp
    b. grails run-app

* Setting the apache virtual host configuration 
    a. ln -s ~/git/bbp/app-conf/apache-virtualhost-conf /etc/httpd/conf/
    b. edit ~/git/biodiv/app-conf/apache-virtualhost-conf and change DocumentRoot to your dataDir (~/species)
    c. service httpd restart

* Setting up host locally for dev  
    sudo vim /etc/hosts
    127.0.0.1       someName.localhost.org appName

* Install names parer https://github.com/GlobalNamesArchitecture/biodiversity 
	a. Install ruby >1.9. Follow the instruction here. http://www.server-world.info/en/note?os=CentOS_6&p=ruby19
    	b. sudo gem install biodiversity

* Import cert from Inkfilepicker to cacerts (keytool -keystore /path/to/cacerts -importcert -alias aliasName -file /path/to/certificate)

* app.rootDir in grails-app/conf/Config.groovy points to a directory where all application specific data files, templates and configuration files are stored. By default in development mode it points to app-conf folder in this repository.

* app.siteName, app.logo, app.favicon properties can be set to change the portal name, logo and favicon respectively


B. FOR DEBIAN BASED LINUX:

* Install grails 2.3.9 http://grails.org/download/archive/Grails

* Install git http://git-scm.com/book/en/Getting-Started-Installing-Git

* Install postgresql http://wiki.postgresql.org/wiki/Detailed_installation_guides 
    a. sudo apt-get install postgresql postgresql-client pgadmin3
    b. sudo -u postgres psql postgres
        # \password postgres
    c. Edit pg_hba.conf and set authentication method to trust instead of peer for localhost
    d. createdb -Upostgres biodiv

* Get a copy of the application
    a. cd ~; mkdir git; cd git;
    b. git clone https://github.com/strandls/biodiv.git
    c. cd biodiv; 
    d. grails upgrade

* Install postGIS
    a. /etc/init.d/postgresql stop
    b. apt-get install postgresql-9.1-postgis
    c. Run following to make biodiv a spatially enabled database (required for map module)
        a. createlang -Upostgres plpgsql biodiv;
        b. psql -Upostgres -d biodiv -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
        c. psql -Upostgres -d biodiv -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql

* Install following plugins to convert and optimize images 
    a. audo apt-get install imagemagick
    b. sudo apt-get install jpegoptim

* Tune jvm memory settings for the application. Some of the commands that would be useful for development are mentioned in repoHome/.bashrc file. Add it to your bashrc profile settings as shown below  
    a. vim ~/.bashrc
    b. add line : source ~/git/biodiv/.bashrc
    c. save and run : source ~/.bashrc

* Run application 
    a. cd ~/git/biodiv
    b. grails run-app

* Setting the apache virtual host configuration 
    sudo ln -s ~/git/biodiv/app-conf/apache-virtualhost-conf /etc/apache2/sites-available/
    sudo ln -s ~/git/biodiv/app-conf/apache-virtualhost-conf /etc/apache2/sites-enabled/
    sudo a2enmod proxy proxy_connect proxy_ftp proxy_http rewrite include expires headers
    sudo /etc/init.d/apache2 restart

* Setting up host locally for dev  
    sudo vim /etc/hosts
    127.0.0.1       someName.localhost.org appName

* Install names parer https://github.com/GlobalNamesArchitecture/biodiversity 
    a. sudo gem install biodiversity

* app.rootDir in grails-app/conf/Config.groovy points to a directory where all application specific data files, templates and configuration files are stored. By default in development mode it points to app-conf folder in this repository.

* app.siteName, app.logo, app.favicon properties can be set to change the portal name, logo and favicon respectively