The purpose of this document is to install and validate the (global) mAP environment.
The mAP is required for installing mAP-API. Please see here for installation of mAP.
$ unzip cloudgateway-api-1.0.zip $ sudo mv api /usr/local/. |
$ cd /usr/local/api # Adjust permissions $ sudo chown -R apache.apache /usr/local/api/app/tmp $ sudo chmod +x /usr/local/api/cake/console/cake $ sudo chmod +x /usr/local/api/app/vendors/shells/*.php $ sudo chmod -R 777 /usr/local/api/app/tmp/cache # Deletion of Log Files and Cache Files $ sudo rm -rf app/tmp/cache/models/* $ sudo rm -rf app/tmp/cache/persistent/* $ sudo rm -rf app/tmp/cache/views/* $ sudo rm -rf app/tmp/logs/* # Copy of Configuration Files $ cp app/config/database.template.php app/config/database.php $ cp app/config/core.template.php app/config/core.php # Put random data on 'Security.salt' and 'Security.cipherSeed' in core.php. $ vi app/config/core.php |
Include following configuration in /etc/httpd/conf/httpd.conf
<VirtualHost _default_:80> Redirect permanent / https://[HOST-NAME-OF-THIS-SERVER]/ </VirtualHost> Alias /api "/usr/local/api" <Directory "/usr/local/api"> Order allow,deny Allow from all Options ExecCGI FollowSymLinks AllowOverride All Require all granted </Directory> <Location "/api"> SSLVerifyClient optional_no_ca SSLOptions +ExportCertData </Location> |
Include following configuration in /usr/local/api/.htaccess.
RewriteRule services/(.*)$ ../map/connector/services/$1 [L] |
$ sudo systemctl restart httpd.service |
/usr/local/api/app/config/system.php
In the 'entityID', set the entityID of this server.
In the 'ip' in 'api', set the IP addresses to allow connections.
If you want to run on multiple servers to set the following.
/usr/local/map/app/config/database.php
In the 'host' => '', set the host of database server.
@@ -76,9 +76,9 @@ var $default = array( 'driver' => 'mysql', 'persistent' => false, - 'host' => 'localhost', + 'host' => 'YOUR-DATABASE-SERVER', 'login' => 'vouser', 'password' => 'xxxxx', 'database' => 'vo', |