New installation in Ubuntu

101 views
Skip to first unread message

john felipe urrego mejia

unread,
Jun 26, 2015, 12:34:52 PM6/26/15
to democra...@googlegroups.com
With notroot user

sudo apt-get update
#1 - Instalar Node.js
sudo apt-get install -y curl vim make
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

#2 - Instalar MongoDB
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10


echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org

sudo service mongod restart
sudo service mongod stop
sudo service mongod start

#3 - Instalar GIT y NANO
sudo apt-get install -y git nano

#4 - Clonar Repositorios

#5 - Configurar DOS

cd app
cp config/defaults.json config/production.json
vim config/production.json

  "locale": "en",
  "protocol": "http",
  "host": "dos.felipeurrego.com",
  "publicPort": 80,

  "organizationName": "DemocracyOS on GitHub",
  "organizationUrl": "https://github.com/DemocracyOS/app",

to

  "organizationName": "Democracia en linea",

  "staff": [],

to

  "staff": ["ingenierof...@gmail.com"],

    "token": 1234

to

    "token": 1234

sudo vim Makefile
now you can see NODE_ENV="developement"
cambiar a

  NODE_ENV="production"

cd notifier

modify config

sudo vim config/development.config.js

de 
hook: {
token: 'fake-hook-token'
},


hook: {
token: '1234'
},


and

                mandrill: {
                        token: '8FkG6qSPtEwqlj6-8rB1RQ', // API KEY FROM MANDRILL
                        from: {
                                email: 'no-r...@democracyos.org', //aca cambiamos a 
                                name: 'DemocracyOS'
                        }
                },


mandrill: {
token: '8FkG6qSPtEwqlj6-8rB1RQ',
from: {
name: 'Democracia en linea'
}
},


vim ~/.netrc
login ____________________
password x-oauth-basic

sudo reboot

cd app/notifier/
npm install


sudo npm install -g forever

forever start app.js


{
  "app": "notifier",
  "port": 9001,
  "version": "0.3.0",
  "apiUrl": "/api"
}

cd ..

echo export NODE_ENV=production >> ~/.bash_profile

echo export NODE_PATH=/home/felipe/app >> ~/.bash_profile
echo export NODE_PATH=/home/notroot/app >> ~/.bash_profile
source ~/.bash_profile

sudo npm install

ALL GOOD

node ./bin/dos-install && node ./bin/dos-build && node index.js

fatal : no remote found for dependency "yields/prevent".

And make clean and all again:


Again:


And make clean and make:



events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:905:11)
    at Server._listen2 (net.js:1043:14)
    at listen (net.js:1065:10)
    at Server.listen (net.js:1139:5)
    at Object.server.listen (/home/notroot/app/lib/server-factory/index.js:19:21)
    at listen (/home/notroot/app/index.js:26:12)
    at Array.forEach (native)
    at Object.<anonymous> (/home/notroot/app/index.js:25:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
make: *** [run] Error 8

Please help
Tnks

Guido Vilariño

unread,
Jun 26, 2015, 2:31:38 PM6/26/15
to john felipe urrego mejia, democra...@googlegroups.com
EADDRINUSE means something is bound to the port you're running the server on. Try a different port number.

The 'fatal : timeout of 5000ms exceeded...'s have to do with 'Component' and its dependency with the github API. We will be moving away from that and to browserify in our next big release. For the time being, just remember to add Github credentials to your .netrc as described on our installation guide.

--
You received this message because you are subscribed to the Google Groups "DemocracyOS/app" group.
To unsubscribe from this group and stop receiving emails from it, send an email to democracyos-a...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

john felipe urrego mejia

unread,
Jun 26, 2015, 2:36:44 PM6/26/15
to democra...@googlegroups.com, ingenierof...@gmail.com
Yes and that is done:

vim ~/.netrc
login HERE CODE
password x-oauth-basic

Guido Vilariño

unread,
Jun 26, 2015, 3:08:23 PM6/26/15
to john felipe urrego mejia, democra...@googlegroups.com
Your netrc is wrong

`login` should be your github username
`password` should be your API token

It seems they changed that on the Component docs

john felipe urrego mejia

unread,
Jun 26, 2015, 3:29:04 PM6/26/15
to democra...@googlegroups.com, ingenierof...@gmail.com
Client ID or Client Secret

john felipe urrego mejia

unread,
Jun 26, 2015, 4:23:21 PM6/26/15
to democra...@googlegroups.com
https://github.com/settings/tokens/new,

/home/notroot/.netrc:

  login johnfelipe
  password 40 caracteres

/home/notroot/.bashrc:

export GITHUB_USERNAME="johnfelipe"

export GITHUB_PASSWORD="40 caracteres"

But still problems

Guido Vilariño

unread,
Jun 28, 2015, 10:17:11 AM6/28/15
to john felipe urrego mejia, democra...@googlegroups.com
Then the issue you're facing is why we're moving away from component. Sadly, I can only advice that you retry after a while and hope to not hit the github API limit :/
Reply all
Reply to author
Forward
0 new messages