Offline Installation of the Puppeteer Chromium Library
In air-gapped environments, you can use the broad steps below for installing the Puppeteer Chromium library on the target eG manager host:
-
Mount the RHEL ISO installation image on the target Linux system;
-
Configure the Linux ISO as a local Yum repository;
-
Install the Puppeteer library files
-
Validate the Installation
Each of these steps has been discussed below.
Mounting the RHEL ISO Image on the Linux System
For this, do the following:
-
Login to the target Linux system.
-
Attach the RHEL ISO image matching the installed OS version to the Linux system as a CD-ROM device. To achieve this, first determine the name of the CD-ROM device. For that, issue the following command at the Shell prompt:
lsblk
-
This command displays detailed information about all storage devices like hard drives, SSDs, and USBs, along with their partitions. It outputs this data in a clean, hierarchical tree-like format, showing the device name, size, type, and where it is mounted (see Figure 1).
Figure 1 : Determining the name of the CD-ROM device from the output of the lsblk command
-
In the output of the command (see Figure 1), look for a device with the NAME sr0 and type rom. Such a device is the CD-ROM device.
-
Next, mount the RHEL ISO image to a temporary directory (say /mnt) on the CD-ROM device. For this, issue the following command at the prompt:
sudo mount /dev/sr0 /mnt
-
Upon successful execution, the command will return the following output:
-
In the output of Figure 2, check if the MOUNTPOINT for the CD-ROM device is set to /mnt. If it is, its a clear indicator that the image was successfully mounted.
Configuring Linux ISO as a Local Yum Repository
For this, follow the steps below:
-
Issue the following command at the shell prompt of the target Linux system, to navigate to the repository configuration directory:
cd /etc/yum.repos.d/
-
Then, proceed to create a local repository file (say, local.repo) using the following command:
sudo vi local.repo
-
Add the following content to the new repo file:
Copy[BaseOS]
name=RHEL BaseOS Local Repo
baseurl=file:///mnt/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=RHEL AppStream Local Repo
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0 -
Save and exit the file by issuing the following command:
:wq
-
Then, verify the repository configuration. For this, you can issue one of the following commands at the prompt:
yum repolist all
(OR)
dnf repolist
-
Output similar to what you see in Figure 3 will then appear.
-
In the output (see Figure 3), check if repo name of the new repository you created is correctly displayed, and its status is enabled. In the case of our example, local is the name of the new repository, and the same is displayed under repo name. The status of local is also enabled.
-
Also, ensure that BaseOS and AppStream are listed and enabled
Installing the Puppeteer Library
Finally, proceed to install the library files by issuing the following command at the prompt:
sudo yum install -y \ alsa-lib \ atk \ at-spi2-atk \ cairo \ cups-libs \ fontconfig \libdrm \ libX11 \ libXcomposite \ libXcursor \ libXdamage \ libXext \ libXfixes \ libXi \ libXrandr \ libXrender \ libXtst \ libXScrnSaver \ libxkbcommon \ mesa-libgbm \ gtk3 \ liberation-fonts
Validate the Puppeteer Installation
For this, do the following:
-
Run the following command at the prompt:
rpm -qa | grep fontconfig
-
If this command returns the output displayed by Figure 4, its a confirmation that the package has been installed successfully.
Figure 4 : Validating the successful installation of the dependencies
-
Next, change to the following directory as the eG install user:
/opt/egurkha/manager/tomcat/webapps/final/HighchartExport/node_modules/.cache/puppeteer/chrome-headless-shell/linux-131.0.6778.108/chrome-headless-shell-linux64
-
Run the following command now:
./chrome-headless-shell –version
-
If the results output by this command are as shown by Figure 5, then its a clear sign that the dependencies are working as expected.