Skip to content

Guide for Debian Server 10 (Buster)

Schnup89 edited this page Jun 9, 2023 · 3 revisions

Debian 10 Buster - Linux

debian-10.13.0-amd64-netinst.iso (https://www.debian.org/releases/buster/debian-installer/index.de.html)

Install php8 from special repo (Skip this step on debian version > 11)

sudo apt-get -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
sudo apt-get update

Install required packages

sudo apt-get update && \
sudo apt-get install \
apache2 \
php8.2 \
libapache2-mod-php \
php8.2-curl \
php8.2-zip \
php8.2-mbstring \
php8.2-xml \
git \
unzip \
nano

Setup TasmoAdmin

Download latest release zip file.
sudo wget https://github.com/TasmoAdmin/TasmoAdmin/releases/download/vX.X.X/tasmoadmin_vX.X.X.zip

Unzip contents to /var/www/
sudo unzip tasmoadmin_vX.X.X.zip -d /var/www/

Change owner of /var/www/tasmoadmin

sudo chown -R www-data:www-data /var/www/tasmoadmin

Set full read/write access on /var/www/tasmoadmin/tmp and /var/www/tasmoadmin/data

sudo chmod 777 /var/www/tasmoadmin/tmp /var/www/tasmoadmin/data

Disable cache for php files

sudo rm /etc/php/8.2/apache2/conf.d/10-opcache.ini

Create tasmoadmin.conf

sudo nano /etc/apache2/sites-available/tasmoadmin.conf
Copy+Paste Content

<VirtualHost *:9999>
	ServerName tasmoadmin
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/tasmoadmin
	<Directory /var/www/tasmoadmin>
	AllowOverride All
	Order allow,deny
	allow from all
	</Directory>
	ErrorLog /var/log/apache2/error.log
	LogLevel warn
	CustomLog /var/log/apache2/access.log combined
	ServerSignature On
</VirtualHost>

Hit Keys: STRG+X then Y then Enter

Edit ports.conf

sudo vim /etc/apache2/ports.conf

Add "Listen 9999" after "Listen 80", content should look like:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
Listen 9999

<IfModule ssl_module>
	Listen 443
</IfModule>

<IfModule mod_gnutls.c>
	Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hit Keys: STRG+X then Y then Enter

Enable site and mod

sudo a2ensite tasmoadmin
sudo a2enmod rewrite

Start Apache and check

sudo systemctl reload apache2

then open http://*youriporhostname*:9999

If you get a PHP version error

Note the PHP version from the error
Disable it with (in this case php8.0 was active)
sudo a2dismod php8.0
and enable the correct version with
sudo a2enmod php8.2
then
sudo systemctl reload apache2