forked from dgidb/dgidb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL-LINUX
65 lines (53 loc) · 2.03 KB
/
INSTALL-LINUX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#Dvelopment installation for Ubunutu 12.04 LTS
#set locale - this section is probably only needed if you're using the vagrant precise64 box
#and will need to happen before you install postgres
export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
#then run:
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
#install deps
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib libpq-dev libxslt-dev libxml2-dev git build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev nodejs libreadline-dev
#install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
#install ruby-build
mkdir ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
exec $SHELL
#install ruby and bundler
rbenv install 2.0.0-p481
rbenv rehash
#set your global ruby
rbenv global 2.0.0-p481
gem install bundler
rbenv rehash
#set up your username as a local postgres superuser
sudo -u postgres createuser --superuser `logname`
sudo vi /etc/postgresql/9.1/main/pg_hba.conf
#in the document you just opened, change this line:
#host all all 127.0.0.1/32 md5
#to look like this:
#host all all 127.0.0.1/32 trust
#this will make it so a password isn't needed for connections from localhost
#if you prefer, you can assign a password to your user and fill
#it in the config/database.yml file in the development section
#restart postgres
sudo /etc/init.d/postgresql restart
#setup dgidb
git clone https://github.com/genome/dgi-db.git dgi-db
cd dgi-db
bundle install
rbenv rehash
rake dgidb:load_local
#Occassionally the database may get into a confused state and this rake command no longer works properly
#In that case you can try this:
psql -h localhost -d dgidb -f db/structure.sql
psql -h localhost -d dgidb -f data/data.sql
#start the development server
rails s
#visit localhost:3000 to view the site