forked from Sophia/thelinuxlist
updated php
This commit is contained in:
parent
cef01a80e2
commit
22a15430b0
32
scripts/librenmsinstall.sh
Normal file
32
scripts/librenmsinstall.sh
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/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
|
||||||
|
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)"
|
||||||
|
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
|
||||||
|
exit
|
||||||
|
wget https://getcomposer.org/composer-stable.phar
|
||||||
|
mv composer-stable.phar /usr/bin/composer
|
||||||
|
chmod +x /usr/bin/composer
|
|
@ -18,21 +18,21 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
sudo apt update && apt upgrade -y
|
sudo apt update && apt upgrade -y
|
||||||
sudo add-apt-repository --yes ppa:ondrej/php && apt install libapache2-mod-php8.1 -y
|
sudo add-apt-repository --yes ppa:ondrej/php && apt install libapache2-mod-php8.2 -y
|
||||||
sudo systemtl stop apache2
|
sudo systemtl stop apache2
|
||||||
sudo apt install apache2 -y
|
sudo apt install apache2 -y
|
||||||
sudo apt install software-properties-common
|
sudo apt install software-properties-common
|
||||||
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
|
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 echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
|
||||||
sudo phpenmod mbstring
|
sudo phpenmod mbstring
|
||||||
sudo a2dismod php8.1
|
sudo a2dismod php8.2
|
||||||
sudo a2dismod mpm_prefork
|
sudo a2dismod mpm_prefork
|
||||||
sudo a2disconf php7.4-fpm
|
sudo a2disconf php7.4-fpm
|
||||||
sudo a2enmod mpm_event
|
sudo a2enmod mpm_event
|
||||||
sudo a2enmod proxy
|
sudo a2enmod proxy
|
||||||
sudo a2enmod proxy_fcgi
|
sudo a2enmod proxy_fcgi
|
||||||
sudo a2enconf php8.1-fpm
|
sudo a2enconf php8.2-fpm
|
||||||
sudo systemctl restart php8.1-fpm
|
sudo systemctl restart php8.2-fpm
|
||||||
sudo systemctl enable apache2
|
sudo systemctl enable apache2
|
||||||
## Updating phpMyAdmin.
|
## Updating phpMyAdmin.
|
||||||
PMA_VER="5.2.0"
|
PMA_VER="5.2.0"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user