## SMAWA server installation instructions

1. On a Linux server install (or check that is is installed):

  a) webserver (Apache or NGINX)
  
  b)  PHP
  
  c) MySQL
  
  d) phpmyadmin
  
  
 
 2. using phpmyadmin
 
  a) create a database named 'smawa'
  
  b) import file 'smawa.sql' into the database
  
  c) create user named 'smawa' and give him full access to the database
  
  
 3) Setup the web server
 
  a) copy contents of the src folder to the server HTTP folder /boxes/smawa/
  
  b) Set executable permission to all the php files
  
  c) set write permission to all the txt files
  
  d) edit the file 'dbapi.php' and enter the database password in the line 
  
	$dbPass="*write_here_the_password*"; 
  
  
  4) Setup processes 
  
   a) install *PM2* process management tool
    
   [installation instructions)](https://pm2.io/docs/runtime/guide/installation/)
   
   b) from the /boxes/smawa/ folder type in the command line these two instructions:
   
		PM2 start "php process.php"
		
		PM2 start "php history.php"
	
	
   c) check that they are running by typing:
   
  		PM2 list 


You server is ready.
  
  