Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@qzm
Last active March 8, 2021 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qzm/968418a3463b75ddd3fd77484acdb96f to your computer and use it in GitHub Desktop.
Save qzm/968418a3463b75ddd3fd77484acdb96f to your computer and use it in GitHub Desktop.
Install Pritunl
#!/bin/bash
# makecache
yum makecache
# Install Dependencies
yum install yum-cron tuned centos-release -y
# config yum-cron
sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron.conf
sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron.conf
# Add MongoDB Repo
tee /etc/yum.repos.d/mongodb-org.repo << EOF
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
EOF
# Add Pritunl Repo
tee /etc/yum.repos.d/pritunl.repo << EOF
[pritunl]
name=Pritunl Repository
baseurl=https://repo.pritunl.com/stable/yum/centos/$releasever/
gpgcheck=1
enabled=1
EOF
# install
yum makecache
yum -y install mongodb-org pritunl
# config systemctl
systemctl daemon-reload
systemctl start pritunl mongod yum-cron
systemctl enable pritunl mongod yum-cron
# config network speed
tuned-adm profile network-throughput
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment