Snippet #131439
on 2022/11/07 18:01:22 (UTC) by Anonymous as Bash
-
#!/bin/bash
-
# run this as root
-
-
# Webmin install
-
-
# check updates
-
apt update
-
# upgrade system
-
apt upgrade -y
-
# add deb repo
-
echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list
-
# add webmin keyring
-
wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add
-
# check updates
-
apt update
-
# install webmin
-
apt install webmin -y
-
-
apt install mariadb-client mariadb-server
-
-
-
# PHP install
-
-
# apache install
-
apt install apache2 -y
-
-
# Install dependencies
-
apt install software-properties-common apt-transport-https -y
-
# Add repo with php7.4
-
add-apt-repository ppa:ondrej/php -y
-
# check updates
-
apt update
-
# upgrade system
-
apt upgrade -y
-
# install php7.4
-
apt install php7.4-common libapache2-mod-php7.4 php7.4-cli -y
-
# insatll curl for php
-
apt install php7.4-curl -y
-
# install mysql for php
-
apt install php7.4-mysql -y
-
-
-
# Apache configure
-
-
# allow .htaccess
-
a2enmod rewrite
-
# enable php
-
a2enmod php7.4
-
# restart apapche
-
service apache2 restart
-
-
# php.ini setup
-
sed -i 's/;extension=pdo_mysql/extension=pdo_mysql/g' /etc/php/7.4/apache2/php.ini
-
sed -i 's/;extension=mysqli/extension=mysqli/g' /etc/php/7.4/apache2/php.ini
-
sed -i 's/;extension=curl/extension=curl/g' /etc/php/7.4/apache2/php.ini
Recent Snippets
- #157071 by Anonymous (737 days ago)
- #156876 by Anonymous (737 days ago)
- #154030 by Anonymous (741 days ago)
- #140524 by Anonymous (760 days ago)
- #137907 by rotense (764 days ago)
- #131892 by Anonymous (771 days ago)