MSP360 (Cloudberry) Backup SSL Certificate Expired when using Backblaze B2 Storage

If you’ve been using the MSP360 backup client on older CentOS hosts, you might have run into this error.

HTML

Upon further investigation, the agent error log /opt/local/Online Backup/<INSERTUUIDHERE>/logs/log_worker_<ANOTHERUUID>}.log show the following errors.

HTML

The issue was being on the client version Linux (rpm) v. 3.2.0.114 of which this MSP360 community support thread speaks about upgrading to the latest version of the client.

https://forum.msp360.com/discussion/2429/certificate-renewal-errors-for-backblaze-b2

To do so, you need to click on “Downloads” from your MSP360 admin dashboard and request the update of the default build. The new build ended up being 3.2.3.156

Once done, you can then update your clients under RMM->Remote Management, then click the settings icon to the far right and then click “Force Update”.

MikroTik Scripts

Setup SSH Key Login on Mikrotik

Created File and Place SSH Key Contents

Shell

Set SSH Key for Users

Shell

Setup Email Sending on Mikrotik via Postmark

Shell

Send a Test Email from Mikrotik

Shell

Backup Mikrotik Config and Email – Example 1

Shell

Backup Mikrotik Config and Email – Example 2

Shell

Dell OSMA on Proxmox/Debian Buster

I found a Reddit post that I wanted to make sure I kept in case it gets deleted and lost forever.

My Issue

I have some Dell servers that I wanted to enable iDRAC on remotely via a secondary network interface. Unfortunately, I didn’t have physical access. So I needed to use OSMA to enable iDRAC and configure the necessary network details.

Proxmox and Dell OSMA

If you have a Dell server and you want to be able to use the OSMA (Dell EMC OpenManage Server Administrator) on your Proxmox server. Here’s a quick guide that someone posted on Reddit and on the Proxmox forums.

WARNING

The code below on the Proxmox forums works, but the Reddit code doesn’t.

Since the code is half-baked on both. I’ve maintained my own version.

https://forum.proxmox.com/threads/dell-openmanage-on-proxmox-6-x.57932/

Ultimate Linux Shell Guide for Windows 10 – WSL + Terminal + ZSH + oh-my-zsh + Powerlevel10k

Draft

This is a draft article, so it’s incomplete!

Introduction

The following guide will help you install Windows Subsystem Linux, Windows Terminal and ZSH.

Step 1 – Enable WSL

It’s pretty easy to install Windows Subsystem Linux, open Powershell as Administrator, and run the following. The following command will require a restart.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Step 2 – Install Ubuntu

Navigate to the Windows Store and search for Ubuntu. You’ll have three options.

You can choose to install Ubuntu 20.04 LTS or Ubuntu 18.04 LTS. However, if you simply choose Ubuntu, you will get Ubuntu 20.04 LTS.

Totally up to you what you pick. Either works.

Once installed, you will have to launch Ubuntu so that it can continue the installation process. You’ll choose a username and password.

Step 3 – Install Windows Terminal

Windows Terminal provides a tabbed manager for all of your various terminals, such as Powershell, Command Prompt and WSL!

You can download Windows Terminal via the Windows Store

Step 4 – Configure Windows Terminal

Windows Terminal has many configuration options that you will find useful. Here are the ones I suggest you configure.

  • Start up -> Default Profile -> Ubuntu
  • Interaction -> Automatically copy selection to clipboard

Step 5 – Fixing the WSL Home Directory Issue

When you launch WSL you’re placed into /mnt/c/Users/<username> versus the typical Linux home directory of /home/<username>

So you’ll have to make one small change.

  • Go into Windows Terminal Settings ( Ctrl + , )
  • Profiles -> Ubuntu -> General
  • Set Starting Directory to: //wsl$/Ubuntu/home/<username>

Step 6 – Install ZSH

You can install ZSH like you would on any Ubuntu system!

sudo apt-get update;sudo apt-get install zsh

Enter in your password and Ubuntu will update it’s cache of packages and install ZSH.

You can then type “zsh” to launch the ZSH shell. You can also set your default shell to zsh by typing “chsh”. However, you will need to know the full path to zsh, and we can find this out by typing “which ZSH”

user@comp:/mnt/c/Users/user$ which zsh
/usr/bin/zsh

Now you can type “chsh” enter your password, and the path to zsh like so!

user@comp:/mnt/c/Users/user$ chsh
Password:
Changing the login shell for user
Enter the new value, or press ENTER for the default
        Login Shell [/bin/bash]: /usr/bin/zsh

Step 7 – Install oh-my-zsh

You can install oh-my-zsh using a one-liner from their website at https://ohmyz.sh or use the command below taken from their website.

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Step 8 – Install Powerlevel10k Font

What’s Powerlevel10k? it’s a zsh theme and successor to Powerlevel9k. I love using it. You can see the full installation instructions on Github at https://github.com/romkatv/powerlevel10k

The installation involves installing a supported font and the theme itself. I highly suggest installing the font as you’ll not be able to see all the fancy icons.

If you visit the installation page mentioned above, you’ll find a link to download the font. Here’s a direct link.

https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf

Download the font, double click on the font and press install!

You’ll then need to set up Windows Terminal with the font.

Open Settings (Ctrl+,), under “Profiles” click “Ubuntu” then “Appearance” and set “Font Face” to “MesloLGS NF”. Save, exit and relaunch.

Step 9 – Installing Powerlevel10k Theme

Again, you can refer to the Github page for installation instructions or use the following one-liner for oh-my-zsh.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Then you’ll need to set the theme in your .zshrc file, which should be located at the root of your home directory. Here’s a quick screenshot of where the .zshrc should be located after installing oh-my-zshrc.

There should already be a line for ZSH_THEME; simply change it to powerlevek10k

#ZSH_THEME="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"

Step 10 – Powerlevek10k Configuration

Close your Windows Terminal and relaunch it. You should now be taken through the Powerlevel10k configuration screens. Once complete, you can start using your ZSH shell with oh-my-zsh and the Powerlevel10k theme!

Further Customization

There are tons of configuration options for the Powerlevel10k theme; you can read all about it on the Github repository.

https://github.com/romkatv/powerlevel10k

I’ve actually create my own custom ZSH setup that does most of the work above, except for the font (Step 8). I’ve also add in some custom aliases and commands. It’s very much a WIP!

https://github.com/jordantrizz/zshbop

Enjoy!

Updates

  • 05-09-2022 – Added more detail about .zshrc

macOS Setup

Draft

This is a draft article, so it’s incomplete!

Table of contents

  1. Finder Preferences

    Finder Preferences

    Finder -> Preferences

    • General
      • Show these items on the desktop – Click all
    • Advanced
      • Show file extensions.
      • Show Folders on Top -> In windows when sorting by name

    macOS Setup iTerm2 + Homebrew + ZSH

    This guide is my setup on my macOS laptop with iTerm + Homebrew + ZSH.

    Step 1 – Install iTerm2

    Pretty self explanatory! Go get iTerm2 at https://iterm2.com and install it!

    Step 2 – Install Homebrew

    Again, another easy step! Install Homebrew at https://brew.sh/ at the time of this posting the following command works.

    Also note that you can use MacPorts it’s really your choice! I can’t recall why I switched to Homebrew 🙂

    Shell

    This will install the Xcode Command Line Tools as well!

    MySQL 8 Increasing table_open_cache in Ubuntu 20

    So if you’ve ever had to increase table_open_cache in Ubuntu 20, you’ll probably find that it doesn’t work the traditional way. Which is mind blowing! But I have a guess as to why. It’s to stop you from blowing up your server from too many open files!

    I had updated /etc/mysql/mysql.conf.d/mysqld.cnf with the following

    Plain Text

    However, MySQL was only showing the value set at 4945

    Plain Text

    After some Google searching, I found this thread https://askubuntu.com/questions/1241013/cannot-increase-mysql-table-open-cache-in-ubuntu-20-04

    Which pointed me to /lib/systemd/system/mysql.service and the line LimitNOFILE

    Plain Text

    Based on the information in the post, the LimitNOFILE is causing an automatic change to the “table_open_cache” variable. Modifying it to say 20000 will allow you to go with an 8000 table_open_cache. Copy and pasting into WordPress wouldn’t have done this post justice. So I screenshotted it.

    After making the changes and restarting MySQL I got table_open_cache set to 8000

    NetData Installation or Upgrade – Permission Denied Temp Directory not Executable

    You might have run into the following issue at some point when trying to install or upgrade Netdata.

    Shell

    It’s usually related to your /tmp folder is mounted without execution permission and doesn’t allow execution of programs from this location. A simple work around is to set the $TMPDIR location in your shell to a place that is mount with execution permission. As an example

    Shell

    Granted you don’t have to use /root/tmp it can be any location.

    Cyberpanel Openlitespeed Issue with PHP Session Files Cleanup on Ubuntu 18

    There’s an issue with the Cyberpanel installation using Openlitespeed on Ubuntu 18 where the PHP session files aren’t removed by the system installed.

    You might see issues in your /usr/local/lsws/log/error.log like this

    HTML

    The cause is related to the build of of PHP session files in the /tmp folder, which usually is cleaned out by a cronjob in /etc/cron.d/php that calls /usr/lib/php/sessionclean which of course fails to running correctly due to lsphp nor working as intended.

    The solution? Create a cronjob to delete the sess_ files. Here’s an example I found online

    HTML

    Add this code to a file an placed it in /etc/cron.daily, make sure to chmod u+x so its executable.

    That’s it!

    Litespeed Web Server Statistics in Netdata Including Fixes

    Showing MySQL Metrics in Netdata

    It’s pretty simple to get this done, as there’s a plugin built in. As per this guide on the Netdata website.

    https://app.netdata.cloud/spaces/lmtca-space/rooms/general/nodes/34d04048-ab58-11ea-81cb-5600029faf80#chartName=menu_ebpf&after=-900&before=0

    You simple need to run the following commands to create the necessary configuration.

    Plain Text

    You then update a single line at the bottom of the file. Set path to /tmp/lshttpd/

    Plain Text

    After restarting Netdata you might find that there is no change to your dashboard. Let’s check the logs….

    Plain Text

    Since the file .rtreport is actually symlinked to /dev/shm/lsws/status/.rtreport which is owned by nobdy/nogroup. We simply need to add netdata to the nogroup group.

    Shell

    You should then be able to see the Litespeed section in Netdata Cloud

    Litespeed Netdata Cloud Graphs