Nagios – New installation on Debian 9

If you have to install a really great network those such as Nagios those will be steps needed:

1.Installing Apache2 + PHP (Skip if you already have one):

2.Installing Nagios core:

3.Installing Nagios Plugins (needed !)

4.Enable SSL for Nagios (and not only)

 

 

Facebooktwittergoogle_plusreddit

Creating swap partition

Swap partition is same thing as pagefile.sys for Windows. When we are using more RAM than we have, pagefile is used to store that extra data from memory.
For this Linux use swap partition. While you install Linux distribution most installers suggest to make swap partition that is twice the size of your RAM.
This is uncommon on VPS because that is a waste of storage on small servers.
But we can create and activate swap partition:

If Swap: 0 0 0 that means we aren’t using any swap partition.

Lets create and activate swap as root user:

Swap partition is use temporary, until we save information about it inside fstab:

Now we can enjoy swap even after reboot.

Facebooktwittergoogle_plusreddit

Ubuntu – Recovery Mode stuck after fsck

You can try to pick ‘root – Drop to root shell prompt‘ from Recovery Menu

 

Now you got root access to partition and can try to fix it from there.

 

Facebooktwittergoogle_plusreddit

Baikal – own calendar with ToDo list (CalDav) and address book (CardDav)

Using own CalDav and CardDav server can help you with creating private platform to synchronize event and contacts between multiply devices and other services like webmails.

First let us download latest baikal version from http://baikal-server.com/  to /var/www/dav.example.com

Next extract it

Move files to destination ex. /var/www/dav.example.com

Create vhost config file for Apache

or you could use more advance config file that use SSL (razem z Let’sEncrypt) + php5_fastcgi :

Now we enable required apache modules and restart it:

Let us change files ownership (depending on what user runs Apache default would be ex. www-data):

Create file so baikal will enable installation panel:

Depending which vhost file we use we enter baikal via web browser

On first page setup everything the way you like, and on the next one you will be able to configure database backend, so you can pick sqlite or mysql/mariadb.

 

So now we go up and running dav platform for you private data.

 

Updating:

Even if you use latest version from page, I would suggest update it to newest one from git page

For example currently the newest on git is 0.4.2 baikal version.

It is recommended to make backup of your database if you started already to use baikal.

Download newest baikal to same directory where you install the 0.2.7 version:

Extract it

Change ownership for extracted baikal and move every file outside excluding  ‘Specific‘ folder.

Enter administration panel ex. dav.example.com and you will see warning like this:

After login in baikal will update the database and you will be ready to use it once again.

 

Difference between 0.2.x and 0.4.x is in URL we tend to use card.php and cal.php are now  dav.php, and both still works but are deprecated so eventually they will stop working. I recommended to use dav.php.

Good practice would also be adding DNS record:

This way autodiscover function when setting up account on your device will find your proper configuration faster.

 

Example use:

Thunderbird:

 

Thunderbird + Cardbook

Add address book > Remote

 

Android + DavDroid:

 

Facebooktwittergoogle_plusreddit

GoGS – lightweight git front-end

GoGS is a frontend for git, it is a low demanding solution and thanks to fact that its being wrote in Go it work on every platform that support Go language.

GoGS as a core application use git and support different databases (mysql, postgresql lub tidb)

We could install gogs from source but we will use ready binary files for our system, and for backend we will use mariadb/mysql on debian/ubuntu system:

Lets download binary package from project page: gogs.io (in my case it was gogs_v0.9.13_linux_amd64.tar.gz) and extract it:

Now we need to create user and database for gogs:

 

First start:

Now we can connect with gogs via web browser using localhost:3000 or domain:3000 because gogs listening on 0.0.0.0:3000 address.

Configure it:

Rest things you can setup as you like.

Now we got running and ready to use GoGS installation (GoGIT)

Facebooktwittergoogle_plusreddit

Linux – Hide Bind version

If we would like to hide version of our bind server and make it harder for bot to sniff what version you use (assuming you always update 😉 ) you can make it by editing file: /etc/bind/named.conf.options:

Restart service:

Use dig to check that version you use now:

 

Facebooktwittergoogle_plusreddit

Recover main MySQL password

*** If it is possible do this operation in environment without internet access ***

 

Facebooktwittergoogle_plusreddit

Linux – Removing software from outside of repository

Sometimes you install software from outside of repository, sometimes you compile your package or install binary.

There are few methods for uninstalling that software when the time is right.

Method 1:

Method 2:

This method is time consuming and also require you to do some steps BEFORE actually installing package. This method is best for removing software that you install just for test purpose.

Method 3:

 

Facebooktwittergoogle_plusreddit

Linux – .conf missing after package reinstall

Sometimes after manul removing config files and then reinstall package you end up missing .conf file from that package (ex. freeradius).

Use this command as solution (freeradius used as example):

 

Facebooktwittergoogle_plusreddit