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

How to start ClamAV scanning from the command line on the cPanel server

Here is an example of checking the public_html directory with the removal of infected files:

/usr/local/cpanel/3rdparty/bin/clamscan -ri --remove /home/user/public_html

Similarly, other directories are checked.

To start checking only the mail and public_html directory for all users:

/usr/local/cpanel/3rdparty/bin/clamscan -ri /home/*/mail
/usr/local/cpanel/3rdparty/bin/clamscan -ri /home/*/public_html

To update the anti-virus database, use the command:

/usr/local/cpanel/3rdparty/bin/freshclam

See also my article:
Installing and using ClamAV antivirus software