rm -f /etc/nginx/sites-enabled/default
update-rc.d nginx enable
service nginx start
Create user account
Create virtual environment
Install Solr
MDID currently requires Solr 8; you may have to adjust the exact version as available when running the following commands. Please note that you want to use at least version 8.11.1 of Solr to avoid the Log4j vulnerability.
Configure MySQL
Create database
Create a new MySQL database or restore an existing database from a previous MDID3 installation. Adjust the database name, user name, and password as needed:
Configure MDID
Edit /opt/mdid/config/settings.py and change the database and other settings as needed.
Also, if possible, change the asterisk in ALLOWED_HOSTS to your server host name, if you know it, for example ['mdid.yourschool.edu'].
Run the following command to initialize static files and migrate the database to the latest version:
Configure nginx
Place your server SSL certificate files named server.key and server.crt in /opt/mdid/ssl, or generate some sample self-signed certificates for temporary use:
Configure crontab
Configure supervisor
Shibboleth support
To use Shibboleth for user authentication, follow the steps below to modify your working MDID installation to connect to your IdP.
Install additional packages
Configure Shibboleth
Configure your Shibboleth SP in /etc/shibboleth/shibboleth2.xml, including setting the application ID to mdid.
Make sure to add a key or generate a new key using shib-keygen.
Uncomment the attributes you want to use in attribute-map.xml.
Configure apache
Modify /etc/apache2/ports.conf and change all instances of port 80 to port 8100.
Enable apache modules and configure site:
Configure nginx
In your nginx site file /opt/mdid/service-config/nginx, change the port number in the proxy_pass statement from 8001 to 8100.
Configure MDID
Add the following settings to your MDID configuration file at /opt/mdid/config/settings.py, changing attribute names as required:
By default MDID will not show a logout link, but if your Shibboleth setup allows logouts, you can configure the logout URL with
sudo -iu mdid # switch to mdid user
cd /opt/mdid # or another directory of your choice
python3 -m virtualenv -p python3 venv
source venv/bin/activate
pip install mdid
# or to install test version:
# pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mdid
mdid init
mkdir -p /opt/solr_install /opt/solr
cd /opt/solr_install
wget https://archive.apache.org/dist/lucene/solr/8.11.1/solr-8.11.1.tgz
tar xzf solr-8.11.1.tgz solr-8.11.1/bin/install_solr_service.sh --strip-components=2
./install_solr_service.sh solr-8.11.1.tgz -f -d /opt/solr -i /opt/solr_install -n
sed -i -E 's/#SOLR_HEAP="512m"/SOLR_HEAP="2048m"/' /etc/default/solr.in.sh
ln -s /opt/mdid/var/solr /opt/solr/data/mdid
chown -R solr:solr /opt/solr/data/mdid/
service solr start
ln -s /opt/mdid/service-config/mysql /etc/mysql/mysql.conf.d/mdid.cnf
service mysql restart
mysql -u root
create database mdid character set utf8;
create user mdid@localhost identified by 'rooibos';
grant all privileges on mdid.* to mdid@localhost;
\q
sudo -iu mdid # switch to mdid user
source /opt/mdid/venv/bin/activate
mdid collectstatic
mdid migrate