Last active
November 6, 2015 06:25
-
-
Save nevrending/09b513353048da985ddc to your computer and use it in GitHub Desktop.
Installing CKAN on OSX 10.10.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference: https://github.com/ckan/ckan/wiki/Installing-CKAN-2.2.1-on-Mac-OS-X-10.10.1 | |
0. Homebrew, python27, git, wget; xcode command line tool, java JDK 6+ | |
1. http://blog.bolshchikov.net/post/50277857673/installing-tomcat-on-macos-with-homebrew | |
2. pip install mercurial | |
3. pip install virtualenv | |
4. brew install postgres | |
4a.initdb /usr/local/var/postgres -E UTF8 | |
To have launchd start postgresql at login: | |
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents | |
Then to load postgresql now: | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
Or, if you don't want/need launchctl, you can just run: | |
postgres -D /usr/local/var/postgres | |
5. createuser -S -D -R -P ckan_default | |
6. createdb -O ckan_default ckan_default -E utf-8 | |
(default):pip install -e 'git+https://github.com/ckan/[email protected]#egg=ckan' | |
(default): pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt | |
Create a CKAN config file | |
Create a directory to contain the site's config files: | |
(default):sudo mkdir -p /etc/ckan/default | |
(default):sudo chown -R 'whoami' /etc/ckan/ | |
Change to the ckan directory and create a CKAN config file: | |
(default): cd /usr/lib/ckan/default/src/ckan | |
(default): paster make-config ckan /etc/ckan/default/development.ini | |
Edit the development.ini | |
vi /etc/ckan/default/development.ini | |
sqlalchemy.url = postgresql://ckan_default:<pass>@localhost/ckan_default | |
Link to who.ini | |
(default): ln -s /usr/lib/ckan/default/src/ckan/who.ini /etc/ckan/default/who.ini | |
7. brew install solr14 | |
To start solr: | |
solr path/to/solr/config/dir | |
Now you need to set solr's schema.xml file: | |
(default):cd /usr/local/Cellar/solr14/1.4.1/libexec/example | |
(default):sudo mv solr/conf/schema.xml solr/conf/schema.xml.backup | |
(default):sudo ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema.xml solr/conf/schema.xml | |
8. sudo cp /usr/local/Cellar/solr14/1.4.1/libexec/example/webapps/solr.war /usr/local/apache-tomcat/webapps/solr.war | |
9. /usr/local/apache-tomcat/bin/startup.sh | |
Configure: | |
cd /usr/local/apache-tomcat/webapps/solr/WEB-INF | |
vi web.xml | |
Add the following code: | |
<env-entry> | |
<env-entry-name>solr/home</env-entry-name> | |
<env-entry-value>/usr/local/Cellar/solr14/1.4.1/libexec/example/solr</env-entry-value> | |
<env-entry-type>java.lang.String</env-entry-type> | |
</env-entry> | |
Create database tables | |
(default): cd /usr/lib/ckan/default/src/ckan | |
(default): paster db init -c /etc/ckan/default/development.ini | |
You should see Initialising DB: SUCCESS | |
10. mkdir /usr/lib/ckan/default/src/ckan/ckan/public/uploads | |
11. vi /etc/ckan/default/development.ini | |
ckan.storage_path = /usr/lib/ckan/default/src/ckan/ckan/public/uploads | |
(default):vi /etc/ckan/default/development.ini | |
solr_url = http://127.0.0.1:8080/solr | |
(default):paster serve /etc/ckan/default/development.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I might have missed to record some steps and might have some mistakes in writing this. Please let me know if you do find some.