The solution of the error “Job for puppetserver.service failed because the control process exited with error code”

I noticed once when I started Puppet server, after installation, the following error:

Job for puppetserver.service failed because the control process exited with error code. See “systemctl status puppetserver.service” and “journalctl -xe” for details.

The error occurs because there is not enough RAM and to fix the error, open the Puppet server configuration file:

sudo nano /etc/default/puppetserver

And reduce the amount of allocated RAM for the Puppet server (for example, I specified 512m instead of 2g):

JAVA_ARGS="-Xms512m -Xmx512m"

Now let’s start the Puppet server:

sudo systemctl start puppetserver

Run application at startup in Ubuntu

Below is an example of creating a script to autorun the desired program.

Create a script:

sudo touch /etc/init.d/name

Open it in a text editor (in the editor nano Ctrl+X to exit, and y/n to save or cancel changes):

sudo nano /etc/init.d/name

Fill it with content like:

#!/bin/bash
/etc/init.d/programma start

Let’s make the script executable:

sudo chmod +x /etc/init.d/name

Add the script to startup:

sudo update-rc.d name defaults 95

You can get the documentation for update-rc.d by running the command:

man update-rc.d

To remove a script from autorun, use the command:

sudo update-rc.d name remove

See also:
Solving the error “insserv: warning: script ‘script’ missing LSB tags and overrides”

Installing the Netlist for ABillS

On the test, I install the Netlist module for ABillS in Ubuntu Server.

We import the tables into the database:

mysql -D abills --default-character-set=utf8 < /usr/abills/db/Netlist.sql

Open the billing configuration file:

nano /usr/abills/libexec/config.pl

Make sure that the module is activated:

@MODULES = (
          'Netlist'
          );

Install nmap and Perl module for it:

sudo apt-get install nmap
sudo cpanm Nmap::Parser

Let’s see where nmap is located:

which nmap

Open the billing configuration file again:

sudo nano /usr/abills/libexec/config.pl

Let’s specify the path to nmap:

$conf{'NMAP_LOCATION'}="/usr/bin/nmap";

Add to sudoers:

echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/nmap' >> /etc/sudoers.d/abills_sudoers

After installation, the module will be available in the menu /Settings/Netlist

Configuring Automatic Calls in Asterisk

Asterisk can automatically make a call if you put a .call file in the (default) /var/spool/asterisk/outgoing/ directory. If the date of the file change is greater than the current one, the call will be made on or after this time.

For automatic calls, the pbx_spool.so module must be loaded, it must be registered in modules.conf or autoload=yes must be specified.

Continue reading “Configuring Automatic Calls in Asterisk”

Installing oVirt

oVirt — virtualization management system.

On the test, I will install oVirt in CentOS 7.

First of all, let’s add an official repository:

yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm

Update the packages:

yum update

It is desirable to reboot the system if the kernel was updated:

reboot

Install the oVirt Engine and all dependencies:

yum install ovirt-engine

This completes the installation of the oVirt Engine and you can proceed to setup by following the on-screen instructions:

engine-setup

By the end of the configuration, access information will be displayed and the oVirt panel can be opened in the browser https://example.com/ovirt-engine.

Installing Nessus on Linux

Nessus – vulnerability scanner in Linux.

Go to the official website http://www.tenable.com/products/nessus/select-your-operating-system and download Nessus for the operating system that you have installed.

Switch to the root user:
su

Run the installation of the downloaded file, for example:

dpkg -i Nessus-7.0.2-debian6_amd64.deb

Run Nessus:

/etc/init.d/nessusd start

After that, you can open Nessus in the browser by clicking https://IP:8834/

For further work, you need to register with https://www.tenable.com/products/nessus/activation-code.

Installing and Using HTTrack on Linux

HTTrack — an offline browser that allows you to download Web sites to your local computer.

Switch to the root user:
su

The installation command in Ubuntu/Debian:

apt-get install httrack

The installation command in CentOS:

yum install httrack

Create a separate directory and go into it so that when downloading the files are not scattered around the current one:

mkdir sitename
cd sitename

Let’s start downloading the site:

httrack sitename.com

If the operating system is Linux with a graphical interface, then you can install WebHTTrack which has a graphical interface:

apt-get install webhttrack