Skip to content

Guide for Ubuntu Server 22.04

Mihai edited this page Oct 3, 2023 · 2 revisions

Out of date as minimum requirements are PHP 8.1

Ubuntu Linux

ubuntu-22.04-server-amd64.iso (https://www.ubuntu.com/download)

Install required packages

sudo apt update && \
sudo apt install \
apache2 \
php \
libapache2-mod-php \
php8.1-curl \
php8.1-zip \
php8.1-mbstring \
php8.1-xml \
git \
unzip \
vim

Setup TasmoAdmin

Download latest release zip file.

Unzip contents to /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.1/apache2/conf.d/10-opcache.ini

Create tasmoadmin.conf

sudo vim /etc/apache2/sites-available/tasmoadmin.conf

press i (insert Mode)

Enter: (yes, it must be tasmoadmin/tasmoadmin if you cloned it from github. if you wnat to be sure, check if the index.php is in tasmoadmin or tasmoadmin/tasmoadmin directory)

<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 ESC (quit insert mode)

tip :wq (write&quit vim)

Edit ports.conf

sudo vim /etc/apache2/ports.conf

press i (insert Mode)

Enter:

# 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 ESC

tip :wq enter

Enable site and mod

sudo a2ensite tasmoadmin
sudo a2enmod rewrite

Start Apache

sudo service apache2 restart