Updating README for server.
authorrtrimana <rtrimana@uci.edu>
Thu, 21 Mar 2019 21:48:21 +0000 (14:48 -0700)
committerrtrimana <rtrimana@uci.edu>
Thu, 21 Mar 2019 21:48:21 +0000 (14:48 -0700)
version2/src/server/README.txt

index 6eb138f6b5792ea362a707d80e988e42e74aa76a..b858ca596d6e1876f8b2ad02997fc464dfdc126d 100644 (file)
@@ -1,7 +1,14 @@
+Setup on Ubuntu 14.04.6 LTS (GNU/Linux 3.13.0-165-generic x86_64):
+==================================================================
+
+Required Packages:
+------------------
 1) Requires apache2
+
 2) Requires fastcgi (libapache2-mod-fastcgi and libfcgi-dev)
 
-Setup on ubuntu
+Installation:
+-------------
 1) Install modules
 
 2) Add .htaccess file in /var/www/html
@@ -17,16 +24,52 @@ AuthName "Private"
 AuthUserFile /var/www/html/foo.iotcloud/.htpasswd
 Require valid-user
 
-4) In apache2.conf, add to the /var/www directory section:
+4) In apache2.conf (/etc/apache2/apache2.conf), add to the /var/www directory section:
 AllowOverride FileInfo AuthConfig
 
-5) In the sites-enabled/000-default.conf file, add the line:
+5) In the sites-enabled/000-default.conf (/etc/apache2/sites-enabled/000-default.conf) file, add the line:
 SetEnv IOTCLOUD_ROOT /iotcloud/
 
 6) Create the /iotcloud directory.
 
-7) Create the account directory in the /iotcloud directory.  For example, test.iotcloud and give it permissions that the apache daemon can write to.
+7) Create the account directory in the /iotcloud directory.  
+For example, test.iotcloud and give it permissions that the apache daemon can write to.
 
 8) Compile cloud server by typing make
 
 9) Copy it to the cgi-bin directory.
+
+10) Make sure that the 'rewrite' module is loaded. Run on the command prompt:
+sudo a2enmod rewrite
+
+11) Make sure that the 'cgid' module is loaded. Run on the command prompt:
+sudo a2enmod cgid
+
+12) Restart the apache server. Run on the command prompt:
+sudo service apache2 restart
+
+
+
+Additional Resources
+====================
+
+Apache2 Debugging Commands
+--------------------------
+Please check the following log files for any errors after installation.
+
+sudo cat /var/log/apache2/access.log
+sudo cat /var/log/apache2/error.log
+
+
+Curl command for testing salt creation
+--------------------------------------
+1) Once the server is set up, run:
+curl -X POST http://dc-6.calit2.uci.edu/test.iotcloud/?req=getsalt
+
+2) If there is any error, error messages will be printed.
+Then we need to double check the steps as listed above.
+
+3) If everything is good, then there is no error message to be printed.
+At this point the folder /iotcloud/test.iotcloud/ should contain the 
+"queuestatus" and a number of "SLOTx" blocks.
+