11 Commits
dev ... 2.0

42 changed files with 1103 additions and 232 deletions

106
README.md
View File

@ -1,107 +1,9 @@
# The Linux List # The Linux List
### ⚠️ Super Ultra Untested ⚠️
## `~Script Installs~` ## `~Script Installs~`
### Tested scrips ✔️ ## Now Just One script!
### Broken Scripts ### `wget -O scripts.sh https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/2.0/scripts/scripts.sh && bash scripts.sh`
### Untested Scripts ⚠️
---
## Gitea
### ✔️ Install
### `wget -O giteainstall.sh https://sop.wtf/sh/giteainstall && bash giteainstall.sh`
### ✔️ Uninstall
### `wget -O gitearemove.sh https://sop.wtf/sh/gitearemove && bash gitearemove.sh`
### ✔️ Update
### `wget -O giteaupdate.sh https://sop.wtf/sh/giteaupdate && bash giteaupdate.sh`
---
## MariaDB
### ✔️ Install
### `wget -O mariadbinstall.sh https://sop.wtf/sh/mariadbinstall && bash mariadbinstall.sh`
### ✔️ Uninstall
### `sudo apt remove mariadb-server mariadb-client -y && apt autoremove -y`
---
## phpMyAdmin
### ✔️ Install
### `wget -O pmainstall.sh https://sop.wtf/sh/pmainstall && bash pmainstall.sh`
### ✔️ Uninstall (Only works for Apache2 currently)
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
### ✔️ Update (Only works for Apache2 currently)
### `wget -O pmaupdate.sh https://sop.wtf/sh/pmaupdate && bash pmaupdate.sh`
---
## MongoDB
### ⚠️ Install
### `wget -O mongodbinstall.sh https://sop.wtf/sh/mongodbinstall && bash mongodbinstall.sh`
### ✔️ Uninstall
### `sudo apt remove mongodb-org libssl1.1 -y && sudo apt autoremove`
---
## Gitlab
### ✔️ Install
### `wget -O gitlabinstall.sh https://sop.wtf/sh/gitlabinstall && bash gitlabinstall.sh`
### ✔️ Uninstall
### `wget -O gitlabuninstall.sh https://sop.wtf/sh/gitlabuninstall && bash gitlabuninstall.sh`
---
## Gogs
### ✔️ Install
### `wget -O gogsinstall.sh https://sop.wtf/sh/gogsinstall && bash gogsinstall.sh`
### ✔️ Uninstall
### `wget -O gogsuninstall.sh https://sop.wtf/sh/gogsuninstall && bash gogsuninstall.sh`
---
## Wordpress
### ✔️ Install
### `wget -O wpinstall.sh https://sop.wtf/sh/wpinstall && bash wpinstall.sh`
---
## Fail2Ban
### ✔️ Install
### `wget -O fail2baninstall.sh https://sop.wtf/sh/fail2baninstall && bash fail2baninstall.sh`
---

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Caddy Server? [Y/n] " input read -r -p "Would you like to install Caddy Server? [Y/n] " input
@ -16,11 +16,49 @@ do
;; ;;
esac esac
done done
caddy_ver="0.3.2"
apt install golang git curl -y # Check if curl is installed
cd /tmp if [ ! -x /usr/bin/curl ] ; then
wget https://github.com/caddyserver/xcaddy/releases/download/v"$caddy_ver"/xcaddy_"$caddy_ver"_linux_amd64.tar.gz CURL_NOT_EXIST=1
tar xvf xcaddy_"$caddy_ver"_linux_amd64.tar.gz xcaddy apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
rm -rf /tmp/go/
mkdir /tmp/go/
cd /tmp/go/
VER="1.20.7"
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-amd64.tar.gz" "https://go.dev/dl/go"$VER".linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-armv6l.tar.gz" "https://go.dev/dl/go"$VER".linux-armv6l.tar.gz"
fi
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-386.tar.gz" "https://go.dev/dl/go"$VER".linux-386.tar.gz"
fi
rm -rf /usr/local/go && tar -C /usr/local -xzf *.tar.gz
chmod +x /usr/local/go/bin/go
export PATH=$PATH:/usr/local/go/bin
cd ~
rm -rf /tmp/caddy
mkdir /tmp/caddy
cd /tmp/caddy
VER=$(curl --silent "https://api.github.com/repos/caddyserver/xcaddy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g')
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_amd64.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_"$VER"_linux_amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_armv6.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_armv6.tar.gz"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_armv7.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_linux_armv7.tar.gz"
fi
if [ -n "$(uname -a | grep armv5l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_armv5.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_linux_armv5.tar.gz"
fi
tar xvf *.tar.gz xcaddy
sudo mv xcaddy /usr/bin sudo mv xcaddy /usr/bin
mkdir ~/caddy mkdir ~/caddy
cd ~/caddy cd ~/caddy

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install fail2ban? [Y/n] " input read -r -p "Would you like to install fail2ban? [Y/n] " input

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Gitea? [Y/n] " input read -r -p "Would you like to install Gitea? [Y/n] " input
@ -18,42 +18,48 @@ do
done done
set -b set -b
ping -c1 "github.com" &>"/dev/null" ping -c1 "github.com" &>"/dev/null"
ping -c1 "api.github.com" &>"/dev/null"
ping -c1 "dl.gitea.io" &>"/dev/null"
ping -c1 "raw.githubusercontent.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access Github.com, that is needed to continue this Install." echo "I am unable to access one of the necessary domains that are needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then elif [[ "${#args[@]}" -eq 0 ]]; then
GITEA_VER="1.19.1" # Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
sudo systemctl stop gitea sudo systemctl stop gitea
sudo apt-get install git -y sudo apt-get install git -y
sudo wget -O /usr/local/bin/gitea htt://github.com/go-gitea/gitea/releases/download/v"$GITEA_VER"/gitea-"$GITEA_VER"-linux-amd64
sudo chmod +x /usr/local/bin/gitea
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386"
fi
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
sudo mv /tmp/gitea /usr/local/bin
sudo chmod +x /usr/local/bin/gitea
sudo mkdir -p /var/lib/gitea/{custom,data,log} sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea sudo chmod -R 750 /var/lib/gitea
sudo mkdir -v /etc/gitea sudo mkdir /etc/gitea
sudo chown -R root:git /etc/gitea sudo chown root:git /etc/gitea
sudo chmod -R 770 /etc/gitea sudo chmod 770 /etc/gitea
sudo echo " curl -fsSL -o /etc/systemd/system/gitea.service https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service
[Unit]
Description=Gitea
After=syslog.target
After=network.target
[Service]
RestartSec=3s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
[Install]
WantedBy=multi-user.target
" >> /etc/systemd/system/gitea.service
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable --now gitea sudo systemctl enable --now gitea
sudo systemctl start gitea sudo systemctl start gitea

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to uninstall Gitea? This is not reversible. [Y/n] " input read -r -p "Would you like to uninstall Gitea? This is not reversible. [Y/n] " input
@ -19,6 +19,8 @@ done
sudo systemctl stop gitea sudo systemctl stop gitea
sudo systemctl disable gitea sudo systemctl disable gitea
sudo rm -rf /etc/systemd/system/gitea.service sudo rm -rf /etc/systemd/system/gitea.service
echo "Backing up Files"
tar -cvzf gitea.tar.gz /var/lib/gitea/ /etc/gitea
sudo rm -rf /home/git sudo rm -rf /home/git
sudo userdel git sudo userdel git
sudo rm -rf /usr/local/bin/gitea sudo rm -rf /usr/local/bin/gitea
@ -26,3 +28,5 @@ sudo rm -rf /var/lib/gitea/*
sudo rm -rf /etc/gitea sudo rm -rf /etc/gitea
sudo ufw delete allow 3000 sudo ufw delete allow 3000
echo "Gitea has been uninstalled, and all files have are backed up in gitea.tar.gz, you can delete it at your discretion."

View File

@ -1,7 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to Update Gitea? [Y/n] " input read -r -p "Would you like to update Gitea? [Y/n] " input
case $input in case $input in
[yY][eE][sS]|[yY]) [yY][eE][sS]|[yY])
@ -15,20 +16,46 @@ do
;; ;;
esac esac
done done
set -b
ping -c1 "github.com" &>"/dev/null" ping -c1 "github.com" &>"/dev/null"
ping -c1 "api.github.com" &>"/dev/null"
ping -c1 "dl.gitea.io" &>"/dev/null"
ping -c1 "raw.githubusercontent.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access Github.com, that is needed to continue this Install." echo "I am unable to access one of the necessary domains that are needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then elif [[ "${#args[@]}" -eq 0 ]]; then
GITEA_VER="1.19.1" # Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
sudo systemctl stop gitea sudo systemctl stop gitea
sudo wget -O /usr/local/bin/gitea https://github.com/go-gitea/gitea/releases/download/v"$GITEA_VER"/gitea-"$GITEA_VER"-linux-amd64 if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386"
fi
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
sudo mv /tmp/gitea /usr/local/bin
sudo chmod +x /usr/local/bin/gitea sudo chmod +x /usr/local/bin/gitea
sudo chown -R git:git /var/lib/gitea sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea sudo chmod -R 750 /var/lib/gitea
sudo chown -R root:git /etc/gitea sudo chown root:git /etc/gitea
sudo chmod -R 770 /etc/gitea
sudo systemctl start gitea sudo systemctl start gitea
sudo ufw allow 3000
echo -e "=================================================================="
echo "Gitea has been updated!!"
echo -e "=================================================================="
fi fi
echo "Gitea has been updated!"

View File

@ -1,38 +0,0 @@
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Gitlab? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
sudo apt update && apt upgrade -y
sudo apt install tzdata curl ca-certificates openssh-server git -y
gpg_key_url="https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey"
curl -fsSL $gpg_key_url| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/gitlab.gpg
sudo tee /etc/apt/sources.list.d/gitlab_gitlab-ce.list<<EOF
deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ jammy main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ jammy main
EOF
sudo apt update
sudo apt install gitlab-ce
sudo ufw allow https
sudo ufw allow http
sudo ufw allow ssh
sudo ufw reload
echo -e "=================================================================="
echo "Congrats on installing GitLab Community Edition"
echo "These are your login credentials, make sure to change them."
echo "Username: root"
cat /etc/gitlab/initial_root_password | grep Password:
echo -e "=================================================================="

View File

@ -15,12 +15,19 @@ do
;; ;;
esac esac
done done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt install wget git -y sudo apt install wget git -y
GOGS_VER="0.13.0" wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
sudo wget -O linux_amd64.tar.gz https://dl.gogs.io/$GOGS_VER/gogs_"$GOGS_VER"_linux_amd64.tar.gz sudo adduser --disabled-login --gecos 'Gogs' git
sudo tar xvf linux_amd64.tar.gz git clone --depth 1 https://github.com/gogs/gogs.git gogs
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git cd gogs
go build -o gogs
./gogs web
sudo mkdir /var/log/gogs sudo mkdir /var/log/gogs
sudo chown -R git:git /var/log/gogs/ sudo chown -R git:git /var/log/gogs/
sudo echo " sudo echo "

44
scripts/goinstall.sh Normal file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
trap 'exit 130' INT
while true
do
read -r -p "Would you like to install Go Language? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
rm -rf /tmp/go/
mkdir /tmp/go/
cd /tmp/go/
VER=$(curl --silent "https://go.dev/dl/?mode=json" | grep '"version":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' | head -1)
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-amd64.tar.gz" "https://go.dev/dl/"$VER".linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-armv6l.tar.gz" "https://go.dev/dl/"$VER".linux-armv6l.tar.gz"
fi
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-386.tar.gz" "https://go.dev/dl/"$VER".linux-386.tar.gz"
fi
rm -rf /usr/local/go && tar -C /usr/local -xzf *.tar.gz
chmod +x /usr/local/go/bin/go
export PATH=$PATH:/usr/local/go/bin
cd ~

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Hockeypuck? [Y/n] " input read -r -p "Would you like to install Hockeypuck? [Y/n] " input
@ -16,7 +16,22 @@ do
;; ;;
esac esac
done done
sudo apt-get install bzr git mercurial golang -y if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt-get install bzr git mercurial -y
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
git clone https://github.com/hockeypuck/packaging /var/lib/hockeypuck git clone https://github.com/hockeypuck/packaging /var/lib/hockeypuck
cd packaging cd packaging
./prepare.bash ./prepare.bash

45
scripts/hugoinstall.sh Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
trap 'exit 130' INT
while true
do
read -r -p "Would you like to install Hugo? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
apt autoremove -y
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
rm -rf /tmp/hugo/
mkdir /tmp/hugo/
VER=$(curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"_linux-amd64.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"_linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"-arm64.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm64.tar.gz"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_"$VER"-arm.tar.gz"
fi
cd /tmp/hugo/
tar -xzf /tmp/hugo/*.tar.gz
sudo mv /tmp/hugo/hugo /usr/local/bin
cd ~

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Librenms? [Y/n] " input read -r -p "Would you like to install Librenms? [Y/n] " input
@ -16,7 +16,13 @@ do
;; ;;
esac esac
done done
sudo apt install acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip -y if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt install acl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip -y
sudo useradd librenms -d /opt/librenms -M -r -s "$(which bash)" sudo useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
cd /opt cd /opt
sudo git clone https://github.com/librenms/librenms.git sudo git clone https://github.com/librenms/librenms.git
@ -26,6 +32,6 @@ sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/boo
sudo setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ sudo setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo -u librenms bash -c './scripts/composer_wrapper.php install --no-dev' sudo -u librenms bash -c './scripts/composer_wrapper.php install --no-dev'
exit exit
sudo wget https://getcomposer.org/composer-stable.phar sudo curl -fsSL -o "composer-stable.phar" https://getcomposer.org/composer-stable.phar
sudo mv composer-stable.phar /usr/bin/composer sudo mv composer-stable.phar /usr/bin/composer
sudo chmod +x /usr/bin/composer sudo chmod +x /usr/bin/composer

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install MariaDB? [Y/n] " input read -r -p "Would you like to install MariaDB? [Y/n] " input
@ -16,7 +16,6 @@ do
;; ;;
esac esac
done done
apt update && apt upgrade -y apt update && apt upgrade -y
sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https mariadb-server mariadb-client -y sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https mariadb-server mariadb-client -y
echo -e "==================================================================" echo -e "=================================================================="

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Mastodon? [Y/n] " input read -r -p "Would you like to install Mastodon? [Y/n] " input
@ -15,7 +16,12 @@ do
;; ;;
esac esac
done done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
curl -sL https://deb.nodesource.com/setup_16.x | bash - curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install nodejs -y apt-get install nodejs -y
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Misskey? [Y/n] " input read -r -p "Would you like to install Misskey? [Y/n] " input
@ -16,7 +16,12 @@ do
;; ;;
esac esac
done done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
NODE_LTS= "18.12.1" NODE_LTS= "18.12.1"
sudo apt update && apt upgrade -y sudo apt update && apt upgrade -y
sudo apt install postgresql postgresql-contrib ffmpeg redis-server npm yarn -y sudo apt install postgresql postgresql-contrib ffmpeg redis-server npm yarn -y
@ -46,7 +51,7 @@ sed -e "s|user: example-misskey-pass = ''user: = '$PASSWD_GEN'|" >> .config/def
NODE_ENV=production yarn build NODE_ENV=production yarn build
yarn run init yarn run init
exit exit
sudo wget -O /etc/systemd/system/misskey.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/misskey.service curl -fsSL -o "/etc/systemd/system/misskey.service" https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/misskey.service
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable misskey.service sudo systemctl enable misskey.service
sudo systemctl start misskey.service sudo systemctl start misskey.service

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install MongoDB? [Y/n] " input read -r -p "Would you like to install MongoDB? [Y/n] " input
@ -16,7 +16,12 @@ do
;; ;;
esac esac
done done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt update && apt upgrade -y sudo apt update && apt upgrade -y
sudo apt install wget curl gnupg2 software-properties-common apt-transport-https ca-certificates lsb-release -y sudo apt install wget curl gnupg2 software-properties-common apt-transport-https ca-certificates lsb-release -y
sudo curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - sudo curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install phpMyAdmin? [Y/n] " input read -r -p "Would you like to install phpMyAdmin? [Y/n] " input
@ -20,10 +20,9 @@ while [ "$go" != 'apache' ] && [ "$go" != 'nginx' ]; do
read -p "Would you like to install using Nginx or Apache? (nginx/apache) " go read -p "Would you like to install using Nginx or Apache? (nginx/apache) " go
done done
if [ "$go" == 'nginx' ]; then if [ "$go" == 'nginx' ]; then
PHP_VER="8.2"
sudo apt update && apt upgrade -y sudo apt update && apt upgrade -y
sudo apt-get install build-essential lsb-release software-properties-common -y sudo apt-get install build-essential lsb-release software-properties-common -y
sudo add-apt-repository --yes ppa:ondrej/php && sudo apt install php$PHP_VER-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl nginx-full -y sudo add-apt-repository --yes ppa:ondrej/nginx && sudo add-apt-repository --yes ppa:ondrej/php && sudo apt install php-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl nginx-full php-mysql -y
sudo systemctl stop nginx sudo systemctl stop nginx
sudo wget -O /etc/nginx/conf.d/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmanginx.conf sudo wget -O /etc/nginx/conf.d/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmanginx.conf
sudo systemctl enable nginx sudo systemctl enable nginx
@ -51,13 +50,12 @@ intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}
echo -e "==================================================================" echo -e "=================================================================="
fi fi
if [ "$go" == 'apache' ]; then if [ "$go" == 'apache' ]; then
PHP_VER="8.2"
sudo apt update && apt upgrade -y sudo apt update && apt upgrade -y
sudo apt-get install build-essential lsb-release software-properties-common -y sudo apt-get install build-essential lsb-release software-properties-common -y
sudo add-apt-repository --yes ppa:ondrej/php && apt install apache2 libapache2-mod-php$PHP_VER php$PHP_VER-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y sudo add-apt-repository --yes ppa:ondrej/apache2 && apt install apache2 libapache2-mod-php php-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl php-mysql -y
sudo systemctl stop apache2 sudo systemctl stop apache2
sudo wget -O /etc/apache2/sites-enabled/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmaapache.conf sudo wget -O /etc/apache2/sites-enabled/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmaapache.conf
sudo systemctl restart php$PHP_VER-fpm sudo systemctl restart php-fpm
sudo systemctl reload apache2 sudo systemctl reload apache2
sudo systemctl enable apache2 sudo systemctl enable apache2
## Updating phpMyAdmin. ## Updating phpMyAdmin.

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to uninstall phpMyAdmin? [Y/n] " input read -r -p "Would you like to uninstall phpMyAdmin? [Y/n] " input

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to Update phpMyAdmin? [Y/n] " input read -r -p "Would you like to Update phpMyAdmin? [Y/n] " input
@ -16,27 +16,17 @@ do
;; ;;
esac esac
done done
PHP_VER="8.2" if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt update && apt upgrade -y sudo apt update && apt upgrade -y
sudo add-apt-repository --yes ppa:ondrej/php && apt install libapache2-mod-php$PHP_VER php$PHP_VER-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl apache2 -y
sudo systemctl stop apache2
sudo apt remove php8.1-fpm php8.1-* -y
sudo phpenmod mbstring
sudo a2dismod php$PHP_VER
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo a2enconf php$PHP_VER-fpm
sudo systemctl restart php$PHP_VER-fpm
sudo systemctl reload apache2
sudo systemctl enable apache2
sudo apt autoremove -y
PMA_VER="5.2.1"
sudo rm -rf /usr/share/phpmyadmin.bak sudo rm -rf /usr/share/phpmyadmin.bak
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
sudo mkdir /usr/share/phpmyadmin/ sudo mkdir /usr/share/phpmyadmin/
sudo wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -P /usr/share/phpmyadmin/ sudo curl -fsSL -o "/usr/share/phpmyadmin/" https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/ sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/ sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
@ -45,6 +35,7 @@ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share
randomBlowfishSecret=$(openssl rand -base64 22) randomBlowfishSecret=$(openssl rand -base64 22)
sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php
sudo systemctl restart apache2 sudo systemctl restart apache2
sudo systemctl restart nginx
echo -e "==================================================================" echo -e "=================================================================="
echo "phpMyAdmin has been updated!" echo "phpMyAdmin has been updated!"
echo -e "==================================================================" echo -e "=================================================================="

78
scripts/scripts.sh Normal file
View File

@ -0,0 +1,78 @@
#!/bin/bash
case $1 in
(install gitea)
wget -O giteainstall.sh https://sop.wtf/sh/giteainstall && bash giteainstall.sh
;;
(remove gitea)
wget -O gitearemove.sh https://sop.wtf/sh/gitearemove && bash gitearemove.sh
;;
(update gitea)
wget -O giteaupdate.sh https://sop.wtf/sh/giteaupdate && bash giteaupdate.sh
;;
(install hugo)
wget -O hugoinstall.sh https://sop.wtf/sh/hugoinstall && bash hugoinstall.sh
;;
(update hugo)
wget -O hugoinstall.sh https://sop.wtf/sh/hugoinstall && bash hugoinstall.sh
;;
(remove hugo)
rm -rf /usr/local/bin/hugo
;;
(install go)
wget -O goinstall.sh https://sop.wtf/sh/goinstall && bash goinstall.sh
;;
(update go)
wget -O goinstall.sh https://sop.wtf/sh/goinstall && bash goinstall.sh
;;
(remove go)
rm -rf /usr/local/go
;;
(install golang)
wget -O goinstall.sh https://sop.wtf/sh/goinstall && bash goinstall.sh
;;
(update golang)
wget -O goinstall.sh https://sop.wtf/sh/goinstall && bash goinstall.sh
;;
(remove golang)
rm -rf /usr/local/go
;;
(install mariadb)
wget -O mariadbinstall.sh https://sop.wtf/sh/mariadbinstall && bash mariadbinstall.sh
;;
(remove mariadb)
sudo apt remove mariadb-server mariadb-client -y && apt autoremove -y
;;
(install phpmyadmin)
wget -O pmainstall.sh https://sop.wtf/sh/pmainstall && bash pmainstall.sh
;;
(update phpmyadmin)
wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh
;;
(remove phpmyadmin)
wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh
;;
(install mongodb)
wget -O mongodbinstall.sh https://sop.wtf/sh/mongodbinstall && bash mongodbinstall.sh
;;
(remove mongodb)
sudo apt remove mongodb-org libssl1.1 -y && sudo apt autoremove
;;
(remove gogs)
wget -O gogsuninstall.sh https://sop.wtf/sh/gogsuninstall && bash gogsuninstall.sh
;;
(install gogs)
wget -O gogsinstall.sh https://sop.wtf/sh/gogsinstall && bash gogsinstall.sh
;;
(install wordpress)
wget -O wpinstall.sh https://sop.wtf/sh/wpinstall && bash wpinstall.sh
;;
(install wp)
wget -O wpinstall.sh https://sop.wtf/sh/wpinstall && bash wpinstall.sh
;;
(install fail2ban)
wget -O fail2baninstall.sh https://sop.wtf/sh/fail2baninstall && bash fail2baninstall.sh
;;
(install f2b)
wget -O fail2baninstall.sh https://sop.wtf/sh/fail2baninstall && bash fail2baninstall.sh
;;
esac

View File

@ -0,0 +1,70 @@
#!/usr/bin/env bash
trap 'exit 130' INT
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
rm -rf /tmp/go/
mkdir /tmp/go/
cd /tmp/go/
VER="1.20.7"
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-amd64.tar.gz" "https://go.dev/dl/go"$VER".linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-armv6l.tar.gz" "https://go.dev/dl/go"$VER".linux-armv6l.tar.gz"
fi
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/go/go"$VER".linux-386.tar.gz" "https://go.dev/dl/go"$VER".linux-386.tar.gz"
fi
rm -rf /usr/local/go && tar -C /usr/local -xzf *.tar.gz
chmod +x /usr/local/go/bin/go
export PATH=$PATH:/usr/local/go/bin
cd ~
rm -rf /tmp/caddy
mkdir /tmp/caddy
cd /tmp/caddy
VER=$(curl --silent "https://api.github.com/repos/caddyserver/xcaddy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g')
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_amd64.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_"$VER"_linux_amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_armv6.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_armv6.tar.gz"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_armv7.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_linux_armv7.tar.gz"
fi
if [ -n "$(uname -a | grep armv5l)" ]; then
curl -fsSL -o "/tmp/caddy/xcaddy_"$VER"_linux_armv5.tar.gz" "https://github.com/caddyserver/xcaddy/releases/download/v"$VER"/xcaddy_v"$VER"_linux_armv5.tar.gz"
fi
tar xvf *.tar.gz xcaddy
sudo mv xcaddy /usr/bin
mkdir ~/caddy
cd ~/caddy
xcaddy build
sudo mv caddy /usr/bin
sudo groupadd --system caddy
sudo useradd --system \
--gid caddy \
--create-home \
--home-dir /var/lib/caddy \
--shell /usr/sbin/nologin \
--comment "Caddy web server" \
caddy
sudo chown root:root /usr/bin/caddy
sudo chmod 755 /usr/bin/caddy
sudo mkdir /etc/caddy
sudo chown -R root:caddy /etc/caddy
sudo mkdir /etc/ssl/caddy
sudo chown -R root:caddy /etc/ssl/caddy
sudo chmod 0770 /etc/ssl/caddy
sudo mkdir /var/www
sudo chown caddy:caddy /var/www
sudo sh -c 'curl https://raw.githubusercontent.com/caddyserver/dist/master/init/caddy.service > /etc/systemd/system/caddy.service'
sudo systemctl daemon-reload
sudo systemctl status caddy
sudo ufw allow proto tcp from any to any port 80,443

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
trap 'exit 130' INT
sudo apt update && sudo apt upgrade -y
sudo apt install fail2ban -y
sudo cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo systemctl enable fail2ban
echo -e "=================================================================="
echo "Fail2Ban has been installed!"
echo "The F2B Config can be found at /etc/fail2ban/fail2ban.local"
echo "The F2B Jails Config can be found at /etc/fail2ban/jail.local"
echo "When it has been setup to your liking you can run ~fail2ban-client start~"
echo -e "=================================================================="

View File

@ -0,0 +1,57 @@
#!/usr/bin/env bash
trap 'exit 130' INT
set -b
ping -c1 "github.com" &>"/dev/null"
ping -c1 "api.github.com" &>"/dev/null"
ping -c1 "dl.gitea.io" &>"/dev/null"
ping -c1 "raw.githubusercontent.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access one of the necessary domains that are needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
sudo systemctl stop gitea
sudo apt-get install git -y
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386"
fi
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
sudo mv /tmp/gitea /usr/local/bin
sudo chmod +x /usr/local/bin/gitea
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea
curl -fsSL -o /etc/systemd/system/gitea.service https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service
sudo systemctl daemon-reload
sudo systemctl enable --now gitea
sudo systemctl start gitea
sudo ufw allow 3000
echo -e "=================================================================="
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1)
echo "Gitea Should be available at http://${intenalip}:3000"
echo "Or If you are using a VPS at http://${publicipaddress}:3000"
echo -e "=================================================================="
fi

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
trap 'exit 130' INT
sudo systemctl stop gitea
sudo systemctl disable gitea
sudo rm -rf /etc/systemd/system/gitea.service
echo "Backing up Files"
tar -cvzf gitea.tar.gz /var/lib/gitea/ /etc/gitea
sudo rm -rf /home/git
sudo userdel git
sudo rm -rf /usr/local/bin/gitea
sudo rm -rf /var/lib/gitea/*
sudo rm -rf /etc/gitea
sudo ufw delete allow 3000
echo "Gitea has been uninstalled, and all files have are backed up in gitea.tar.gz, you can delete it at your discretion."

View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
trap 'exit 130' INT
set -b
ping -c1 "github.com" &>"/dev/null"
ping -c1 "api.github.com" &>"/dev/null"
ping -c1 "dl.gitea.io" &>"/dev/null"
ping -c1 "raw.githubusercontent.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access one of the necessary domains that are needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
sudo systemctl stop gitea
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386"
fi
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
sudo mv /tmp/gitea /usr/local/bin
sudo chmod +x /usr/local/bin/gitea
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea
sudo chown root:git /etc/gitea
sudo systemctl start gitea
sudo ufw allow 3000
echo -e "=================================================================="
echo "Gitea has been updated!!"
echo -e "=================================================================="
fi

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
sudo gitlab-ctl stop
sudo apt remove gitlab-ce -y
sudo apt update && apt upgrade -y
sudo ufw delete allow 443
sudo ufw delete allow 80

View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt install wget git -y
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
sudo adduser --disabled-login --gecos 'Gogs' git
git clone --depth 1 https://github.com/gogs/gogs.git gogs
cd gogs
go build -o gogs
./gogs web
sudo mkdir /var/log/gogs
sudo chown -R git:git /var/log/gogs/
sudo echo "
[Unit]
Description=Gogs self-hosted Git service
After=syslog.target
After=network.target
After=mysql.service
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
Type=simple
User=git
Group=git
WorkingDirectory=/home/git
ExecStart=/home/git/gogs web
Restart=always
Environment=USER=git HOME=/home/git
# Some distributions may not support these hardening directives. If you cannot start the service due
# to an unknown option, comment out the ones not supported by your version of systemd.
ProtectSystem=full
PrivateDevices=yes
PrivateTmp=yes
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
" >> /etc/systemd/system/gogs.service
sudo rsync -avz gogs/* /home/git/
sudo chown -R git:git /home/git/
sudo ufw allow 3000
sudo systemctl daemon-reload
sudo systemctl enable gogs
sudo systemctl start gogs
sudo rm -rf gogs linux_amd64.tar.gz
echo -e "=================================================================="
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1)
echo "Gogs Should be available at http://${intenalip}:3000"
echo "Or If you are using a VPS at http://${publicipaddress}:3000"
echo -e "=================================================================="

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
sudo systemctl stop gogs
sudo systemctl disable gogs
sudo rm -rf /etc/systemd/system/gogs.service
sudo userdel git
sudo rm -rf /home/git
sudo rm -rf /var/log/gogs/*
sudo ufw delete allow 3000

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
trap 'exit 130' INT
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
rm -rf /tmp/go/
mkdir /tmp/go/
cd /tmp/go/
VER=$(curl --silent "https://go.dev/dl/?mode=json" | grep '"version":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' | head -1)
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-amd64.tar.gz" "https://go.dev/dl/"$VER".linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-armv6l.tar.gz" "https://go.dev/dl/"$VER".linux-armv6l.tar.gz"
fi
if [ -n "$(uname -a | grep i386)" ]; then
curl -fsSL -o "/tmp/go/"$VER".linux-386.tar.gz" "https://go.dev/dl/"$VER".linux-386.tar.gz"
fi
rm -rf /usr/local/go && tar -C /usr/local -xzf *.tar.gz
chmod +x /usr/local/go/bin/go
export PATH=$PATH:/usr/local/go/bin
cd ~

View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt-get install bzr git mercurial -y
# Check if curl is installed
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
git clone https://github.com/hockeypuck/packaging /var/lib/hockeypuck
cd packaging
./prepare.bash
export GOPATH=$(pwd)
go install github.com/hockeypuck/server/cmd/hockeypuck
go install github.com/hockeypuck/server/cmd/hockeypuck-load
go install github.com/hockeypuck/server/cmd/hockeypuck-pbuild
bash /var/lib/hockeypuck -config /var/lib/hockeypuck/hockeypuck.conf

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
apt remove golang -y
apt autoremove -y
wget -O goinstall.sh https://sop.wtf/sh/u/goinstall && bash goinstall.sh
rm -rf /tmp/hugo/
mkdir /tmp/hugo/
VER=$(curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's|[v,]||g' )
if [ -n "$(uname -a | grep x86_64)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"_linux-amd64.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_extended_"$VER"_linux-amd64.tar.gz"
fi
if [ -n "$(uname -a | grep armv6l)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_extended_"$VER"-arm64.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_extended_"$VER"-arm64.tar.gz"
fi
if [ -n "$(uname -a | grep armv7l)" ]; then
curl -fsSL -o "/tmp/hugo/hugo_"$VER"-arm.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v$VER/hugo_extended_"$VER"-arm.tar.gz"
echo "Hugo Extended is not supported on armv7l, Installing Hugo standard"
fi
cd /tmp/hugo/
tar -xzf /tmp/hugo/*.tar.gz
sudo mv /tmp/hugo/hugo /usr/local/bin
cd ~

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt install acl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip -y
sudo useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
cd /opt
sudo git clone https://github.com/librenms/librenms.git
sudo chown -R librenms:librenms /opt/librenms
sudo chmod 771 /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo -u librenms bash -c './scripts/composer_wrapper.php install --no-dev'
exit
sudo curl -fsSL -o "composer-stable.phar" https://getcomposer.org/composer-stable.phar
sudo mv composer-stable.phar /usr/bin/composer
sudo chmod +x /usr/bin/composer

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
trap 'exit 130' INT
apt update && apt upgrade -y
sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https mariadb-server mariadb-client -y
echo -e "=================================================================="
echo "Time to Configure MariaDB."
echo "Don't Know what to do? I can help!"
echo "1. Root password just click ENTER as there is no password"
echo "2. Switch to unix_socket authentication select. n"
echo "3. Change the root password? Y"
echo "4. Remove anonymous users? Y "
echo "5. Disallow root login remotely? y, But if it's local it's fine to say no."
echo "6. Remove test database and access to it? Y"
echo "7. Reload privilege tables now? Y"
echo -e "=================================================================="
sleep 5
sudo mysql_secure_installation
echo "If you want to install phpMyAdmin run wget -O pmainstall.sh https://sop.wtf/sh/pmainstall && bash pmainstall.sh"

View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install nodejs -y
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update -y
apt-get install yarn -y
apt-get install postgresql postgresql-contrib -y
su - postgres
psql
CREATE USER mastodon CREATEDB;
exit
adduser --disabled-login --gecos 'Mastodon Server' mastodon
su - mastodon
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec bash
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build\
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.3
rbenv global 3.0.3
gem update --system
gem install bundler --no-document
su - mastodon
git clone https://github.com/tootsuite/mastodon.git ~/live
cd ~/live
bundle config deployment 'true'
bundle config without 'development test'
bundle install -j$(getconf _NPROCESSORS_ONLN)
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rake mastodon:setup
exit
cp /home/mastodon/live/dist/mastodon-web.service /etc/systemd/system/
cp /home/mastodon/live/dist/mastodon-sidekiq.service /etc/systemd/system/
cp /home/mastodon/live/dist/mastodon-streaming.service /etc/systemd/system/
systemctl start mastodon-web
systemctl start mastodon-sidekiq
systemctl start mastodon-streaming
systemctl enable mastodon-web
systemctl enable mastodon-sidekiq
systemctl enable mastodon-streaming
systemctl status mastodon-web mastodon-sidekiq mastodon-streaming

View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
NODE_LTS= "18.12.1"
sudo apt update && apt upgrade -y
sudo apt install postgresql postgresql-contrib ffmpeg redis-server npm yarn -y
sudo systemctl start postgresql.service
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install node
nvm install v$NODE_LTS
nvm use v$NODE_LTS
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
PASSWD_GEN=$(openssl rand -base64 10)
sudo -i -u postgres psql -c "CREATE USER misskey WITH PASSWORD '$PASSWD_GEN';"
sudo -i -u postgres psql -c "CREATE USER misskey WITH PASSWORD '$PASSWD_GEN';"
sudo -i -u postgres psql -c "CREATE DATABASE misskey;"
sudo -i -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE misskey to misskey;"
sudo -i -u postgres psql -c "ALTER DATABASE misskey OWNER TO misskey;"
adduser --disabled-password --disabled-login misskey
sudo -i -u misskey
git clone -b master https://github.com/misskey-dev/misskey.git
cd misskey
git checkout master
yarn
cp .config/example.yml .config/default.yml
sed -e "s|user: example-misskey-user = ''user: = 'misskey'|" >> .config/default.yml
sed -e "s|user: example-misskey-pass = ''user: = '$PASSWD_GEN'|" >> .config/default.yml
NODE_ENV=production yarn build
yarn run init
exit
curl -fsSL -o "/etc/systemd/system/misskey.service" https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/misskey.service
sudo systemctl daemon-reload
sudo systemctl enable misskey.service
sudo systemctl start misskey.service

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt update && apt upgrade -y
sudo apt install wget curl gnupg2 software-properties-common apt-transport-https ca-certificates lsb-release -y
sudo curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb http://security.ubuntu.com/ubuntu jammy-security main" | sudo tee /etc/apt/sources.list.d/jammy-security.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update -y
sudo apt-get install libssl1.1 -y
sudo apt install mongodb-org -y
sudo systemctl start mongod
sudo systemctl enable mongod
apt autoremove -y

View File

@ -0,0 +1,66 @@
#!/usr/bin/env bash
trap 'exit 130' INT
while [ "$go" != 'apache' ] && [ "$go" != 'nginx' ]; do
read -p "Would you like to install using Nginx or Apache? (nginx/apache) " go
done
if [ "$go" == 'nginx' ]; then
sudo apt update && apt upgrade -y
sudo apt-get install build-essential lsb-release software-properties-common -y
sudo add-apt-repository --yes ppa:ondrej/nginx && sudo add-apt-repository --yes ppa:ondrej/php && sudo apt install php-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl nginx-full php-mysql -y
sudo systemctl stop nginx
sudo wget -O /etc/nginx/conf.d/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmanginx.conf
sudo systemctl enable nginx
sudo systemctl start nginx
## Updating phpMyAdmin.
PMA_VER="5.2.1"
sudo rm -rf /usr/share/phpmyadmin.bak
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
sudo mkdir /usr/share/phpmyadmin/
sudo wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -P /usr/share/phpmyadmin/
sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
## Thanks https://stackoverflow.com/users/3266847/benjamin-w
randomBlowfishSecret=$(openssl rand -base64 22)
sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php
sudo systemctl restart nginx
sudo ufw allow 8080
echo -e "=================================================================="
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1)
echo "phpMyAdmin Should be available at http://${intenalip}:8080"
echo "Or If you are using a VPS at http://${publicipaddress}:8080"
echo -e "=================================================================="
fi
if [ "$go" == 'apache' ]; then
sudo apt update && apt upgrade -y
sudo apt-get install build-essential lsb-release software-properties-common -y
sudo add-apt-repository --yes ppa:ondrej/apache2 && apt install apache2 libapache2-mod-php php-fpm software-properties-common phpmyadmin php-mbstring php-zip php-gd php-json php-curl php-mysql -y
sudo systemctl stop apache2
sudo wget -O /etc/apache2/sites-enabled/phpmyadmin.conf https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/conf/pmaapache.conf
sudo systemctl restart php-fpm
sudo systemctl reload apache2
sudo systemctl enable apache2
## Updating phpMyAdmin.
PMA_VER="5.2.1"
sudo rm -rf /usr/share/phpmyadmin.bak
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
sudo mkdir /usr/share/phpmyadmin/
sudo wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -P /usr/share/phpmyadmin/
sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
## Thanks https://stackoverflow.com/users/3266847/benjamin-w
randomBlowfishSecret=$(openssl rand -base64 22)
sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php
sudo systemctl restart apache2
sudo ufw allow 8080
echo -e "=================================================================="
publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/ || curl -sS --connect-timeout 10 -m 60 https://api.ipify.org )
intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1)
echo "phpMyAdmin Should be available at http://${intenalip}:8080"
echo "Or If you are using a VPS at http://${publicipaddress}:8080"
echo -e "=================================================================="
fi

View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
trap 'exit 130' INT
sudo apt remove phpmyadmin -y
sudo apt-get autoremove -y
sudo rm -rf /usr/share/phpmyadmin/
sudo rm -rf /etc/apache2/sites-enabled/phpmyadmin.conf
sudo systemctl restart apache2
while true
do
read -r -p "Would you like to also uninstall apache2? This is not reversible. [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
sudo systemctl stop apache2
sudo apt remove apache2 -y
sudo apt-get autoremove -y

View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
trap 'exit 130' INT
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
sudo apt update && apt upgrade -y
sudo rm -rf /usr/share/phpmyadmin.bak
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
sudo mkdir /usr/share/phpmyadmin/
sudo curl -fsSL -o "/usr/share/phpmyadmin/" https://files.phpmyadmin.net/phpMyAdmin/$PMA_VER/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C /usr/share/phpmyadmin/
sudo mv /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages/* /usr/share/phpmyadmin
sudo mkdir /usr/share/phpmyadmin/tmp/ && chmod -R 777 /usr/share/phpmyadmin/tmp/
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz
## Thanks https://stackoverflow.com/users/3266847/benjamin-w
randomBlowfishSecret=$(openssl rand -base64 22)
sudo sed -e "s|cfg\['blowfish_secret'\] = ''|cfg['blowfish_secret'] = '$randomBlowfishSecret'|" /usr/share/phpmyadmin/config.sample.inc.php > /usr/share/phpmyadmin/config.inc.php
sudo systemctl restart apache2
sudo systemctl restart nginx
echo -e "=================================================================="
echo "phpMyAdmin has been updated!"
echo -e "=================================================================="

View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
while true
do
read -p "Where would you like to mount your share?: " MOUNT_DIR
if [ -d "$MOUNT_DIR" ]; then
echo "The Directory $MOUNT_DIR Already Exist"
sleep 1
else
mkdir -p $MOUNT_DIR
echo "creating $MOUNT_DIR"
break
fi
done
while true
do
read -p "What is your Shares Username?: " SMB_USR
if [ -d "$SMB_USR" ]; then
echo "username=$SMB_USR" >> /.smb-credentials
sleep 1
else
echo "username=$SMB_USR" >> /.smb-credentials
break
fi
done
while true
do
read -p "What is your Shares Password?: " SMB_PASS
if [ -d "$SMB_PASS" ]; then
echo "password=$SMB_PASS" >> /.smb-credentials
sleep 1
else
echo "password=$SMB_PASS" >> /.smb-credentials
break
fi
done
while true
do
read -p "What is your Shares IP Address?: " SMB_ADDR
read -p "Where is your Share located on the remote server? i.e /mnt/Share: " SMB_REMDIR
if [ -d "$SMB_ADDR" ]; then
sudo mount -t cifs -o rw,vers=3.0,credentials=/.smb-credentials //$SMB_ADDR/$SMB_REMDIR $MOUNT_DIR
sleep 1
else
sudo mount -t cifs -o rw,vers=3.0,credentials=/root/.smb-credentials //$SMB_ADDR/$SMB_REMDIR $MOUNT_DIR
break
fi
done

View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
trap 'exit 130' INT
while true
do
read -p "Enter The Directory Where you want to install Wordpress: " INSTALL_DIR
if [ -d "$INSTALL_DIR" ]; then
echo "The Directory $INSTALL_DIR Already Exist"
sleep 1
else
mkdir -p $INSTALL_DIR
echo "creating $INSTALL_DIR"
break
fi
done
if [ ! -x /usr/bin/curl ] ; then
CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
curl -fsSL -o "latest.zip" https://wordpress.org/latest.zip
apt install unzip -y
unzip latest.zip -d $INSTALL_DIR
cp -r $INSTALL_DIR/wordpress/* $INSTALL_DIR
rm -rf $INSTALL_DIR/wordpress
rm -rf latest.zip
chmod -R 775 $INSTALL_DIR

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
trap 'exit 130' INT
while true while true
do do
read -r -p "Would you like to install Wordpress? [Y/n] " input read -r -p "Would you like to install Wordpress? [Y/n] " input
@ -29,8 +30,13 @@ do
break break
fi fi
done done
if [ ! -x /usr/bin/curl ] ; then
wget -O latest.zip https://wordpress.org/latest.zip CURL_NOT_EXIST=1
apt install -y curl
else
CURL_NOT_EXIST=0
fi
curl -fsSL -o "latest.zip" https://wordpress.org/latest.zip
apt install unzip -y apt install unzip -y
unzip latest.zip -d $INSTALL_DIR unzip latest.zip -d $INSTALL_DIR
cp -r $INSTALL_DIR/wordpress/* $INSTALL_DIR cp -r $INSTALL_DIR/wordpress/* $INSTALL_DIR