-
Notifications
You must be signed in to change notification settings - Fork 4
/
How_To_Install_HRScan2.txt
120 lines (106 loc) · 6.52 KB
/
How_To_Install_HRScan2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
-----MINIMUM REQUIREMENTS-----
HRScan2 requires at least a Raspberri Pi Model B+ or greater.
HRScan2 should run on any x86 or x64 based PC.
HRScan2 requires a Debian Linux-based operating system w/3rd party audio license.
-----PREFACE-----
For this guide, it is assumed that the user is installing HRScan2
on a PC which meets the above conditions. This guide will walk
a new user through the installation of HRScan2 on a freshly installed
version of Lubuntu 16.04 LTS with no pre-existing dependencies.
For a walkthrough of installing a Ubuntu distro, visit.....
http://www.ubuntu.com/download/desktop/install-ubuntu-desktop
IMPORTANT NOTE: During this guide we will be setting-up a fully
functional, yet somewhat customized, LAMP stack including
linux, Apache2.4, MySQL, and PHP7.0. If you DO NOT want to have
a LAMP stack installed on your local machine DO NOT install this software.
This software was designed to be run on a dedicated server setup for NAS
duties.
In the abscence of required dependencies, HRScan2 will make every attempt
to complete a user-suppied operation while logging errors every step of the way.
Administrators are responsible for monitoring and maintaining the dependencies
of their servers.
--------------------------------------------------
-----STEP 1 - INSTALL APACHE 2.4-----
-sudo apt-get update
-sudo apt-get install apache2
-sudo apt-get install curl
--------------------------------------------------
-----STEP 2 - INSTALL PHP7 & PLUGINS-----
-sudo apt-get install php libapache2-mod-php php-mysql
-sudo apt-get install php-all-dev
**YOU MAY NEED TO CHANGE THE VERSIONS BELOW DEPENDING ON YOUR UBUNTU/PHP VERSION**
-sudo apt-get install php7.1-zip (replace version number with whatever version you want)
-sudo apt-get install php7.1-gd (replace version number whatever version you want)
-sudo apt-get install php-curl
**EDIT THE "php.ini" FILE LOCATED IN "/etc/php/7.1/apache2/php.ini"**
-sudo leafpad /etc/php/7.1/apache2/php.ini
**SEARCH FOR AND MODIFY THE FOLLOWING VALUES CAREFULLY**
max_execution_time = 90
max_input_time = 90
memory_limit = 512M
;Use 256 - 384M for Raspberry Pis
display_errors = On
;Leave display errors = Off if you're not debugging HRScan2 youself
post_max_size = 3000M
upload_max_filesize = 3000M
max_file_uploads = 100
zlib.output_compression = On
**SAVE THE MODIFIED "php.ini" FILE AND EXIT LEAFPAD**
-sudo service apache2 restart
--------------------------------------------------
-----STEP 4 - INSTALL BASIC FEATURE DEPENDENCIES-----
-sudo apt-get install clamav
**REBOOT THE SERVER**
--------------------------------------------------
-----STEP 5 - INSTALL HRScan2-----
**CREATE A DIRECTORY IN "/var/www/html" NAMED "HRProprietary"**
**CREATE ANOTHER DIRECTORY IN "/var/www/html/HRProprietary" NAMED "HRScan2"**
**VISIT "http://github.com/zelon88/HRScan2" AND DOWNLOAD THE LATEST HRScan2 .zip FILE
TO YOUR DOWNLOADS FOLDER**
**EXTRACT HRScan2.zip TO YOUR DOWNLOADS FOLDER**
**COPY THE CONTENTS OF THE "HRScan2-master" FOLDER TO "/var/www/html/HRProprietary/HRScan2"*
-sudo leafpad /var/www/html/HRProprietary/HRScan2/config.php
**CAREFULLY READ AND COMPLETELY FILL OUT THE CONFIG.PHP FILE!!!**
**HRScan2 REQUIRES A SAFE LOCATION TO CREATE USER CLOUD DIRECTORIES. TO FACILITATE
THIS YOU MUST CREATE A !!!NEW!!! DIRECTORY AND ENTER IS AS THE "$ScanLoc"**
**ONCE YOU HAVE CREATED A CLOUD LOCATION "$ScanLoc" CONTINUE**
-sudo chmod -R 0755 /path/to/my/ScanLoc
-sudo chown -R www-data /path/to/my/ScanLoc
-sudo chgrp -R www-data /path/to/my/ScanLoc
**IF YOU DO NOT HAVE A VALID "$ScanLoc" AND PROPER PERMISSIONS, HRScan2 ...WILL...NOT...WORK!!!**
**CAREFULLY READ AND COMPLETELY FILL OUT YOUR ADMIN USER AND LOGIN INFO FOR HRAI**
-sudo chmod -R 0755 /var/www/html
-sudo chown -R www-data /var/www/html
-sudo chgrp -R www-data /var/www/html
**OPTIONAL -sudo useradd -g www-data USERNAME #adds your user to www-data usergroup.**
**MAKE SURE THAT ANY UPDATES YOU PERFORM TO HRScan2 HAVE PROPER PERMISSIONS!!!**
**SCRUTINIZE / DOUBLE-CHECK THE PERMISSIONS FOR ANY FILES ADDED TO /HRScan2 AFTER
INSTALLATION IS COMPLETE!!!**
IMPORTANT NOTE: If you need to correct permissions later, perform the following commands
from above again...
-sudo chmod -R 0755 /var/www/html
-sudo chown -R www-data /var/www/html
-sudo chgrp -R www-data /var/www/html
--------------------------------------------------
-----STEP 6 - VISIT YOUR SCANNER!!!-----
Go to http://localhost/HRProprietary/HRScan2/scanCore.php to view your Scanner! The computer you install HRC2 onto
should be considered a staitionary server that you can safely point your "Static NAT" at and access from anywhere. To accomplish
these things, follow the additional steps below.
--------------------------------------------------
-----STEP 7 - ADD FIREWALL EXCEPTIONS AND SETUP STATIC NAT ON YOUR ROUTER-----
-According to the manual for the manufacturer of your broadband router, find the local IP address where you can make changes to it's
configuration. Try entering "192.168.1.1" into a browser. If you are greeted with a login screen, check the bottom of your router or your
system administrator for the required information. If you are not greeted with any tangible login screen other than an error message,
seek the owners manual for the specific make and manual for your router.
-Once you have gained access to your router, seek the settings which control Firewall exceptions and Static NAT settings.
You should seek a way to enter the local IPv4 address of the machine running HRScan2.
You should also seek a way to enter a "Static NAT" entry for the local IPv4 address of the machine running HRScan2.
You should also forward port 80 to the internal IPv4 of the machine running HRScan2.
To configure SSL encryption, add port 443 to your port forwarding rules and visit www.letsencrypt.com for instructions on obtaining and installing an SSL certificate.
-HRScan2 will create and maintain complete segregation of user files during operation, and will not impose restrictions on user uploads
(however PHP will, so verify that your php.ini file is set correctly!!!).
-You and your users should now be able to access your server via any standard web browser by entering the IPv4 from your
ISP into the address bar. Alternatively you can purchase a domain name and point it at the IPv4 instead to obtain a ".com"
(or similar) address for your new installation.
--------------------------------------------------
If you have any problems with HRScan2 please create an issue on http://github.com/zelon88/HRScan2