This commit is contained in:
Sophia Atkinson 2023-01-19 20:52:52 -08:00
parent 8be3efa9e0
commit 2bf73b8a3b
10 changed files with 23 additions and 35 deletions

View File

@ -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

@ -17,8 +17,7 @@ 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

View File

@ -16,11 +16,10 @@ do
esac
done
sudo apt install wget -y
sudo apt install wget git -y
GOGS_VER="0.12.10"
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/
@ -31,7 +30,7 @@ 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

@ -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

@ -2,7 +2,7 @@
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

@ -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

@ -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

@ -18,12 +18,9 @@ do
done
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 -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 install apache2 -y
sudo apt remove php8.1-fpm php8.1-* -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 php$PHP_VER
@ -48,7 +45,7 @@ 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 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 )

View File

@ -18,9 +18,8 @@ do
done
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 -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 install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
sudo apt remove php8.1-fpm php8.1-* -y
sudo phpenmod mbstring
sudo a2dismod php$PHP_VER