Last active
March 8, 2021 05:24
-
-
Save qzm/968418a3463b75ddd3fd77484acdb96f to your computer and use it in GitHub Desktop.
Install Pritunl
This file contains 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 | |
# 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