wiki:Ushahidi

Version 15 (modified by jorrit, 8 years ago) (diff)

--

Install Ushahidi V3

  1. Get an amazon instance with Ubuntu 16.4
  2. Install required packages
    apt-get update
    
    apt-get upgrade
    
    # for api
    apt-get install mysql-server mysql-client apache2 curl libcurl3 libcurl3-dev php-curl php-memcache memcached vsftpd php-+cli php-mcrypt php-curl php-mysql  php-gd unzip  php-imap php-json php-mbstring php-xml phpunit 
    
    # for client
    apt-get install build-essential
    
    update-rc.d mysql defaults
     
    a2enmod rewrite
    
    service apache2 restart
    
  3. Install Composer
    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
    
  4. Create ushahidi user
    useradd --create-home --shell /bin/bash ushahidi
    passwd ushahidi
    su - ushahidi
    
  5. Create DB
    mysql -u root -p
    
    CREATE DATABASE ushahidi_db;
    GRANT ALL ON ushahidi_db.* to ushahidi_user@localhost IDENTIFIED BY 'ushahidi-db-password';
    quit;
    
  6. Download API
    cd ~
    git clone https://github.com/ushahidi/platform.git
    
  7. Create env file
    cd ~/platform
    cat > .env << EOL
    DB_HOST=localhost
    DB_NAME=ushahidi_db
    DB_TYPE=MySQLi
    DB_USER=ushahidi_user
    DB_PASS=ushahidi-db-password
    EOL
    
  8. Install dependencies
    bin/update 
    

Build the client

  1. Get Nodejs
    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install nodejs
    
  2. Clone client repo
    git clone https://github.com/ushahidi/platform-client.git
    
  3. Install dependencies
    cd platform-client
    npm install -g gulp
    npm install
    
  4. build client
    BACKEND_URL=http://myapi.server/
    gulp build