Last active
December 5, 2022 19:03
-
-
Save tuxpowered/d084381991443b6427baa22fbdeedf24 to your computer and use it in GitHub Desktop.
Pritunl Debian 11 Install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Install required tools | |
| apt install -y curl sudo gnupg2 | |
| # Create repository entry | |
| sudo tee /etc/apt/sources.list.d/pritunl.list << EOF | |
| deb https://repo.pritunl.com/stable/apt bullseye main | |
| EOF | |
| # Add apt key and install mongo repository (Using 4.4 as 5.0 is not offiically supported in debian 11 yet) | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7568D9BB55FF9E5287D586017AE645C0CF8E292A | |
| wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | |
| echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | |
| sudo apt-get update | |
| # Install, start, and enable mongodb pritunl and wireguard | |
| sudo apt-get install -y mongodb-org pritunl wireguard | |
| sudo systemctl start pritunl mongod | |
| sudo systemctl enable pritunl mongod | |
| # Adjust number of openfiles on system. | |
| sudo sh -c 'echo "* hard nofile 64000" >> /etc/security/limits.conf' | |
| sudo sh -c 'echo "* soft nofile 64000" >> /etc/security/limits.conf' | |
| sudo sh -c 'echo "root hard nofile 64000" >> /etc/security/limits.conf' | |
| sudo sh -c 'echo "root soft nofile 64000" >> /etc/security/limits.conf' | |
| # Generate setup-key needed to complete setup from webUI | |
| pritunl setup-key | |
| # You will need to run this after the above has been setup to login. | |
| #pritunl default-password | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment