How to install CKAN 2 in YOSEMITE 10.10 and script for start & stop server

Isaac Aldana edited this page Feb 16, 2015 · 1 revision
Clone this wiki locally

How to install CKAN in Mac OSX Yosemite 10.10.1

If you want to install the CKAN project ckan.org in a MAC OS X Yosemite 10.10 you will see a lot of problems in dependencies, so this file CKAN has the lines to install the project.

The only requirement is to install brew.

http://brew.sh

Which has ruby!

CKAN it´s a great open data project and in case you trie WordPress, Joomla, o whatever CMS, you´ll be familiar in his use.

The potential of connect HDFS for the DATASTORE and store DATASETS in Organizations becames the value of this solution.

In this forum will be developing more code for phases of:

1.- Connect HDFS Enterprise Storage like Isilon 2.- Change Jetty to TC Server Spring 3.- Use of Cloud Foundry for Mobile Apps in uses cases 4.- Use of HPIG for news Searches

...

//Script for install

sudo easy_install pip brew install postgresql sudo pip install virtualenv brew install wget sudo mkdir -p /usr/lib/ckan/default sudo chown whoami /usr/lib/ckan/default virtualenv --no-site-packages /usr/lib/ckan/default . /usr/lib/ckan/default/bin/activate pip install -e 'git+https://github.com/ckan/ckan.git@ckan-2.2.1#egg=ckan' pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt deactivate . /usr/lib/ckan/default/bin/activate brew info postgresql //START DB postgres -D /usr/local/var/postgres & sudo -u 'whoami' psql -l sudo -u 'whoami' createuser -S -D -R -P ckan_default sudo -u 'whoami' createdb -O ckan_default ckan_default -E utf-8 sudo -u 'whoami' psql -l sudo mkdir -p /etc/ckan/default sudo chown -R 'whoami' /etc/ckan/ cd /usr/lib/ckan/default/src/ckan paster make-config ckan /etc/ckan/default/development.ini vi /etc/ckan/default/development.ini sqlalchemy.url = postgresql://ckan_default:'password'@localhost/ckan_default brew update brew install jetty brew install solr vi /etc/ckan/default/development.ini //solr_url=http://127.0.0.1:8983/solr cd /usr/lib/ckan/default/src/ckan paster db init -c /etc/ckan/default/development.ini //in terminal active ln -s /usr/lib/ckan/default/src/ckan/who.ini /etc/ckan/default/who.ini cd /usr/lib/ckan/default/src/ckan cd /usr/local/Cellar/solr/4.10.2/example/ sudo mv solr/collection1/conf/schema.xml solr/collection1/conf/schema.xml.backup sudo ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema-2.0.xml cd /usr/local/Cellar/solr/4.10.2/example/solr/collection1/conf cp /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema-2.0.xml ./ mv schema-2.0.xml schema.xml sudo mkdir -p /var/lib/ckan sudo chown -R 'whoami' /var/lib/ckan/ vi /etc/ckan/default/development.ini //uncomment ckan.storage_path

//script for startup server . /usr/lib/ckan/default/bin/activate postgres -D /usr/local/var/postgres & solr start cd /usr/lib/ckan/default/src/ckan paster serve /etc/ckan/default/development.ini

//script for stop server kill -9 $( ps -fea | grep '/usr/local/var/postgres' | awk '{print $2}') solr stop -all