Compare commits

...

12 Commits

Author SHA1 Message Date
931e03a7db bump gitea 2023-04-14 01:05:59 -07:00
a02e2830ef testing 2023-04-08 14:21:14 -07:00
31fe64c2e0 bump gogs 2023-04-04 18:37:14 -07:00
9ccbe37569 fixed PMA script 2023-04-04 18:32:45 -07:00
6aa2168f97 ver bump 2023-03-31 20:42:59 -07:00
6b3a3bffd3 fixed 2023-03-31 18:56:13 -07:00
421f67b5bb added ⚠️ to PMA 2023-03-31 18:43:00 -07:00
14c65580fc PMA nginx conf 2023-03-31 18:39:13 -07:00
f5c10b9b01 bump gitea to 1.19.0 2023-03-25 01:46:53 -07:00
008e098bfd set the wrong version 2023-02-22 18:16:23 -08:00
49331c443c Merge branch 'main' of https://git.oldgate.org/Sophia/thelinuxlist 2023-02-22 18:14:23 -08:00
f43a8a77d2 bump gitea version 2023-02-22 18:14:05 -08:00
23 changed files with 153 additions and 64 deletions

View File

@ -44,11 +44,11 @@
### `wget -O pmainstall.sh https://sop.wtf/sh/pmainstall && bash pmainstall.sh`
### ✔️ Uninstall
### ✔️ Uninstall (Only works for Apache2 currently)
### `wget -O pmauninstall.sh https://sop.wtf/sh/pmauninstall && bash pmauninstall.sh`
### ✔️ Update
### ✔️ Update (Only works for Apache2 currently)
### `wget -O pmaupdate.sh https://sop.wtf/sh/pmaupdate && bash pmaupdate.sh`

20
conf/pmaapache.conf Normal file
View File

@ -0,0 +1,20 @@
Listen 8080
<VirtualHost *:8080>
ServerName localhost
<Directory /usr/share/phpmyadmin>
AllowOverride None
Require all granted
</Directory>
DocumentRoot /usr/share/phpmyadmin
Include /etc/phpmyadmin/apache.conf
ErrorLog ${APACHE_LOG_DIR}/phpmyadmin.error.log
CustomLog ${APACHE_LOG_DIR}/phpmyadmin.access.log combined
# Error log location should be in /var/log/apache2
</VirtualHost>

17
conf/pmanginx.conf Normal file
View File

@ -0,0 +1,17 @@
server {
listen 8080;
listen [::]:8080;
server_name localhost;
access_log /var/log/nginx/phpmyadmin.vhost.access.log;
error_log /var/log/nginx/phpmyadmin.vhost.error.log;
root /usr/share/phpmyadmin;
index index.php;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

49
scripts/caddyinstall.sh Normal file
View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Caddy Server? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
caddy_ver="0.3.2"
apt install golang git curl -y
cd /tmp
wget https://github.com/caddyserver/xcaddy/releases/download/v"$caddy_ver"/xcaddy_"$caddy_ver"_linux_amd64.tar.gz
tar xvf xcaddy_"$caddy_ver"_linux_amd64.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

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -16,15 +16,16 @@ do
;;
esac
done
set -b
ping -c1 "github.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access Github.com, that is needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then
GITEA_VER="1.18.3"
GITEA_VER="1.19.1"
sudo systemctl stop gitea
sudo apt-get install git -y
sudo wget -O /usr/local/bin/gitea https://github.com/go-gitea/gitea/releases/download/v"$GITEA_VER"/gitea-"$GITEA_VER"-linux-amd64
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 mkdir -p /var/lib/gitea/{custom,data,log}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to Update Gitea? [Y/n] " input
@ -20,7 +20,7 @@ ping -c1 "github.com" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then
echo "I am unable to access Github.com, that is needed to continue this Install."
elif [[ "${#args[@]}" -eq 0 ]]; then
GITEA_VER="1.18.3"
GITEA_VER="1.19.1"
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
sudo chmod +x /usr/local/bin/gitea

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Gogs? [Y/n] " input
@ -17,7 +17,7 @@ do
done
sudo apt install wget git -y
GOGS_VER="0.12.10"
GOGS_VER="0.13.0"
sudo wget -O linux_amd64.tar.gz https://dl.gogs.io/$GOGS_VER/gogs_"$GOGS_VER"_linux_amd64.tar.gz
sudo tar xvf linux_amd64.tar.gz
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Gogs? This is not reversible. [Y/n] " input

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -16,7 +16,7 @@ do
;;
esac
done
sudo apt-get install bzr git mercurial go- -y
sudo apt-get install bzr git mercurial golang -y
git clone https://github.com/hockeypuck/packaging /var/lib/hockeypuck
cd packaging
./prepare.bash

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Mastodon? [Y/n] " input

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -18,7 +18,7 @@ do
done
sudo apt update && apt upgrade -y
sudo apt install wget curl gnupg2 software-properties-common apt-transport-https ca-certificates lsb-release
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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -16,38 +16,47 @@ do
;;
esac
done
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
PHP_VER="8.2"
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 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 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
PHP_VER="8.2"
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/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 systemctl stop apache2
sudo apt remove php8.1-fpm php8.1-* -y
sudo echo "
Listen 8080
<VirtualHost *:8080>
ServerName localhost
<Directory /usr/share/phpmyadmin>
AllowOverride None
Require all granted
</Directory>
DocumentRoot /usr/share/phpmyadmin
Include /etc/phpmyadmin/apache.conf
ErrorLog ${APACHE_LOG_DIR}/phpmyadmin.error.log
CustomLog ${APACHE_LOG_DIR}/phpmyadmin.access.log combined
</VirtualHost>" >> /etc/apache2/sites-enabled/phpmyadmin.conf
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 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 reload apache2
sudo systemctl enable apache2
@ -72,11 +81,4 @@ intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}
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

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Wordpress? [Y/n] " input