{"action":"created","issue":{"url":"https://api.github.com/repos/mitro-co/mitro/issues/56","labels_url":"https://api.github.com/repos/mitro-co/mitro/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/mitro-co/mitro/issues/56/comments","events_url":"https://api.github.com/repos/mitro-co/mitro/issues/56/events","html_url":"https://github.com/mitro-co/mitro/issues/56","id":41629006,"number":56,"title":"Building/running a server on Linux","user":{"login":"wilsonk","id":38802,"avatar_url":"https://avatars.githubusercontent.com/u/38802?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonk","html_url":"https://github.com/wilsonk","followers_url":"https://api.github.com/users/wilsonk/followers","following_url":"https://api.github.com/users/wilsonk/following{/other_user}","gists_url":"https://api.github.com/users/wilsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonk/subscriptions","organizations_url":"https://api.github.com/users/wilsonk/orgs","repos_url":"https://api.github.com/users/wilsonk/repos","events_url":"https://api.github.com/users/wilsonk/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2014-09-01T11:19:15Z","updated_at":"2015-07-24T10:48:20Z","closed_at":null,"body":"@evanj @vijayp \r\n\r\n##### *Hello everyone. I have managed to build and run mitro-core on Scientific Linux 6.2 (yes that is old...but any newer release should work also), and access it from a separate machine on my internal network. This has some overlap with #53 but I thought I should file it separately. Here are my notes on the process:*\r\n\r\n\r\n\r\n### **For Scientific Linux (or CentOs or any Redhat Enterprise Linux derivative)**\r\n\r\ngit clone https://github.com/mitro-co/mitro\r\n\r\n```sudo yum install nodejs.x86_64;\r\nyum install postgresql.x86_64;\r\nyum install postgresql-server;\r\nyum install postgresql-contrib```\r\n\r\nInstall java sdk from website as described in mitro-core/README.md\r\nuse the jdk-7u67-linux-x64.rpm\r\n\r\n```sudo rpm -Uvh jdk-7u67-linux-x64.rpm```\r\n```sudo yum install npm.noarch```\r\n\r\n**Remember to**\r\n```export NODE_PATH=/<path-to-mitro>/mitro/browser-ext/api/build/node/lib/node_modules```\r\nin your .bashrc or .profile\r\n\r\nRun sysctl commands as per ```mitro-core/README```, if you want to run multiple postgres instances\r\nRun ```build.sh``` as per ```mitro-core/README``` and then the other commands to set up a postgresql db.\r\n\r\n>If you get an error with:\r\n>```psql -c 'create database mitro;' ```\r\n>like  >>>  *FATAL: database \"\\<user_name\\>* does not exist' \r\n>then run\r\n>```createdb <user_name> -U <user_name>``` followed by ```psql -c 'create database mitro;' ``` again\r\n>Once that is finished, then build the db:\r\n>```postgres -d build/postgres```  \r\n>*(you may want an & after that to make it run in the background as this process won't return)*\r\n\r\n**And the run the server:**\r\n```ant server```\r\nin the mitro-core directory. Things should be ready to go *(you might also want an & here to run in the background)*\r\n\r\nIf you have a problem with 'ant server' indicating 'invalid source release' then you need to install java-1.7.0-openjdk.x86_64 and java-1.7.0-openjdk-devel.x86_64 via yum because the rpm didn't install properly earlier\r\n\r\n**Test**\r\nConnect to:  https://localhost:8443/mitro-core/api/BuildMetadata with a browser and you should see\r\n> \"commit: ... some commit hash\r\n> describe: fatal: No names found, cannot describe anything.\r\n> build time: ... some date\"\r\n\r\n\r\n**Now build the extension and run tests:**\r\n```cd browser-ext/api```\r\n./build.sh\r\n\r\n```cd js/cli```\r\n```./runtests.sh FAST && echo \"SUCCESS\"```\r\n\r\n\r\n#### **To test out the extension in a browser:**\r\n\r\nBuild the 'safari/firefox/chrome'-debug extension in browser-ext/login with 'make safari-debug' (or firefox/chrome)\r\n\r\nIf you run into problems with 'nopt' not being found then you need to \r\n```npm install -g nopt``` \r\n\r\nIf that still doesn't work then you can run \r\n```npm install nopt```\r\n in the browser-ext/third_party/hogan.js/bin directory\r\n\r\n\r\n##### **Install the extension into the browser (I chose safari...for a chrome install, see the browser-ext/README)**\r\n\r\n> #### *If you don't have a safari extension developer certificate then you will need to sign up for one*\r\n\r\n> Turn on Safari Developer Tools under 'Safari->Preferences'\r\n> Under 'Develop' in the tool bar you choose 'Show Extension Builder'\r\n> Click on the little '+' to add the safari-debug extension\r\n> Navigate to browser-ext/login/build/safari/ and choose the debug.safariextension directory\r\n> Click 'install' and the extension should be ready to use\r\n> Follow the regular \"Sign Up\" workflow to add a new user to the postgres db\r\n\r\n##### **NOTE:** You won't get an email sent to your login email account because emailer2.py is still missing from ansible\r\n\r\n##### **NOTE:** if you want to use a different machine on your network to test the extension, rather than the mitro server machine, then edit the *browser-ext/login/common/config/cofig.debug.js* file and change the two 'localhost' entries to an ip address like '192.168.1.66', or wherever the server is running"},"comment":{"url":"https://api.github.com/repos/mitro-co/mitro/issues/comments/124471635","html_url":"https://github.com/mitro-co/mitro/issues/56#issuecomment-124471635","issue_url":"https://api.github.com/repos/mitro-co/mitro/issues/56","id":124471635,"user":{"login":"rogerwlucas","id":13471174,"avatar_url":"https://avatars.githubusercontent.com/u/13471174?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerwlucas","html_url":"https://github.com/rogerwlucas","followers_url":"https://api.github.com/users/rogerwlucas/followers","following_url":"https://api.github.com/users/rogerwlucas/following{/other_user}","gists_url":"https://api.github.com/users/rogerwlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerwlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerwlucas/subscriptions","organizations_url":"https://api.github.com/users/rogerwlucas/orgs","repos_url":"https://api.github.com/users/rogerwlucas/repos","events_url":"https://api.github.com/users/rogerwlucas/events{/privacy}","received_events_url":"https://api.github.com/users/rogerwlucas/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T10:48:20Z","updated_at":"2015-07-24T10:48:20Z","body":"Hi Wilsonk,\r\nWe've done more digging here.  The problem with the \"ant test\" not running in mitro-core was a PostgreSQL version issue.  RedHat 6 comes with PG 8.x but Java was using drivers for PG 9.2.  We upgraded PG to 9.2 using the PostgreSQL official RPMs and the tests now pass reliably.\r\n\r\nAfter more playing with Chrome, \"npm install ...\", etc we also have the browser-ext cli tests passing too.\r\n\r\nThe final problem is that we cannot sign up new users.  We have installed the debug version of Mitro into Chrome and have seen a connection to the local ant server \"GET /mitro-core/ServerRejects?deviceId=/BYMlIJkvuUwGhgN4vESf29B/To=\" so it's obviously doing something as soon as the Mitro extension starts.\r\n\r\nBut, when we go through the \"Sign Up\" process in the Mitro Chrome extension, we enter username + password then click \"Sign Up\".  We get the spinner but it never completes.\r\n\r\nWe don't see any more messages on the \"ant server\" console either so I suspect that the signup request is not happening for some reason.\r\n\r\nAny ideas?\r\n\r\nThanks,\r\n\r\nRoger"}}