Compare commits

..

32 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
4f4768a619 Update 'README.md' 2023-02-12 13:40:28 -08:00
f9a1651ce9 bumping mongodb to 6.0 and updates to jammy 2023-02-11 23:29:40 -08:00
6c2140851d added cookie gen 2023-02-09 19:11:26 -08:00
0b6915ebd7 updated PMA 2023-02-09 19:07:40 -08:00
804477aeb8 allow 8080 with UFW 2023-01-30 11:49:49 -08:00
cc987eac61 Changed pma port to 8080
I also that systemctl stuff is echoed and not wgeted
2023-01-30 09:05:00 -08:00
7054ab4815 bumping Gitea version 2023-01-24 22:12:20 -08:00
6418a4c975 updated Gitea version. 2023-01-20 16:01:40 -08:00
2bf73b8a3b updates 2023-01-19 20:52:52 -08:00
8be3efa9e0 ... i cant spell 2023-01-19 05:09:52 -08:00
5f5e2dee15 Removing php8.1 2023-01-19 05:07:39 -08:00
73859156fd Moved to Github for download. The irony stinks 2023-01-18 03:12:18 -08:00
a8222bcfdd Version bump 2023-01-18 02:55:12 -08:00
4c5d16ab18 Moved UFW down as a last step 2023-01-16 20:41:13 -08:00
b17540254a Didn't mean to delete this 2023-01-16 20:39:43 -08:00
2c0af1f3ef Merge branch 'main' of
https://git.oldgate.org/Sophia/thelinuxlist
2023-01-16 20:36:49 -08:00
135405249a Making it easier for when PHP updates come out. 2023-01-16 20:34:04 -08:00
10d3885d28 revert 81c1ce08a9
revert added pma update
2023-01-11 17:39:22 -08:00
8b65c9ae1a Merge pull request 'Merge pull request 'main' (#1) from Sophia/thelinuxlist:main into main' (#1) from wade/thelinuxlist:main into main
Reviewed-on: #1
2023-01-11 17:34:10 -08:00
a0a7781ed2 Merge pull request 'main' (#1) from Sophia/thelinuxlist:main into main
Reviewed-on: wade/thelinuxlist#1
2022-12-05 11:39:30 -08:00
23 changed files with 305 additions and 118 deletions

View File

@ -44,18 +44,19 @@
### `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`
---
## MongoDB
### Install
### Install
### `wget -O mongodbinstall.sh https://sop.wtf/sh/mongodbinstall && bash mongodbinstall.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,27 +16,52 @@ do
;;
esac
done
GITEA_VER="1.18.0"
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.19.1"
sudo systemctl stop gitea
sudo apt-get install git -y
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$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 -pv /var/lib/gitea/{custom,data,log}
sudo chown -Rv git:git /var/lib/gitea
sudo chmod -Rv 750 /var/lib/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 -v /etc/gitea
sudo chown -Rv root:git /etc/gitea
sudo chmod -Rv 770 /etc/gitea
sudo wget -O /etc/systemd/system/gitea.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/gitea.service
sudo chown -R root:git /etc/gitea
sudo chmod -R 770 /etc/gitea
sudo echo "
[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 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

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -18,7 +18,7 @@ do
done
sudo systemctl stop gitea
sudo systemctl disable gitea
rm -rf /etc/systemd/system/gitea.service
sudo rm -rf /etc/systemd/system/gitea.service
sudo rm -rf /home/git
sudo userdel git
sudo rm -rf /usr/local/bin/gitea

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
@ -15,14 +15,20 @@ do
;;
esac
done
GITEA_VER="1.18.0"
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.19.1"
sudo systemctl stop gitea
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$GITEA_VER/gitea-"$GITEA_VER"-linux-amd64
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
sudo chown -Rv git:git /var/lib/gitea
sudo chmod -Rv 750 /var/lib/gitea
sudo chown -Rv root:git /etc/gitea
sudo chmod -Rv 770 /etc/gitea
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea
sudo chown -R root:git /etc/gitea
sudo chmod -R 770 /etc/gitea
sudo systemctl start gitea
fi
echo "Gitea has been updated!"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -17,13 +17,12 @@ do
esac
done
sudo apt update && apt upgrade -y
sudo apt install tzdata curl ca-certificates openssh-server -y
sudo apt-get install git -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/ focal main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main
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

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
@ -16,22 +16,52 @@ do
esac
done
sudo apt install wget -y
GOGS_VER="0.12.10"
sudo apt install wget git -y
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
tar xvf linux_amd64.tar.gz
sudo apt install git -y
sudo tar xvf linux_amd64.tar.gz
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
sudo mkdir /var/log/gogs
sudo chown -R git:git /var/log/gogs/
sudo wget -O /etc/systemd/system/gogs.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/gogs.service
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
rm -rf gogs linux_amd64.tar.gz
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 )

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
@ -18,7 +18,7 @@ done
sudo systemctl stop gogs
sudo systemctl disable gogs
rm -rf /etc/systemd/system/gogs.service
sudo rm -rf /etc/systemd/system/gogs.service
sudo userdel git
sudo rm -rf /home/git
sudo rm -rf /var/log/gogs/*

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Hockeypuck? [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-get install bzr git mercurial golang -y
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

@ -1,8 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
read -r -p "Would you like to install Gitlab? [Y/n] " input
read -r -p "Would you like to install Librenms? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
@ -16,17 +16,16 @@ do
;;
esac
done
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
useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
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
sudo useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
cd /opt
git clone https://github.com/librenms/librenms.git
chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
su - librenms
./scripts/composer_wrapper.php install --no-dev
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
wget https://getcomposer.org/composer-stable.phar
mv composer-stable.phar /usr/bin/composer
chmod +x /usr/bin/composer
sudo wget https://getcomposer.org/composer-stable.phar
sudo mv composer-stable.phar /usr/bin/composer
sudo chmod +x /usr/bin/composer

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -18,8 +18,7 @@ do
done
apt update && apt upgrade -y
sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https -y
sudo apt install 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 "Time to Configure MariaDB."
echo "Don't Know what to do? I can help!"

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
@ -19,11 +19,8 @@ done
NODE_LTS= "18.12.1"
sudo apt update && apt upgrade -y
sudo apt install postgresql postgresql-contrib -y
sudo apt install postgresql postgresql-contrib ffmpeg redis-server npm yarn -y
sudo systemctl start postgresql.service
sudo apt install npm -y
sudo apt install redis-server -y
sudo apt install ffmpeg -y
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install node
@ -31,7 +28,6 @@ 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
sudo apt update && sudo apt install yarn
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';"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -18,10 +18,10 @@ 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 curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -16,27 +16,20 @@ 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-php8.2 php8.2-fpm -y
sudo systemtl stop apache2
sudo apt install apache2 -y
sudo apt install software-properties-common
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
sudo echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
sudo phpenmod mbstring
sudo a2dismod php8.2
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo a2enconf php8.2-fpm
sudo systemctl restart php8.2-fpm
systemctl reload apache2
sudo systemctl enable apache2
sudo apt autoremove -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.0"
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/
@ -47,19 +40,45 @@ 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)
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 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}/phpmyadmin"
echo "Or If you are using a VPS at http://${publicipaddress}/phpmyadmin"
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 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
## 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

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -18,7 +18,8 @@ do
done
sudo apt remove phpmyadmin -y
sudo apt-get autoremove -y
rm -rf /usr/share/phpmyadmin/
sudo rm -rf /usr/share/phpmyadmin/
sudo rm -rf /etc/apache2/sites-enabled/phpmyadmin.conf
sudo systemctl restart apache2
while true

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
while true
do
@ -16,24 +16,23 @@ do
;;
esac
done
PHP_VER="8.2"
sudo apt update && apt upgrade -y
sudo add-apt-repository --yes ppa:ondrej/php && apt install libapache2-mod-php8.2 php8.2-fpm -y
sudo systemtl stop apache2
sudo apt install apache2 -y
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -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 php8.2
sudo a2dismod php$PHP_VER
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo a2enconf php8.2-fpm
sudo systemctl restart php8.2-fpm
systemctl reload apache2
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.0"
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/
@ -42,12 +41,12 @@ sudo tar xzf /usr/share/phpmyadmin/phpMyAdmin-"$PMA_VER"-all-languages.tar.gz -C
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
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}/phpmyadmin"
echo "Or If you are using a VPS at http://${publicipaddress}/phpmyadmin"
echo "phpMyAdmin has been updated!"
echo -e "=================================================================="

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