2014-06-10 21:41:34 +00:00
|
|
|
Firstly this walkthrough is done with a 14.04 32bit install of Ubuntu.
|
|
|
|
|
|
|
|
All commands that I could are terminal based.
|
|
|
|
|
|
|
|
Lets check if all updates for the system are installed first
|
|
|
|
|
|
|
|
in terminal type
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get update
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
now we need to install git
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install git
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
lets get our RVM installed (Ruby Version Manager) now this is fun because the package you will get from apt-get is outdated.
|
|
|
|
|
|
|
|
so we are going to use CURL to get RVM
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install curl
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
then lets install RVM with curl like this
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
curl -L get.rvm.io | bash -s stable
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-20 17:40:31 +00:00
|
|
|
PATH=$PATH:$HOME/.rvm/bin
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
source ~/.rvm/scripts/rvm
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
now we can actually install RVM
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
rvm requirements
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
running this will check your system for requirements as well so you will need to put your system password in.
|
|
|
|
|
|
|
|
alright now we can download metamaps from the master using git
|
|
|
|
|
2014-11-30 19:27:20 +00:00
|
|
|
git clone https://github.com/metamaps/metamaps_gen002.git
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-20 17:39:33 +00:00
|
|
|
now there is a couple other things we are going to need which is phantomjs, nodejs, postgresql, libpq-dev and redis-server
|
|
|
|
|
|
|
|
|
|
|
|
// 64 bit ubuntu
|
|
|
|
cd /usr/local/share
|
|
|
|
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
|
|
|
|
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
|
|
|
|
|
|
|
|
|
|
|
|
// 32 bit ubuntu
|
|
|
|
cd /usr/local/share
|
|
|
|
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2
|
|
|
|
sudo tar xjf phantomjs-1.9.7-linux-i686.tar.bz2
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-i686/bin/phantomjs /usr/local/share/phantomjs
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-i686/bin/phantomjs /usr/local/bin/phantomjs
|
|
|
|
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-i686/bin/phantomjs /usr/bin/phantomjs
|
|
|
|
|
|
|
|
// on either running
|
|
|
|
phantomjs -v
|
|
|
|
// will confirm it's installed
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install nodejs
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install postgresql
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install libpq-dev
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo apt-get install redis-server
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-22 00:31:59 +00:00
|
|
|
Furthermore, if you want to be able to work on profile picture uploading, or use it
|
|
|
|
you'll need ImageMagick. On Ubuntu, you can just go find ImageMagick in the Ubuntu Software Centre
|
|
|
|
|
2014-10-20 17:33:07 +00:00
|
|
|
Install the specific version of ruby needed this will take some time
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-20 17:33:07 +00:00
|
|
|
rvm install ruby-2.1.3
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
Now we also need to rename your database file which is in ./config/database.default.yml to database.yml
|
|
|
|
|
|
|
|
now run inside your metamaps_gen002 folder
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
bundle install
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
in your top lvl directory for metamaps this is a lengthy process so you might want to go and make a coffee or something :)
|
|
|
|
|
|
|
|
alright now we need to make sure your postgres password is the same as it is listed in the DB file so we are going to set it by
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
sudo -u postgres psql
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
Select postgres like this
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
\password postgres
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
set the password to 3112
|
|
|
|
|
|
|
|
Then to quit
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
\q
|
2014-06-10 21:41:34 +00:00
|
|
|
|
|
|
|
now we can run the rake install and db creation
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
rake db:create
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
rake db:schema:load
|
|
|
|
|
|
|
|
rake db:fixtures:load
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-09-03 15:31:59 +00:00
|
|
|
Execute the server:
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
rails s
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-22 00:31:59 +00:00
|
|
|
and dont forget to run the two other servers, for sidekiq, and realtime...
|
|
|
|
open a new terminal
|
2014-06-10 21:41:34 +00:00
|
|
|
navigate to ./realtime and run
|
|
|
|
|
2014-10-22 00:31:59 +00:00
|
|
|
sudo apt-get install npm
|
|
|
|
npm install
|
2014-09-03 15:30:29 +00:00
|
|
|
nodejs realtime-server.js
|
2014-06-10 21:41:34 +00:00
|
|
|
|
2014-10-22 00:31:59 +00:00
|
|
|
open a new terminal
|
|
|
|
navigate to the main directory and run
|
|
|
|
|
|
|
|
sidekiq
|
|
|
|
|
2014-09-03 15:30:29 +00:00
|
|
|
Now you're all set enjoy your personal server of metamaps :)
|
2014-09-03 15:40:08 +00:00
|
|
|
|
|
|
|
Navigate your browser to localhost:3000 once you have the server running
|
|
|
|
|
|
|
|
Sign in with the default account
|
|
|
|
|
|
|
|
email: user@user.com
|
|
|
|
|
|
|
|
password: toolsplusconsciousness
|
|
|
|
|
|
|
|
OR create a new account at /join, and use access code 'qwertyui'
|
|
|
|
|
|
|
|
Start mapping and programming!
|