Configurare Sistem de operare

How to install and configure Nagios Core

1.Prerequisites

Make sure your system is updated and install necessary packages:

bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 php libapache2-mod-php build-essential libgd-dev unzip curl openssl libssl-dev daemon

Create a Nagios user and group:

bash
sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios

Install required dependencies:

bash
sudo apt install -y gcc make autoconf libc6 libmcrypt-dev libssl-dev bc gawk dc build-essential snmp libnet-snmp-perl gettext

2.  Install Nagios Core

Step 1: Download Nagios Core

bash
cd /tmp
curl -LO https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.1.tar.gz
tar -xvzf nagios-4.5.1.tar.gz
cd nagios-4.5.1

Step 2: Compile and Install Nagios

bash
./configure --with-command-group=nagcmd
make all
sudo make install-groups-users
sudo make install
sudo make install-daemoninit
sudo make install-commandmode
sudo make install-config
sudo make install-webconf

Step 3: Set up Web Interface

Set up Apache user password:

bash
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Enable Apache modules and restart Apache:

bash
sudo a2enmod cgi rewrite
sudo systemctl restart apache2

3.  Install Nagios Plugins

Nagios uses plugins to monitor services.

bash
cd /tmp
curl -LO https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz
tar -zxvf nagios-plugins-2.3.3.tar.gz
cd nagios-plugins-2.3.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
sudo make install

4. Install NRPE (for remote monitoring)

bash
sudo apt install -y nagios-nrpe-server nagios-plugins

Edit the NRPE config file on remote hosts (/etc/nagios/nrpe.cfg):

  • Add your Nagios server IP to allowed_hosts

  • Restart NRPE: sudo systemctl restart nagios-nrpe-server

On the Nagios server, install NRPE plugin:

bash
sudo apt install nagios-nrpe-plugin

5. Configure Nagios

Main configuration directory:
/usr/local/nagios/etc/

Verify default config:

bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Enable additional configs in nagios.cfg:

bash
cfg_dir=/usr/local/nagios/etc/servers

Create the directory:

bash
sudo mkdir /usr/local/nagios/etc/servers

6. Start Nagios and Access Web UI

Enable and start Nagios:

bash
sudo systemctl enable nagios
sudo systemctl start nagios

Access via browser:
http://<server_ip>/nagios/
Login with user: nagiosadmin and the password you set earlier.

7. Add Hosts and Services

 (/usr/local/nagios/etc/servers/webserver.cfg):

cfg
define host {
use linux-server
host_name webserver
alias Web Server
address 192.168.1.10
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name webserver
service_description HTTP
check_command check_http
}

Restart Nagios:

bash
sudo systemctl restart nagios

8. Optional Enhancements

  • Email alerts: Configure contacts.cfg with email details

  • SSL for web UI: Use Let’s Encrypt or self-signed certs

  • Mobile UI: Install mobile-friendly frontends like NagiosMobile or Nagios V-Shell

  • NagiosQL / Centreon: Use GUIs for easier management

  • Performance Graphing: Integrate with PNP4Nagios or NagiosGraph.

Check for errors:

bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Log file:
/usr/local/nagios/var/nagios.log

Web Interface:
Monitor hosts/services and acknowledge problems.

[mai mult...]

How to install Peppermint OS

Peppermint OS is a lightweight Linux distro based on Debian or Devuan, designed for speed, efficiency, and minimal resource usage. It features the XFCE desktop environment with a clean, familiar layout, ideal for both beginners and advanced users.

  1. Go to the official site: https://peppermintos.com/

  2. Choose the latest Debian or Devuan flavor ISO

  3. Download the 64-bit .iso file.

Create Bootable Installation Media

Use any of the following tools to write the ISO to a USB drive:

Instructions (Rufus example):

  1. Insert USB (minimum 4 GB)

  2. Open Rufus, select your USB device

  3. Choose the downloaded Peppermint .iso

  4. Click Start and wait until complete.

Step 3: Install Peppermint OS

  1. Insert USB and boot your computer

  2. Enter BIOS/UEFI and set USB as the first boot device

  3. Save and reboot.

At the Boot Menu:

  • Select “Start Peppermint OS” to boot into the live environment

  • On the desktop, double-click “Install Peppermint OS”.

Installation Steps:

  1. Choose your language and keyboard layout

  2. Connect to Wi-Fi if needed

  3. Choose installation type:

    • Erase disk (for clean install)

    • Manual partitioning (advanced users).

  4. Set your time zone

  5. Create your user account and password

  6. Click Install.

✅ After installation completes, remove the USB and reboot.

Step 4: Post-Install Configuration

1. 🔁 Update your System

Open a terminal and run:

bash
sudo apt update && sudo apt upgrade -y

Or use the GUI Update Manager.

Install Web Browser

Peppermint is minimalist; if your preferred browser isn’t pre-installed:

bash
sudo apt install firefox-esr
# or
sudo apt install chromium

Install Common Apps

bash
sudo apt install vlc gimp libreoffice synaptic

Customize Appearance

  • Go to Menu > Settings > Appearance

  • Change theme, icons, and fonts

  • Use “Peppermint Welcome” for useful tweaks and guides.

Set Up Cloud Storage (Optional)

  • Install cloud clients like:

    bash
    sudo apt install rclone

    Or use web apps via the included ICE tool to create “site-specific browsers”.

System Tools & Performance Tips

1. Use ICE (Site-specific Browser Tool)

  • Launch ICE from the menu.

  • Turn a website (like Gmail or YouTube) into a standalone app.

2. Install Driver Manager

If not present:

bash
sudo apt install mintdrivers

Then go to Menu > Administration > Driver Manager to install proprietary drivers.

3. Enable Firewall

bash
sudo ufw enable

4.Install Flatpak Support

bash
sudo apt install flatpak gnome-software-plugin-flatpak

Then add Flatpak repo:

bash
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
[mai mult...]

How to install and configure TrueNAS

TrueNAS is an open-source NAS (Network Attached Storage) operating system based on FreeBSD (TrueNAS CORE) or Linux (TrueNAS SCALE). It provides file sharing, data protection, and virtualization features for home or enterprise storage.

  • TrueNAS CORE: Best for traditional NAS (FreeBSD based)

  • TrueNAS SCALE: Supports Docker, Kubernetes, virtualization (Linux based).

Step 1: Download and Prepare Installation Media

  1. Visit https://www.truenas.com/download/

  2. Choose TrueNAS CORE or TrueNAS SCALE

  3. Download the .iso file

  4. Use a tool like Rufus or balenaEtcher to create a bootable USB stick from the ISO.

Step 2: Install TrueNAS

Boot from USB:

  1. Plug in the bootable USB to the target machine

  2. Boot and enter the BIOS/UEFI to set the USB as the first boot device

  3. Reboot to launch the installer.

Installation Steps:

  1. Select Install/Upgrade

  2. Choose the boot device (e.g., USB or SSD – note: it will be wiped)

  3. Set a root password

  4. After installation, remove the USB installer

  5. Reboot into TrueNAS.

Step 3: Access the Web UI

Once TrueNAS boots:

  1. The console will show an IP address (e.g., http://192.168.1.100)

  2. Open a browser on a device on the same network

  3. Visit the displayed IP

  4. Log in with root and the password you created.

Step 4: Initial Configuration

1. Set Timezone and Hostname

  • Go to System > General

  • Set your hostname and timezone.

2. Create Storage Pool (ZFS)

  • Go to Storage > Pools > Add

  • Choose Create new pool

  • Add disks and configure RAID level (e.g., RAIDZ1, mirror)

  • Name the pool and click Create.

3. Create a Dataset (Optional)

  • Inside the pool, create datasets for different shares (e.g., media, backups).

Step 5: Set Up Network Shares

Option A: SMB (Windows/macOS)

  1. Go to Sharing > Windows (SMB) Shares > Add

  2. Select the dataset path

  3. Name your share

  4. Enable the share and save

  5. Go to Services > SMB, enable and start it.

Option B: NFS (Linux)

  1. Go to Sharing > Unix (NFS) Shares > Add

  2. Choose the dataset path and set permissions

  3. Enable NFS service.

Step 6: User and Permissions

  1. Go to Accounts > Users > Add.

  2. Create users with their home directories and shell (if needed).

  3. Assign users to datasets with proper permissions under Storage > Pools > Permissions.

Optional: Enable Additional Features

  • Apps (TrueNAS SCALE only):

    • Go to Apps > Launch Docker containers like Plex, Nextcloud, etc.

  • Snapshots:

    • Enable ZFS snapshots for versioned backups

  • Replication:

    • Set up data replication to another system

  • Alerts:

    • Configure email alerts under System > Alert Settings.

[mai mult...]

How to create a Proxmox cluster

Once you have all the nodes ready, access them in a web browser, and log in to the Proxmox VE web GUI. I connected to my first Proxmox server (pmox-host1). Click the Datacenter option at the top, choose Cluster, and then click the Create Cluster button.

Create Cluster option in Proxmox VE web interface

Give a unique name to your Proxmox cluster, and select a link for the cluster network. I will keep the default link (0) selected. It is a good idea to choose a network link that isn’t used for other high-traffic needs, such as network storage.

Create a cluster in Proxmox VE

You can click the Add button to add a failover link if multiple network links are available on your node. Click the Create button, and you will see a task viewer window showing the status of cluster creation.

Viewing cluster creation progress in Proxmox VE

Your Proxmox cluster has now been created.

Add nodes to the cluster

When adding nodes to your Proxmox cluster, make sure no VM or container is running on the node. When you add a node to the cluster, it will inherit the cluster configuration, which will overwrite all current local configurations. If you have an important VM or container running, you can create a backup, remove it, and import it later after joining the cluster.

To join a node to the cluster, you need to copy some information from the first node where you created the cluster. To do that, navigate to Datacenter > Cluster and then click the Join Information button, as shown in the screenshot.

Viewing the join information for a cluster in Proxmox VE

Click the Copy Information button to copy the cluster join information to your clipboard.

Copying the join information for a cluster in Proxmox VE

Now, connect the other Proxmox node that you want to join to the cluster. Navigate to Datacenter > Cluster, and click the Join Cluster button, as shown below:

Join Cluster option in Proxmox VE

In the Information box, paste the join information, type the root password of the first node, and click the Join button.

Add a node to the Proxmox cluster

The second node will now be added to the Proxmox cluster. As soon as the node is added to the cluster, the server certificate is changed, so you need to reload the page and log in again to the Proxmox VE web interface. The screenshot below shows that our proxmox-lab cluster now has two nodes: pmox-host1 and pmox-host2.

Viewing the cluster information in Proxmox VE

The information about cluster nodes is listed under the Cluster option. In addition, any shared storage that is attached to the first node is automatically attached to the new node.

Once you have a Proxmox cluster up and running, you can start migrating your VMs or containers when needed, as shown in the screenshot below:

Performing live VM migration in a Proxmox cluster

The migration is pretty fast, particularly when you’re using shared storage (e.g., NAS or Ceph), so your VM will experience little to no downtime at all. The cool feature you get with a Proxmox cluster is that you can still migrate your VM (or container), even if you’re using local storage. Of course, it takes longer to migrate, but it works.

Problem with a 2-node cluster

It is entirely possible to set up a Proxmox cluster with just two nodes, as we did above. However, as mentioned earlier, the Proxmox cluster depends on quorum votes. For a quorum to exist in a cluster, the majority of nodes need to be online. With just two nodes in a cluster, both get an equal number of votes, so when either node goes down, the quorum will be lost, and the Proxmox cluster switches to read-only mode. As a result, the cluster will stop functioning as expected. This makes server maintenance hard in a two-node cluster setup.

To deal with such a situation, there are two options:

  1. Manually set the expected votes to 1 by running the pvecm expected 1 command. This command changes the expected votes temporarily, which revert after restart. But it will help maintain the quorum so that your Proxmox cluster can continue to work with just a single node while you perform maintenance on the other node.
  2. Alternatively, you could set up a corosync-qdevice in Raspberry Pi or Docker and use it as a tiebreaker for quorum votes when one of two Proxmox nodes is down. The purpose of qdevice is to vote for the active node to maintain a quorum when there are just two nodes (or an even number) in the Proxmox cluster. The use of qdevice is not recommended when there are an odd number of nodes, as it could hurt cluster stability.

Considering the above situation, it is clear that it is a good idea to have at least three nodes in a Proxmox cluster, particularly in a production environment. Furthermore, you will be able to use the additional features, such as high availability, when there are three or more nodes in the cluster.

[mai mult...]

Demonstration of “strobelight” technology

With the phasing out of monitors and televisions using cathode ray tube technology, a void was created for users who wanted the ability to clearly see objects or text moving on the screen, being able to distinguish information even at high speeds. Fortunately, for at least 10 years a (partial, but very good) replacement has been developed, namely by implementing “strobe lights” that can turn off and on again 60 times per second (or more often). Next, we will see how this phenomenon can be observed demonstratively on any device with a screen.

[mai mult...]

Disfunctionalitati si solutii pentru miscarea imperfecta a cursorului mouseului

Daca observam ca miscarile mouse-ului nu ne mai reflecta asteptarile (corespondenta aproximativa de raport 1 la 1 intre miscarea fizica si rezultatul mutarii cursorului pe ecran), putem incerca sa investigam o serie de parametrii pentru remedierea acestora (presupunand ca mouse-ul a fost proiectat corespunzator si nu prezinta defecte din fabrica sau in urma transportarii).

[mai mult...]