πŸ”΄ January 2024 Alert: Forum support inactive!
New forum registration are currently closed.
Use GitHub discussions
.

    UVdesk

    • Login
    • Search
    • Recent

    Solved Having trouble running composer

    Technical Help
    2
    9
    1927
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DomDis last edited by DomDis

      So I'm following a Install guide on the web and I ran the following

      curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
      sudo mkdir /var/www/uvdesk
      sudo chown $USER:$USER /var/www/ -R
      cd /var/www/uvdesk
      composer clear-cache
      composer create-project uvdesk/community-skeleton helpdesk-project
      

      Why am I following the above Because I'm a NOOB and your install instructions are not very helpful

      It displays a bunch of stuff and then I think it fails on "!! Could not open input file: ./bin/console" Here's the tail end from the actual run

      Run composer recipes at any time to see the status of your Symfony recipes.

      Package Manager: 5 package operations

      • Configuring uvdesk/core-framework
      • Configuring uvdesk/automation-bundle
      • Configuring uvdesk/extension-framework
      • Configuring uvdesk/mailbox-component
      • Configuring uvdesk/support-center-bundle

      Executing script cache:clear [KO]
      [KO]
      Script cache:clear returned with error code 1
      !! Could not open input file: ./bin/console
      !!
      Script @auto-scripts was called via post-update-cmd
      administrator@ubuntu-uvdesk:/var/www/DeleteMe$

      peopleinside 1 Reply Last reply Reply Quote 0
      • D
        DomDis @peopleinside last edited by

        @peopleinside

        I found another how tow and this seems to be working

        [https://computingforgeeks.com/setup-uvdesk-ticketing-system-on-ubuntu/](link url)

        peopleinside 1 Reply Last reply Reply Quote 0
        • peopleinside
          peopleinside EX helping member @DomDis last edited by

          @domdis I'm sorry for the issue you are encountering.

          What happen when you run composer create-project uvdesk/community-skeleton helpdesk-project ?

          What version of composer are you using, on with operative system?
          When you run composer create-project uvdesk/community-skeleton helpdesk-project I suggest to not run as root but as SSH normal user.

          Will help have steps followed and the specific error you get, for example the output after composer create-project uvdesk/community-skeleton helpdesk-project

          You can find some help on installing UVdesk in this forum article: https://forums.uvdesk.com/topic/1925/installing-and-setup-uvdesk-for-the-first-time

          πŸ’¬ You can also ask help on GitHub Discussions
          πŸ”΄ I am no more active on Uvdesk
          πŸ”΄ Forum support is inactive!

          D 2 Replies Last reply Reply Quote 0
          • D
            DomDis @peopleinside last edited by DomDis

            @peopleinside said in Having trouple running composer:

            What happen when you run composer create-project uvdesk/community-skeleton helpdesk-project ?
            What version of composer are you using, on with operative system?

            I ran

            curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
            sudo mkdir /var/www/uvdesk
            sudo chown $USER:$USER /var/www/uvdesk                      
            
            cd /var/www/uvdesk
            composer clear-cache
            composer create-project uvdesk/community-skeleton helpdesk-project
            

            see [https://websiteforstudents.com/how-to-install-uvdesk-on-ubuntu/](link url)

            When you run composer create-project uvdesk/community-skeleton helpdesk-project I suggest to not run as root but as SSH normal user.

            I am a normal user (not root or sudo)

            Will help have steps followed and the specific error you get, for example the output after composer create-project uvdesk/community-skeleton helpdesk-project

            1 Reply Last reply Reply Quote 0
            • D
              DomDis @peopleinside last edited by

              @peopleinside

              I found another how tow and this seems to be working

              [https://computingforgeeks.com/setup-uvdesk-ticketing-system-on-ubuntu/](link url)

              peopleinside 1 Reply Last reply Reply Quote 0
              • Topic has been marked as solved  peopleinside peopleinside 
              • peopleinside
                peopleinside EX helping member @DomDis last edited by

                @domdis ok, be careful with external guides πŸ™‚

                πŸ’¬ You can also ask help on GitHub Discussions
                πŸ”΄ I am no more active on Uvdesk
                πŸ”΄ Forum support is inactive!

                D 1 Reply Last reply Reply Quote 0
                • D
                  DomDis @peopleinside last edited by

                  @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'll need the current
                  password for the root user.  If you've just installed MariaDB, and
                  you haven't set the root password yet, the password will be blank,
                  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 'n'.
                  
                  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 'localhost'.  This
                  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 'test' that anyone can
                  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've completed all of the above steps, your MariaDB
                  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$>
                          # 2.4.10+ can proxy to unix socket
                          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 ##<= Like this
                          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β€œ

                  peopleinside 1 Reply Last reply Reply Quote 0
                  • peopleinside
                    peopleinside EX helping member @DomDis last edited by

                    @domdis I'm happy to know that now UVdesk instance is running on your server.
                    Thanks for the sharing.

                    πŸ’¬ You can also ask help on GitHub Discussions
                    πŸ”΄ I am no more active on Uvdesk
                    πŸ”΄ Forum support is inactive!

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      DomDis @peopleinside last edited by

                      @peopleinside Just need to do the mail piece again. I had SMTP working but not IMAP Then I scrapped UVDESK and I came back to give it a second chance

                      peopleinside 1 Reply Last reply Reply Quote 0
                      • peopleinside
                        peopleinside EX helping member @DomDis last edited by

                        @domdis if you have email issues please open a separate topic, this one is about installation and composer πŸ™‚

                        πŸ’¬ You can also ask help on GitHub Discussions
                        πŸ”΄ I am no more active on Uvdesk
                        πŸ”΄ Forum support is inactive!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post