Ubuntu 18.04 Two vital modules are missing


(Civilpolisen) #1

I’ve now made a third clean install. All is almost working but two vital modules are missing.

Process management: Without this module, the second is not working… UCL, User Control Panel.

Recommended steps (Run from the CLI)

  • fwconsole ma install pm2
  • fwconsole ma enable pm2

How do I install these things!? I’ve done some notes: http://freepbx.tilda.ws/

“Thank God it’s Friday” :slight_smile: Hopefully we get this up and running next week…!


#2

What version of node do you have installed? (node -v)


(Civilpolisen) #3

jakob@sip:~$ node -v
v8.10.0


My SIP-app from the phone does not connect and it’s a surprise to me because that part was easy earlier.

I’ve written some Ubuntu 18.04-related notes at the bottom of the page and also added some photos that were missing.

I’m seriously considering installing all on Ubuntu 20.04, since all was actually working on that platform… apart from PHP7 because I was too fast installing things. (I assume!!) Now I know the procedure! :slight_smile:


#4

Debian 11 Asterisk 16, but add your own compile of zastrridk 18

https://wiki.freepbx.org/plugins/servlet/mobile#content/view/209879949/212664718

See comments theretoo.


(Civilpolisen) #5

Thank you for taking the time to post this link!
I read the specs: “PHP 7.4, standard with Debian Bullseye”

I got the impression PBX is not compatible with PHP 7.4, or does that vary from OS to OS!?
I’m trying a new install, Ubuntu 20.04 this time, and I just want to make sure to install the correct version of PHP.

But at the other hand, I now see that PHP 8.0 is the latest version of PHP for Ubuntu.
https://packages.ubuntu.com/search?suite=impish&searchon=names&keywords=php


I’m going along with the install. PHP and Node are important to not have too late versions…


" Step 5 – Install FreePBX"
“FreePBX requires Apache webserver, MariaDB and PHP version 7.2 to be installed in your server. By default, Ubuntu 20.04 ships with PHP version 7.4, so you will need to install the PHP Ondrej repository to your server. You can add it with the following command:”


Just checking versions for php and node.

root@sip:~/freepbx# php -v
PHP 7.2.34-24+ubuntu20.04.1+deb.sury.org+1 (cli) (built: Aug 26 2021 15:55:49) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.34-24+ubuntu20.04.1+deb.sury.org+1, Copyright © 1999-2018, by Zend Technologies
root@sip:~/freepbx# node -v
v10.19.0
root@sip:~/freepbx#



   Correct content:

root@Asterisk:~# cat /etc/asterisk/asterisk.conf

[ directories ] ( ! ) (in a row, without the spaces.)
directories
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin

[options]
;verbose = 3
;debug = 3
;refdebug = yes ; Enable reference count debug logging.
;alwaysfork = yes ; Same as -F at startup.
;nofork = yes ; Same as -f at startup.
;quiet = yes ; Same as -q at startup.
;timestamp = yes ; Same as -T at startup.
;execincludes = yes ; Support #exec in config files.
;console = yes ; Run as console (same as -c at startup).
;highpriority = yes ; Run realtime priority (same as -p at
; startup).
;initcrypto = yes ; Initialize crypto keys (same as -i at
; startup).
;nocolor = yes ; Disable console colors.
;dontwarn = yes ; Disable some warnings.
;dumpcore = yes ; Dump core on crash (same as -g at startup).
;languageprefix = yes ; Use the new sound prefix path syntax.
;systemname = my_system_name ; Prefix uniqueid with a system name for
; Global uniqueness issues.
;autosystemname = yes ; Automatically set systemname to hostname,
; uses ‘localhost’ on failure, or systemname if
; set.
;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms)
; If we get shorter DTMF messages, these will be
; changed to the minimum duration
;maxcalls = 10 ; Maximum amount of calls allowed.
;maxload = 0.9 ; Asterisk stops accepting new calls if the
; load average exceed this limit.
;maxfiles = 1000 ; Maximum amount of openfiles.
;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
; the amount of free memory falls below this
; watermark.
;cache_media_frames = yes ; Cache media frames for performance
; Disable this option to help track down media frame
; mismanagement when using valgrind or MALLOC_DEBUG.
; The cache gets in the way of determining if the
; frame is used after being freed and who freed it.
; NOTE: This option has no effect when Asterisk is
; compiled with the LOW_MEMORY compile time option
; enabled because the cache code does not exist.
; Default yes
;cache_record_files = yes ; Cache recorded sound files to another
; directory during recording.
;record_cache_dir = /tmp ; Specify cache directory (used in conjunction
; with cache_record_files).
;transmit_silence = yes ; Transmit silence while a channel is in a
; waiting state, a recording only state, or
; when DTMF is being generated. Note that the
; silence internally is generated in raw signed
; linear format. This means that it must be
; transcoded into the native format of the
; channel before it can be sent to the device.
; It is for this reason that this is optional,
; as it may result in requiring a temporary
; codec translation path for a channel that may
; not otherwise require one.
;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of
; directly.
;runuser = asterisk ; The user to run as.
;rungroup = asterisk ; The group to run as.
;lightbackground = yes ; If your terminal is set for a light-colored
; background.
;forceblackbackground = yes ; Force the background of the terminal to be
; black, in order for terminal colors to show
; up properly.
;defaultlanguage = en ; Default language
documentation_language = en_US ; Set the language you want documentation
; displayed in. Value is in the same format as
; locale names.
;hideconnect = yes ; Hide messages displayed when a remote console
; connects and disconnects.
;lockconfdir = no ; Protect the directory containing the
; configuration files (/etc/asterisk) with a
; lock.
;stdexten = gosub ; How to invoke the extensions.conf stdexten.
; macro - Invoke the stdexten using a macro as
; done by legacy Asterisk versions.
; gosub - Invoke the stdexten using a gosub as
; documented in extensions.conf.sample.
; Default gosub.
;live_dangerously = no ; Enable the execution of ‘dangerous’ dialplan
; functions from external sources (AMI,
; etc.) These functions (such as SHELL) are
; considered dangerous because they can allow
; privilege escalation.
; Default no
;entityid=00:11:22:33:44:55 ; Entity ID.
; This is in the form of a MAC address.
; It should be universally unique.
; It must be unique between servers communicating
; with a protocol that uses this value.
; This is currently is used by DUNDi and
; Exchanging Device and Mailbox State
; using protocols: XMPP, Corosync and PJSIP.
;rtp_use_dynamic = yes ; When set to “yes” RTP dynamic payload types
; are assigned dynamically per RTP instance vs.
; allowing Asterisk to globally initialize them
; to pre-designated numbers (defaults to “yes”).
;rtp_pt_dynamic = 35 ; Normally the Dynamic RTP Payload Type numbers
; are 96-127, which allow just 32 formats. The
; starting point 35 enables the range 35-63 and
; allows 29 additional formats. When you use
; more than 32 formats in the dynamic range and
; calls are not accepted by a remote
; implementation, please report this and go
; back to value 96.

; Changing the following lines may compromise your security.
;[files]
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl


Downloading and Installing pm2
Downloading pm2
Installing pm2
Untarring…Done
Node Package Manager is not installed
Error(s) installing pm2:

Failed to run installation scripts

This is sort of urgent…!


Maybe this instruction will do the trick!?
https://linuxize.com/post/how-to-install-node-js-on-ubuntu-20-04/

sudo apt update
sudo apt install nodejs npm

jakob@sip:~$ nodejs --version
v10.19.0
jakob@sip:~$ npm --version
6.14.4
jakob@sip:~$

Downloading and Installing pm2
Downloading pm2
Installing pm2
Untarring…Done
Installing/Updating Required Libraries. This may take a while…Installed npm-cache v0.7.0 Running installation… …
Finished updating libraries!
Generating CSS…Done
pm2 installed successfully
Updating Hooks…Done