University of Skövde Code Viewer and Course Organization System
Make sure you have a working install of apache2 and other needed packages. Look at the wiki page for this at Configuring web server for LenaSYS installation for further information.
To install a fresh copy of LenaSYS on your system an installer has been created called 'install.php'. This installer is located in the LenaSYS directory. What the installer will do is help you create a new user in the MySQL database and a new database and fill it with some test data (if desired) to help you get started.
1. To start the installation, put the LenaSYS directory at the place you want the system located.
2. When the the directory is in the right place, go to the installer from a web browser of your choosing.
3. Set permissions for Apache.
4. Database credentials used by the system
The box should be checked if you provided an existing database or/and user and wish to overwrite this. (WARNING! THIS WILL DESTROY ALL PREVIOUS INFORMATION IN THIS DATABASE).
There is also an option to run the installer as an transaction. If something goes wrong this can be unticked to find the exact SQL-query that's causing trouble.
The installation should now be completed and the website should be linked to the database.
If LenaSYS is still not functional, possible errors may be found in \apache2\logs. It is very possible that the installer promts you to change upload_max_filesize in ini.php. Make sure that the webserver is restarted after any changes to php.ini. Another issue commonly encountered is ": PHP Fatal error: Uncaught PDOException:could not find driver...". To solve this, enbale the following drivers in the ini.php file by uncommenting them: php_pdo.dll, php_pdo_mysql.dll, php_pdo_odbc.dll and php_pdo_sqlite.dll.
If the zip function to work your server needs to have to zip plugin installed and activated. on linux you need to do: sudo apt-get install php7.2-zip (if the server is running a different php install the right version or ZIP-ARCHIVE) sudo /etc/init.d/apache2 restart
for windows: should be built in to php. please google ZIP-ARCHIVE if it still don't work.
The you need to give the LenaSYS directory enough permissions to read and write for this you can do "chmod -R 777 folder"
Note: For the push notification system to work the server needs to use https, so make sure that is set up and valid.
To set up https, look at the guide on this wiki page: Getting a free ssl certificate and installing it when not having access to port 80
Note: Only install if there is no other push notifications installation on the system already, if an installation already exists follow the guide further below for instructions for that.
sudo apt-get install php7.0-curl php7.0-gmp php7.0-mbstring
Install composer in your LenaSYS folder ( https://getcomposer.org/ )
Go into the LenaSYS folder run the following command. This command will download all the packages listed in the 'composer.json' file and download them to the 'vendor/' folder.
php composer.phar install
define("PUSH_NOTIFICATIONS_VAPID_PUBLIC_KEY", "Insert your public key here");
define("PUSH_NOTIFICATIONS_VAPID_PRIVATE_KEY", "Insert your private key here");
define("PUSH_NOTIFICATIONS_VAPID_EMAIL", "Insert your email address here");
If you do not have a private and public key already, you can use the tool at /DuggaSys/pushnotifications.php?action=genkeys to generate keys locally for usage. You need to be logged in as an administrator in LenaSys to use the tool. These keys should be shared to every installation on the same server.
If another installation of LenaSys has push notification installed it is much simpler to copy that.
Find another installation of LenaSys with push notifications installed. In the following steps we will assume an installation exists at /[groupname]/[username]/LenaSYS
Copy the folder vendor/ from /[groupname]/[username]/LenaSYS to /[groupname]/[YOURusername]/LenaSYS
Open the file /[groupname]/[username]/coursesyspw.php and locate the rows containing code like this
define("PUSH_NOTIFICATIONS_VAPID_PUBLIC_KEY", "Insert your public key here");
define("PUSH_NOTIFICATIONS_VAPID_PRIVATE_KEY", "Insert your private key here");
define("PUSH_NOTIFICATIONS_VAPID_EMAIL", "Insert your email address here");