Skip to content

Semi automated install

Peter Willendrup edited this page Jan 23, 2018 · 22 revisions
  1. Install a Debian 9 system - preferably including openssh-server, wget and sudo

  2. Transfer the latest version of our installation bootstrap script to the machine, e.g. via wget or scp. Place it in e.g. /tmp

  3. If you have a mediawiki backup from an previous system (generate it via the medawiki backup script, place that folder also in e.g. /tmp

  4. As root, cd to /tmp and run ./bootstrap.sh [mediawiki_backup_folder_DATE]. (The mediawiki backup folder is optional, but recommended!)

This will

  • 4.1 Install mcstas, nginx our Django web simulator, moodle and mediawiki - with all needed dependencies and with a set of default nginx "sites", as shown below.
  • 4.2 The script will prompt you for relevant passwords. (You will have to give a password typically one or three times - in the first case the script takes care of setting the password, in the latter case a Debian package requests a password after which the script ask what it was for further configuration.
  • 4.3 Key accounts/passwords are set up for MySQL access (moodle), PostgreSQL access (mediawiki), LDAP (Django-apps, moodle and mediawiki), plus the definition of a Django administration account.
  • 4.4 Set up an LDAP-password changer software (ssp)
  • 4.5 Set up a simple static-html based landing page at /landing/
  • 4.6 After a successful run you will get a summary of passwords and accounts printed to your terminal - looking like this:
Essential setup done, here is a summary:

LDAP setup:
domainname: dc=mcstas,dc=org
admin string: cn=admin,dc=mcstas,dc=org
password: zxcvbn

MySQL setup:
username: root
password: qwerty

PosgreSQL/mediawiki setup:
username: wikiuser
password: asdfgh
database: my_wiki

Django setup:
username: djangoadmin
password: qazwsxedc
email-adress: admin@localhost

[ ok ] Starting system uwsgi_mcweb daemon:.
  1. Let's assume your system is running on the IP address 192.168.33.159 - after the script finishes, a number of softwares are still pending installation (Moodle, Piwik...) - so please consult these first! Moodle first:
root@debian:/srv/mcweb/moodle# sudo -u www-data -s
www-data@debian:/srv/mcweb/moodle$ moosh plugin-install -f qbehaviour_regexpadaptivewithhelpnopenalty 2017050100
Installing
	name:    qbehaviour_regexpadaptivewithhelpnopenalty
	version: 2017050100
Done
www-data@debian:/srv/mcweb/moodle$ moosh plugin-install -f qbehaviour_regexpadaptivewithhelp 2017050100
Installing
	name:    qbehaviour_regexpadaptivewithhelp
	version: 2017050100
-->qbehaviour_regexpadaptivewithhelpnopenalty
++ Success ++
Done
www-data@debian:/srv/mcweb/moodle$ moosh plugin-install -f qtype_regexp 2017050100
Installing
	name:    qtype_regexp
	version: 2017050100
-->qbehaviour_regexpadaptivewithhelp
++ Success ++
Done
www-data@debian:/srv/mcweb/moodle$ moosh plugin-install qtype_algebra 
Installing
	name:    qtype_algebra
	version: 2017121900
-->qtype_regexp
++ Success ++
Done
  1. Next is Piwik, consult http://192.168.33.159/piwik/. Please set up the database with MySQLi access via the account above. Database name could be e.g. piwik, and set up "websites" corresponding to your moodle and mediawiki installations.

  2. Optionally now create / restore a Moodle course via

  • 7.1 - Platform course admin and user upload site at http://192.168.33.159/superlogin/
  • 7.2 - (Store a copy of a earlier course template in /srv/mcweb/moodle-course-templates/ for it to appear in the above site)
  1. As a summary, the sites below should now be available on your machine: