Project

General

Profile

Support #718

Updated by Daniel Curtis over 8 years ago

This is a guide on how I installed the Firefox Auth and Content components to form the Firefox Accounts Server on FreeBSD. 

 h2. Prepare the Environment 

 * Make sure the system is up to date: 
 <pre> 
 pkg update && pkg upgrade -y 
 </pre> 

 * Install a few dependencies: 
 <pre> 
 pkg install git node npm gmp graphicsmagick redis gmake python2 py27-virtualenv sqlite py27-sqlite3 gcc48 
 </pre> 

 * Add the Firefox Accounts user: 
 <pre> 
 pw add user -n ff-accounts -m -s /bin/sh -c "Firefox Accounts" 
 </pre>  
 * Create a symlink for bash in order for the fxa-local-dev package to install correctly: 
 <pre> 
 ln -s /usr/local/bin/bash /bin/bash 
 </pre>  

 h2. Install Accounts Server 

 * Switch to the Firfox accounts user: 
 <pre> 
 su - ff-accounts 
 </pre> 

 * Then set the CC, CXX, and CPP environment variables to use GCC instead of Clang: 
 <pre> 
 export CC=gcc48 
 export CXX=g++48 
 export CPP=cpp48 
 </pre> 

 * Create a symlink for bash in order for the fxa-local-dev package to install correctly: 
 <pre> 
 ln -s /usr/local/bin/bash /bin/bash 
 </pre>  

 * Download the local development setup scripts from GitHub: 
 <pre> 
 git clone https://github.com/mozilla/fxa-local-dev 
 </pre> 

 * Edit the @install_all.sh@ setup script: 
 <pre> 
 cd fxa-local-dev 
 vi _scripts/install_all.sh 
 </pre> 
 #* On line 45, change the make build to gmake build: 
 <pre> 
 cd syncserver; gmake build; cd .. 
 </pre> 

 * Install the local development scripts: 
 <pre> 
 cd fxa-local-dev 
 npm install 
 </pre> 

 * When the install finishes the scripts will automatically start all of the Firefox Accounts components. When the components finish loading open a web browser and go to http://localhost:3030 

 * To stop the Firefox Accounts server use pm2: 
 <pre> 
 pm2 kill 
 </pre> 
 #* *NOTE*: By default, account information is stored in memory and +will not be saved+ if the server reboots. 

 h2. Resources 

 * https://docs.services.mozilla.com/howtos/run-fxa.html

Back