@peopleinside said in Having trouble running composer:
@domdis ok, be careful with external guides 
Yes of course but I don't think there is malicious intent in this set of instructions. This is so much easier to follow that what I saw on the uvdesk site
Step 1: Update and install essential tools
Once in the terminal of your fresh Ubuntu server, update it and install essential tools we shall use in our installation process
sudo apt update && sudo apt upgrade
sudo apt install wget vim git unzip curl apache2 libapache2-mod-fcgid -y
There are some modules required for the FastCGI confiugration and we need to enable them. This can be done by running this command:
sudo a2enmod actions fcgid alias proxy_fcgi rewrite
sudo systemctl restart apache2
Step 2: Install and setup database
We are going to use MariaDB for this setup.
sudo apt update
sudo apt upgrade -y
sudo reboot
sudo apt install mariadb-server mariadb-client
sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we
password for the root user. If you
you haven
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n]
... Success!
Normally, root should only be allowed to connect from
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n]
... Success!
By default, MariaDB comes with a database named
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n]
... Success!
Cleaning up...
All done! If you
installation should now be secure.
Thanks for using MariaDB!
After you have the database installed, the next step is to create a database and user for UVdesk. Let us, therefore, go ahead and get this done as shown below. You are free to name your database and user differently and ensure you use a strong password.
$ mysql -u root -p
CREATE DATABASE uvdeskdb;
CREATE USER 'uvdeskadmin'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON uvdeskdb.* TO 'uvdeskadmin'@'localhost';
FLUSH PRIVILEGES;
exit;
Step 3: Install and configure PHP
In order to get UVdesk pages served, there has to be a webserver. We shall use Apache for this guide. Additionally, UVdesk requires PHP we will have to set it up as well.
Install php-fpm and dependencies
sudo apt update
sudo apt install -y php
sudo apt install php-{cli,fpm,json,common,mysql,zip,gd,mbstring,curl,xml,bcmath,imap,intl,mailparse} php-pear
Check if php-fpm is running.
$ systemctl status php*-fpm.service
β php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-12-03 14:57:15 UTC; 1min 30s ago
Docs: man:php-fpm7.4(8)
Process: 41392 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fp> Main PID: 41389 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2204)
Memory: 10.3M
Add recommended PHP Settings
Open up your php-fpm ini file and add/edit the details shown below. They include Timezone, and memory limit settings. Add your date.timezone and change memory_limit to 512MB.
$ sudo vim /etc/php/*/fpm/php.ini
memory_limit = 512M
[Date]
date.timezone = Africa/Nairobi
Then restart php-fpm
sudo systemctl restart php*-fpm.service
Step 4: DownloadUVdesk community helpdesk
Download the Uvdesk community helpdesk project.
I believe this is going to the UVDESK.com domain

wget "https://cdn.uvdesk.com/uvdesk/downloads/opensource/uvdesk-community-current-stable.zip"
Extract the file
unzip uvdesk-community-current-stable.zip
Step 5: UVdesk installation
Move the resulting directory to /var/www/uvdesk directory:
sudo mv uvdesk-community-*/ /var/www/uvdesk
Set the permissions of the directory to www-data user and group:
Gotta look into this

sudo chown -R www-data:www-data /var/www/uvdesk
sudo chmod -R 775 /var/www/uvdesk
Step 6: Configure Apache for UVdesk
We have to make a few changes to the Apache configuration defaults by adding the details we need for UVdesk. Change into sites-enabled, back up the default file, and create a new one having new configurations.
sudo mv /etc/apache2/sites-enabled/000-default.conf{,.bak}
Create a new file and add the details shown below. If you have an FQDN, replace example.com with it.
$ sudo vim /etc/apache2/sites-enabled/uvdesk.conf
<VirtualHost *:80>
ServerName udesk.example.com
ServerAlias www.udesk.example.com
DocumentRoot /var/www/uvdesk/public/
<Directory /var/www/uvdesk/public>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"
</FilesMatch>
ErrorLog /var/log/apache2/uvdesk-error.log
CustomLog /var/log/apache2/uvdesk-access.log combined
</VirtualHost>
On the main Apache configuration file, Allow Override on the following part of the config file
Gotta look into this

sudo vi /etc/apache2/sites-available/000-default.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Gotta look into this

Modify the permissions on the root directory and restart the webserver
sudo chown -R www-data:www-data /var/www/uvdesk
sudo chmod -R 755 /var/www/uvdesk
sudo systemctl restart apache2
I did not do this one

Allow port 8080 on your firewall
sudo ufw allow 80/tcp
Once that is done, we should be ready to rock and roll. Open up your favorite browser and point it to the IP or FQDN of your server. http://udesk.example.com or http://{your server's IP address}. You should see a page as shown below. Click on βLetβs Beginβ