SAML Server: Difference between revisions

m
added more
(created page)
 
m (added more)
Line 7:
 
 
sudo apt-get upgrade
sudo apt-get install php7.0 apache2 php7.0-mcrypt php7.0-ldap php7.0-mysql libapache2-mod-php7.0 php-xml
 
cd /var
sudo wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v1.14.12/simplesamlphp-1.14.12.tar.gz
sudo tar zxf simplesamlphp-1.14.12.tar.gz
cd simplesamlphp-1.14.12/
sudo mv simplesamlphp-1.14.12 simplesamlphp
sudo rm -f simplesamlphp-1.14.12.tar.gz
cd simplesamlphp/
 
sudo wgetnano https://github.comvar/simplesamlphp/simplesamlphpconfig/releases/download/v1.14.12/simplesamlphp-1.14.12.tarconfig.gzphp
sudo nano /var/simplesamlphp/config/authsources.php
sudo nano /var/simplesamlphp/metadata/saml20-idp-hosted.php
sudo nano /var/simplesamlphp/metadata/saml20-sp-remote.php
 
sudo nano /etc/apache2/sites-available/000-default.conf
sudo tar zxf simplesamlphp-1.14.12.tar.gz
 
cd simplesamlphp-1.14.12/
 
Now check if the webpage is available on below page:
sudo mv simplesamlphp-1.14.12 simplesamlphp
http://<ip-address-of-server>/simplesamlphp
sudo rm -f simplesamlphp-1.14.12.tar.gz
 
cd /var
cd simplesamlphp/
sudo openssl genrsa -des3 -out Certificate.key 4096
sudo openssl rsa -in Certificate.key -out Certificate.pem
sudo openssl req -new -key Certificate.key -out Certificate.csr
sudo openssl x509 -req -days 9999 -in Certificate.csr -signkey Certificate.key -out Certificate.crt
 
sudo nano cd /etc/apache2/sites-available/000-default.conf
sudo a2enmodmkdir ssl
 
sudo nanomv /var/simplesamlphpCertificate.key /configetc/config.phpapache2/ssl
sudo mv /var/Certificate.csr /etc/apache2/ssl
sudo mv /var/Certificate.crt /etc/apache2/ssl
sudo mv /var/Certificate.pem /etc/apache2/ssl
 
sudo servicea2enmod apache2 restartssl
sudo service apache2 restart
 
sudo nano /etc/apache2/sites-available/000-default.conf
cd /var
sudo a2ensite ssl
sudo openssl genrsa -des3 -out Certificate.key 4096
sudo a2enmod ssl
sudo openssl rsa -in Certificate.key -out Certificate.pem
sudo service apache2 restart
sudo openssl req -new -key Certificate.key -out Certificate.csr
sudo openssl x509 -req -days 9999 -in Certificate.csr -signkey Certificate.key -out Certificate.crt
 
sudo phpenmod mcrypt
cd /etc/apache2/
sudo mkdirservice sslapache2 restart
 
Now the page should be available over https:
sudo mv /var/Certificate.key /etc/apache2/ssl
http://<ip-address-of-server>/simplesamlphp
sudo mv /var/Certificate.csr /etc/apache2/ssl
sudo mv /var/Certificate.crt /etc/apache2/ssl
sudo mv /var/Certificate.pem /etc/apache2/ssl
 
sudo a2enmod ssl
sudo service apache2 restart
 
sudo nano /etc/apache2/sites-available/000-default.conf
sudo a2ensite ssl
sudo a2enmod ssl
sudo service apache2 restart
 
sudo phpenmod mcrypt
 
sudo service apache2 restart