-
Notifications
You must be signed in to change notification settings - Fork 250
Installation on Ubuntu Server 16.04 LTS
Recommended, See https://github.com/pwm-project/pwm/wiki/Ubuntu-Tomcat-Installation to install the latest version of tomcat from source. PWM requires the latest version of 8.5 which 16.04 does not provide. You should also use 9.x in any case.
UPDATE: I am working on revising this guide to use Ubuntu Server 20.04 LTS. Our current install failed during migration to a Virtual Machine and I rather start over from scratch and reload the dB. Also Ubuntu Server 16.04 LTS is only supported till April 2021. I had updated my instance of Ubuntu Server to 18.04 LTS without any issues to PWM. So bare with me while I go through this process. ~ T3chGuy77 (02/11/2021)
Installing on Linux server is a breeze. This installation guide is specifically for Ubuntu Server 16.04 LTS. But it should work for any recent Ubuntu or Debian based linux installation, make adjustments as needed. Pwm needs a MySql Database or AD to store some settings. This is not covered in this guide. This guide assumes you are installing PWM 1.7.x. PWM versions 1.9 and greater require at least tomcat 8.5 or greater and cannot be used with 16.04's default packages.
-
Install the needed packages
- Install Apache2
sudo apt-get install -y apache2
- Install PHP
sudo apt-get install -y php libapache2-mod-php
- Install Apache2
-
Install Tomcat8 & Tomcat8 Tools
sudo apt-get install -y tomcat8 tomcat8-docs tomcat8-examples tomcat8-admin
-
Add roles and a user to tomcat in order to install .war files trough the browser later on: Edit
/etc/tomcat8/tomcat-users.xml
and add the following as children oftomcat-users
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<role rolename="manager-script"/>
<user username="username" password="password" roles="manager-gui,admin-gui,manager-script"/>
-
Reboot tomcat for changes to take effect
sudo service tomcat8 restart
-
Note: Restarting may take long (couple of minutes for me). You can install haveged entropy gathering daemon to greatly reduce tomcat startup delays, but this is not required:
sudo apt-get install -y haveged
-
-
Install PWM through your webbrowser
- Download the latest WAR version and rename the war file to pwm.war if it isn't already.
- Go to http://server-ip:8080/manager/html in your browser and login when prompted with the credentials defined in
/etc/tomcat8/tomcat-users.xml
- Use the gui to install the pwm.war file
- If you have issues issues with this, then you can upload pwm.war to the webapps folder
located at
/var/lib/tomcat8/webapps/
instead
- If you have issues issues with this, then you can upload pwm.war to the webapps folder
located at
- You will get
5083 ERROR_ENVIRONMENT_ERROR (application path is not specified)
on the site, please follow next step
-
Create a folder for pwm to store config files and add it's path to pwm.
-
Create a folder somewhere and make 'tomcat8' the owner
- Example commands if you want to create the folder in
/media/pwm/
:mkdir /media/pwm/ chown tomcat8 /media/pwm/
- Example commands if you want to create the folder in
-
tell pwm about the newly created folder:
-
edit
/etc/default/tomcat8
and add in the top line the below then save itPWM_APPLICATIONPATH=/media/pwm
-
-
Note: If you rename the war for example to password.war, pwd.war, or idm.war, change PWM_ to your wars name like below
PASSWORD_APPLICATIONPATH=/media/pwm
-
Restart tomcat8 for the changes to take effect
sudo service tomcat8 restart
-
-
Now go to http://server-ip:8080/pwm/
- Configure pwm
-
Test away but when done configuring I highly suggest to secure with a cert! WARNING: Until you secure your site passwords are being sent in the clear!
- To secure follow the Tomcat8 instructions below
-
That's it, enjoy PWM!!
Still a work in progress......