Project

General

Profile

ResourceSpace Installation » History » Revision 3

Revision 2 (Jessie Lee, 04/18/2016 10:31 AM) → Revision 3/4 (Jessie Lee, 04/18/2016 10:50 AM)

{{lastupdated_at}} by {{lastupdated_by}} 

 {{>toc}} 

 h1. ResourceSpace Installation 

 h2. Initial setup 

 * The following packages are needed for installation: apache2 mysql-server php5 php5-dev php5-gd php5-mysql imagemagick ghostscript antiword xpdf libav-tools postfix libimage-exiftool-perl cron wget 
 * ResourceSpace can be either installed via    SVN or via tar.gz. I did it via the point release tar.gz file 
 * unpack in /var/www/resourcespace and chown -R www-data:www-data /var/www/resourcespace 
 * if file storage will be in /var/www/resourcespace create filestore directory if it will be elsewhere create a symlink to the filestore directory 

 h2. Database (mysql) 

 * log into mysql as root user 
 * create database resourcespace;  
 * create user resourcespace  
 <pre>CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; 
 CREATE DATABASE IF NOT EXISTS resourcespace; 
 GRANT ALL PRIVILEGES ON resourcespace.* TO 'username'@'localhost' IDENTIFIED BY 'password';</pre> 

 h2. Apache config 

 * No site.conf file is included so we will have to make our own.  
 <pre><IfModule mod_ssl.c> 
 <VirtualHost *:443> 
         ServerName cloud.example.org 

         ServerAdmin webmaster@localhost 
         DocumentRoot /var/www/resourcespace 
         <Directory /var/www/resourcespace> 
                 AllowOverride All 
                 Options Indexes FollowSymLinks MultiViews 
                 Order allow,deny 
                 allow from all 
         </Directory> 
     <Directory /var/www/resourcespace/filestore> 
     Options -Indexes 
     AllowOverride All 
     Order allow,deny 
     allow from all 
     </Directory> 

         ErrorLog ${APACHE_LOG_DIR}/resourcespace.error.log 
         CustomLog ${APACHE_LOG_DIR}/resourcespace.access.log combined 

 SSLCertificateFile /path/to/cert.pem 
 SSLCertificateKeyFile /path/to/key.key 
 Include /etc/letsencrypt/options-ssl-apache.conf 
 Header always add Strict-Transport-Security "max-age=15768000" 
 </VirtualHost> 
 </pre> 
 * We should also create .htaccess file in the filestore directory as an added measure 
 <pre><ifModule mod_authz_core.c> 
 Require all denied 
 </ifModule> 

 # line below if for Apache 2.2 
 <ifModule !mod_authz_core.c> 
 deny from all 
 Satisfy All 
 </ifModule> 

 # section for Apache 2.2 and 2.4 
 IndexIgnore * 
 </pre> 

 h2. PhP requirements 

 * to fufill php requirements it is best to use .htaccess files 
 * you may have to edit the global php.ini file in /etc/php5/apache2/php.ini 
 * create this .htaccess file in /var/www/resourcespace/ 
 <pre><IfModule mod_php5.c> 
   php_value SecFilterEngine off 
   php_value SecFilterScanPOST off 
   php_value memory_limit 512M 
   php_value post_max_size 100M 
   php_value upload_max_filesize 100M 
   php_value short_open_tag off 
   </IfModule> 
 </pre> 

 h2. First Run Wizard 

 * Now we should be able to open up the url for resourcespace and point resourcespace to the database and user we set 
 * set an admin user and password 
 * go to admin ---> System installation check to make sure everything is set.  

 h2. Cron 

 * a cron job is required to run background work.  
 * #crontab -u www-data -e 
 * add wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php to run daily 
 * 1 0 * * * wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php >/dev/null 2>&1 

 h2. mail setup 

 * smtp server must be set in the config.php which is located in /var/www/resourcespacedirectory/include/config.php 
 <pre>$email_from = ''; 
 $email_notify = ''; 
 $use_smtp=true; 
 $smtp_secure='tls'; 
 $smtp_host=''; 
 $smtp_port=587; 
 $smtp_auth=true; 
 $smtp_username=''; 
 $smtp_password=''; 
 $use_phpmailer=true; 
 </pre> 
Go to top