metamaps--metamaps/doc/UbuntuInstallation.md

109 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

Firstly this walkthrough is done with a 14.04 32bit install of Ubuntu.
2016-01-17 02:17:02 +00:00
Let's check if all updates for the system are installed first. In a
terminal type:
sudo apt-get update
2016-01-17 02:17:02 +00:00
Now we need to install git:
sudo apt-get install git
2016-01-17 02:17:02 +00:00
Now let's 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
sudo apt-get install curl
2016-01-17 02:17:02 +00:00
Then lets install RVM with curl like this
2016-01-17 02:17:02 +00:00
gpg --keyserver hkp://keys.gnupg.net \
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
2014-10-20 17:40:31 +00:00
PATH=$PATH:$HOME/.rvm/bin
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
source ~/.rvm/scripts/rvm
2016-01-17 02:17:02 +00:00
Now we can actually install RVM
rvm requirements
2016-01-17 02:17:02 +00:00
Running this will check your system for requirements as well so you will need to put your system password in.
2016-01-17 02:17:02 +00:00
All right now we can download metamaps from the master using git
2016-04-13 02:16:54 +00:00
git clone https://github.com/metamaps/metamaps.git
2016-01-17 02:17:02 +00:00
Now there is a couple other things we are going to need which is nodejs, postgresql, libpq-dev and redis-server
2016-01-17 02:17:02 +00:00
sudo apt-get install nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install postgresql
sudo apt-get install libpq-dev
sudo apt-get install redis-server
2016-01-17 02:17:02 +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
2016-04-13 02:16:54 +00:00
rvm install $(cat metamaps/.ruby-version)
While that is running, you can open another terminal and install the ES6 code
npm install
npm run build
2016-01-17 02:17:02 +00:00
Now we also need to copy .example-env to a new file named .env. Review the
configuration in here to see if you need any changes.
cp .example-env .env
2016-04-13 02:16:54 +00:00
Now run inside your metamaps folder:
2016-01-17 02:17:02 +00:00
gem install bundle
bundle install
2016-01-17 02:17:02 +00:00
in your top level directory for metamaps. This is a lengthy process so you might want to go and make a coffee or something :)
2016-01-17 02:17:02 +00:00
All right now we need to make sure your postgres password is the same as
it is listed in the .env file so we are going to set it by
sudo -u postgres psql
2016-01-17 02:17:02 +00:00
Use these commands to set the password to 3112 and then quit:
\password postgres
\q
2016-01-17 02:17:02 +00:00
now we can use rake to create, load the schema into, and load db/seeds.rb
into the postgres database:
2017-07-26 00:06:27 +00:00
rake db:create
2017-07-26 16:22:34 +00:00
rake db:schema:load
rake db:seed
2016-01-17 02:17:02 +00:00
Open a new terminal, navigate to the metamaps directory, and execute the
server:
2014-09-03 15:31:59 +00:00
rails s
2017-07-25 23:52:11 +00:00
NOTE: if you want to actively develop on the javascript in /frontend use
npm run build:watch
2015-01-23 03:59:11 +00:00
and dont forget to run the other server for realtime...
2017-07-25 23:52:11 +00:00
node realtime/realtime-server.js
to start a webpack build process that updates the build everytime you make code changes
2014-09-03 15:40:08 +00:00
2016-01-17 02:17:02 +00:00
Now you're all set enjoy your personal server of metamaps :) Navigate your browser to localhost:3000 once you have the server running. Sign in with the default account
2014-09-03 15:40:08 +00:00
2016-01-17 02:17:02 +00:00
email: user@user.com
password: toolsplusconsciousness
2014-09-03 15:40:08 +00:00
OR create a new account at /join, and use access code 'qwertyui'
Start mapping and programming!