wiki:Ushahidi

Install Ushahidi V3

  1. Get a system with CentOS7
  2. download Ushahidi platform
    mkdir /var/www/ushahidi
    cd /var/www/ushahidi
    git clone https://github.com/ushahidi/platform.git
    
  3. Install requirements
    yum install epel-release
    yum install mariadb-server php-imap php-mcrypt php-mbstring
    
  4. Install composer
    cd /tmp
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    
  5. Create the DB
    mysql -u root
    CREATE DATABASE ushahidi_db;
    GRANT ALL ON ushahidi_db.* to ushahidi_user@localhost IDENTIFIED BY 'ushahidi-db-password';
    quit;
    
  6. Create env file
    cat > .env << EOL
    DB_HOST=localhost
    DB_NAME=ushahidi_db
    DB_TYPE=MySQLi
    DB_USER=ushahidi_user
    DB_PASS=ushahidi-db-password
    EOL
    
  7. Edit config
    cd platform/httpdocs
    mv template.htaccess .htaccess
    cd ../application/config
    cp init.php environments/development
    
  8. Edit init.php
    return array(
    	'base_url'    => '/',
    	'index_file'  => index.php,
    	'charset'     => 'utf-8',
    	'errors'      => TRUE,
    	'profile'     => FALSE,
    	'caching'     => FALSE,
    );
    
  9. Enable directories for writing by Apache
    cd /var/www/ushahidi/platform
    chown apache application/logs application/cache application/media/uploads
    
  10. Install dependencies
  1. Download API
    cd ~
    git clone https://github.com/ushahidi/platform.git
    
  2. 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
    
  3. 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
    sudo -i
    cd /home/ushahidi/platform-client
    npm install -g gulp
    npm install
    
  4. build client
    BACKEND_URL=http://localhost/
    gulp build
    
Last modified 8 years ago Last modified on 07/05/16 23:19:29