Skip to content

instructions for installing locally the Smart Boarding app

Notifications You must be signed in to change notification settings

bogdan-lucaci/sb-local-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Smart Boarding local install

  1. Instructions for installing locally the Smart Boarding app
  2. Update DB
  3. Export WSL install under Windows 10
  4. Import WSL install under Windows 10



Instructions for installing locally the Smart Boarding app

  1. clone phs and onboarding into <your-local-path>
    git clone https://github.com/tipul07/phs ./phs
    git clone https://[git token]@github.com/Smart2Pay/Onboarding ./onboarding
  2. install Ubuntu from Microsoft Store
  3. create your user + switch to sudo mode sudo su
  4. install php 7.4 and addons
    apt-get install -y php7.4 php7.4-fpm php7.4-cli php7.4-json php7.4-soap php7.4-xml php7.4-bcmath php7.4-xmlrpc php7.4-bz2 php7.4-curl php7.4-mbstring php7.4-xsl php7.4-gd php7.4-intl php7.4-mysql php7.4-zip php7.4-ssh2
  5. update the default limits inside '/etc/php/7.4/apache2/php.ini'
    upload_max_filesize=64M
    post_max_size=64M
  6. update all, install some utils (if needed) and apache
    apt update
    apt-get update && apt-get install -y curl imagemagick apt-utils software-properties-common openssl cron mc git zip telnet
    apt install apache2
    check if http://localhost/ is accessible and apache installed correctly
  7. navigate to '/var' and remove 'www' folder
    cd /var/
    rm -rf www
  8. create the symlink for your local project to 'www' folder
    ln -sfn /mnt/<your-local-path> /var/www
  9. disable the default site
    a2dissite 000-default
  10. create www.conf file inside <your-local-path> with this content and copy it to apache's sites folder from Ubuntu's console
    cp -i /mnt/<your-local-path>/www.conf /etc/apache2/sites-available/
  11. enable the added site
    a2ensite www
  12. install and start mysql
    apt-get install mysql-server mysql-client libmysqlclient-dev
    service mysql start
  13. open mysql's console and create the DB
    mysql
    create database <your-DB-name>;
    * exit mysql console with CTRL+D
  14. obtain a SmartBoarding DB sql file, rename it to <your-DB-name>.sql and copy it to <your-local-path>
    then, from Ubuntu's console, copy the DB to mysql install folder
    cp -i /mnt/<your-local-path>/<your-DB-name>.sql /var/lib/mysql/<your-DB-name>/
  15. open mysql's console and import the DB
    mysql
    USE <your-DB-name>;
    SOURCE <your-DB-name>.sql;
  16. still inside mysql console, create your DB user
    CREATE USER '<your-username>' @'%' IDENTIFIED BY '<your-password>';
    GRANT ALL PRIVILEGES ON * . * TO '<your-username>'@'%';
  17. copy this script to <your-local-path> and run it inside Ubuntu
    ./create_symlinks
  18. create the htaccess file inside '<your-local-path>/phs' with this content
  19. update the following variables inside '<your-local-path>/phs/main.php':
    PHS_DB_USERNAME, PHS_DB_PASSWORD,
    PHS_DEFAULT_CRYPT_KEY (according to DB env),
    PHS_DEFAULT_CRYPT_INTERNAL_KEYS_ARR (according to DB env)
  20. retart both apache and mysql from Ubuntu's console
    service apache2 restart
    service mysql restart
  21. access http://localhost/phs


Update the data base to last structure

from Ubuntu console run php /var/www/phs/bin/phs update




Export WSL install under Windows 10

  • Get a full list of the distribution names
    wsl -l -v
  • Use the cd command to navigate into the directory you want to save your export to
    wsl --export <distribution-name> <filename>.tar
    e.g.:   wsl --export Ubuntu-20.04 ubuntubackup.tar

Import WSL install under Windows 10

  • wsl --import <distribution-name> <install-location> <backup-location>\<backup-filename>.tar
    e.g.:   wsl --import Ubuntu-20.04 C:\Users\MyPC\AppData\Local\Packages\Ubuntu C:\Users\MyPC\Documents\ubuntubackup.tar
  • To check it was imported correctly, run the wsl --list and you should see your newly imported distribution

About

instructions for installing locally the Smart Boarding app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages