new scripts and updates
This commit is contained in:
43
README.md
43
README.md
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Gitea
|
## [Gitea](https://about.gitea.com/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ✔️ Install
|
||||||
|
|
||||||
@ -28,7 +28,30 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## MariaDB
|
# [Go Hugo](https://gohugo.io/)
|
||||||
|
|
||||||
|
### ✔️ Install/Update
|
||||||
|
|
||||||
|
### `wget -O hugoinstall.sh https://sop.wtf/sh/hugoinstall && bash hugoinstall.sh`
|
||||||
|
|
||||||
|
### ✔️ Uninstall
|
||||||
|
|
||||||
|
### `rm -rf /usr/local/bin/hugo`
|
||||||
|
|
||||||
|
---
|
||||||
|
# [Go](https://go.dev/)
|
||||||
|
|
||||||
|
### ✔️ Install/Update
|
||||||
|
|
||||||
|
### `wget -O goinstall.sh https://sop.wtf/sh/goinstall && bash goinstall.sh`
|
||||||
|
|
||||||
|
### ✔️ Uninstall
|
||||||
|
|
||||||
|
### `rm -rf /usr/local/go`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [MariaDB](https://mariadb.org/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ✔️ Install
|
||||||
|
|
||||||
@ -40,7 +63,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## phpMyAdmin
|
## [phpMyAdmin](https://www.phpmyadmin.net/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ✔️ Install
|
||||||
|
|
||||||
@ -50,13 +73,13 @@
|
|||||||
|
|
||||||
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
|
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
|
||||||
|
|
||||||
### ✔️ Update (Only works for Apache2 currently)
|
### ✔️ Update
|
||||||
|
|
||||||
### `wget -O pmaupdate.sh https://sop.wtf/sh/pmaupdate && bash pmaupdate.sh`
|
### `wget -O pmaupdate.sh https://sop.wtf/sh/pmaupdate && bash pmaupdate.sh`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## MongoDB
|
## [MongoDB](https://www.mongodb.com/)
|
||||||
|
|
||||||
### ⚠️ Install
|
### ⚠️ Install
|
||||||
|
|
||||||
@ -68,7 +91,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Gitlab (Retired, Now falls back to offical script)
|
## [Gitlab](https://about.gitlab.com/) (Retired, Now falls back to offical script)
|
||||||
|
|
||||||
### 💀 Install
|
### 💀 Install
|
||||||
|
|
||||||
@ -80,7 +103,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Gogs
|
## [Gogs](https://gogs.io/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ✔️ Install
|
||||||
|
|
||||||
@ -92,15 +115,15 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Wordpress
|
## [Wordpress](https://wordpress.org/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ⚠️ Install
|
||||||
|
|
||||||
### `wget -O wpinstall.sh https://sop.wtf/sh/wpinstall && bash wpinstall.sh`
|
### `wget -O wpinstall.sh https://sop.wtf/sh/wpinstall && bash wpinstall.sh`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Fail2Ban
|
## [Fail2Ban](https://www.fail2ban.org/)
|
||||||
|
|
||||||
### ✔️ Install
|
### ✔️ Install
|
||||||
|
|
||||||
|
@ -16,11 +16,67 @@ do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
caddy_ver="0.3.2"
|
set -b
|
||||||
apt install golang git curl -y
|
ping -c1 "github.com" &>"/dev/null"
|
||||||
cd /tmp
|
ping -c1 "api.github.com" &>"/dev/null"
|
||||||
wget https://github.com/caddyserver/xcaddy/releases/download/v"$caddy_ver"/xcaddy_"$caddy_ver"_linux_amd64.tar.gz
|
ping -c1 "raw.githubusercontent.com" &>"/dev/null"
|
||||||
tar xvf xcaddy_"$caddy_ver"_linux_amd64.tar.gz xcaddy
|
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
|
||||||
|
set -b
|
||||||
|
ping -c1 "go.dev" &>"/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
|
||||||
|
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
|
||||||
|
@ -15,7 +15,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 install wget git go-lang -y
|
sudo apt install wget git go-lang -y
|
||||||
sudo adduser --disabled-login --gecos 'Gogs' git
|
sudo adduser --disabled-login --gecos 'Gogs' git
|
||||||
git clone --depth 1 https://github.com/gogs/gogs.git gogs
|
git clone --depth 1 https://github.com/gogs/gogs.git gogs
|
||||||
|
48
scripts/goinstall.sh
Normal file
48
scripts/goinstall.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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
|
||||||
|
set -b
|
||||||
|
ping -c1 "go.dev" &>"/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
|
||||||
|
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 ~
|
@ -16,7 +16,43 @@ 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
|
||||||
|
set -b
|
||||||
|
ping -c1 "go.dev" &>"/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
|
||||||
|
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 ~
|
||||||
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
|
||||||
|
81
scripts/hugoinstall.sh
Normal file
81
scripts/hugoinstall.sh
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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
|
||||||
|
set -b
|
||||||
|
ping -c1 "github.com" &>"/dev/null"
|
||||||
|
ping -c1 "api.github.com" &>"/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
|
||||||
|
set -b
|
||||||
|
ping -c1 "go.dev" &>"/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
|
||||||
|
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/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_"$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_"$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_"$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 ~
|
||||||
|
fi
|
@ -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
|
||||||
|
@ -15,7 +15,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 -
|
||||||
|
@ -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
|
||||||
|
@ -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 -
|
||||||
|
@ -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.
|
||||||
|
@ -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 "=================================================================="
|
||||||
|
@ -29,8 +29,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
|
||||||
|
Reference in New Issue
Block a user