Project

General

Profile

ResourceSpace Installation » History » Version 4

Jessie Lee, 04/18/2016 10:51 AM

1 1 Jessie Lee
{{lastupdated_at}} by {{lastupdated_by}}
2
3
{{>toc}}
4
5
h1. ResourceSpace Installation
6
7
h2. Initial setup
8
9
* 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
10 2 Jessie Lee
* ResourceSpace can be either installed via  SVN or via tar.gz. I did it via the point release tar.gz file
11
* unpack in /var/www/resourcespace and chown -R www-data:www-data /var/www/resourcespace
12
* if file storage will be in /var/www/resourcespace create filestore directory if it will be elsewhere create a symlink to the filestore directory
13 1 Jessie Lee
14 2 Jessie Lee
h2. Database (mysql)
15
16
* log into mysql as root user
17
* create database resourcespace; 
18
* create user resourcespace 
19
<pre>CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
20
CREATE DATABASE IF NOT EXISTS resourcespace;
21
GRANT ALL PRIVILEGES ON resourcespace.* TO 'username'@'localhost' IDENTIFIED BY 'password';</pre>
22
23
h2. Apache config
24
25
* No site.conf file is included so we will have to make our own. 
26
<pre><IfModule mod_ssl.c>
27
<VirtualHost *:443>
28
        ServerName cloud.example.org
29
30
        ServerAdmin webmaster@localhost
31
        DocumentRoot /var/www/resourcespace
32
        <Directory /var/www/resourcespace>
33
                AllowOverride All
34
                Options Indexes FollowSymLinks MultiViews
35
                Order allow,deny
36
                allow from all
37
        </Directory>
38
    <Directory /var/www/resourcespace/filestore>
39
    Options -Indexes
40
    AllowOverride All
41
    Order allow,deny
42
    allow from all
43
    </Directory>
44
45
        ErrorLog ${APACHE_LOG_DIR}/resourcespace.error.log
46
        CustomLog ${APACHE_LOG_DIR}/resourcespace.access.log combined
47
48
SSLCertificateFile /path/to/cert.pem
49
SSLCertificateKeyFile /path/to/key.key
50
Include /etc/letsencrypt/options-ssl-apache.conf
51
Header always add Strict-Transport-Security "max-age=15768000"
52
</VirtualHost>
53
</pre>
54
* We should also create .htaccess file in the filestore directory as an added measure
55
<pre><ifModule mod_authz_core.c>
56
Require all denied
57
</ifModule>
58
59
# line below if for Apache 2.2
60
<ifModule !mod_authz_core.c>
61
deny from all
62
Satisfy All
63
</ifModule>
64
65
# section for Apache 2.2 and 2.4
66
IndexIgnore *
67
</pre>
68 3 Jessie Lee
69
h2. PhP requirements
70
71
* to fufill php requirements it is best to use .htaccess files
72
* you may have to edit the global php.ini file in /etc/php5/apache2/php.ini
73
* create this .htaccess file in /var/www/resourcespace/
74
<pre><IfModule mod_php5.c>
75
  php_value SecFilterEngine off
76
  php_value SecFilterScanPOST off
77
  php_value memory_limit 512M
78
  php_value post_max_size 100M
79
  php_value upload_max_filesize 100M
80
  php_value short_open_tag off
81
  </IfModule>
82
</pre>
83
84
h2. First Run Wizard
85
86
* Now we should be able to open up the url for resourcespace and point resourcespace to the database and user we set
87
* set an admin user and password
88
* go to admin ---> System installation check to make sure everything is set. 
89
90
h2. Cron
91
92
* a cron job is required to run background work. 
93
* #crontab -u www-data -e
94
* add wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php to run daily
95
* 1 0 * * * wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php >/dev/null 2>&1
96
97 4 Jessie Lee
h2. SMTP
98 3 Jessie Lee
99
* smtp server must be set in the config.php which is located in /var/www/resourcespacedirectory/include/config.php
100
<pre>$email_from = '';
101
$email_notify = '';
102
$use_smtp=true;
103
$smtp_secure='tls';
104
$smtp_host='';
105
$smtp_port=587;
106
$smtp_auth=true;
107
$smtp_username='';
108
$smtp_password='';
109
$use_phpmailer=true;
110 1 Jessie Lee
</pre>
111 4 Jessie Lee
112
h2. SSL setup
113
114
* run let's encrypt and follow setup
115
* edit /var/www/resourcespace/include/config.php $baseurl variable from http://site.com to https://site.com
Go to top