Canada  united states of america usa  linkedinfacebook   Call Us Today: 866.646.6461

Knowledge Base

linux iconThis is an issue that we, as an IT services company, run into quite frequently. If you are unlucky enough to have a software raid running on your Linux server, you've probably noticed the occasional slowing down of the system. This is because of periodic redundancy checks of MD devices.

It is a cronjob that runs weekly and scans the MD devices for consistency. This can have a serious effect on the system, especially if you are running IO intensive applications, such as virtual machines. (Microsoft Exchange or SQL, for example). 

One way to solve this problem is to lower the dev.raid.speed_limit_max. By default, it is set to this:

One of our IT Support clients asked us why some emails are coming in with extra HTML content. After some searching, we've discovered that is was due to the MailScanner antispam system: it was parsing emails improperly and adding extra junk characters. We have decided to solve this by skipping the email from that domain from being scanned altogether.

One way to do so is to change the Scan Messages directive in MailScanner.conf from:

Scan Messages = yes

to

Scan Messages = %rules-dir%/scan.messages.rules

Then, in your rules directory, create a file called scan.messages.rules. In that file, be sure to add the line for scanning all by default:

vnc iconYou have a server, but want to setup VNC to access the GUI? We use this tutorial for our systems and wanted to share. (ALT is an IT consulting company, offering technical support for Mac, PC and Linux systems). We try to keep things updated, but tutorials have a tendency of exiring, so some steps may be different for newer versions. We've used Ubuntu 16.04 to install, but it should work with others as well.

Install the components

apt-get -y install ubuntu-desktop tightvncserver xfce4 xfce4-goodies autocutsel

Add the vnc user and give it a password:

adduser vnc
passwd vnc

You can add vnc as sudo, so you could run apps as root. Edit the sudoers file:

echo "vnc ALL=(ALL)       ALL" >> /etc/sudoers

linux-icon-19 We have added this tutorial, because we use it very often ourselves. (ALT is an IT consulting company, providing support for Apple, Windows and Linux based systems and servers.) It describes steps for adding extra disks to an already existing system, not converting current ones to RAID (the disks will be wiped, so don't do it on the OS partition!) We are adding a RAID1 software RAID to most common Linux distributions (the setps should work on any one of them).

We have used 2 disks for this:
/dev/sdb: 500.1
/dev/sdc 500.1

pdf-logoWe often get asked, if there's a simple way to join PDFs from many images under linux. The task is very trivial, if you have 1-2 images, as you can use many of the graphical applications. If you have 10-20 or more, we recommend pdfjoin. It runs under Linux on a command line and allows for a quick images to PDF combine.

bash

We regularly post scripts and script snippets that we have found useful in our day-to-day IT support tasks. Here's a quick way to help determine if the week is odd or even using a bash script. You can replace the echo "even" and "odd" with whatever functions you are looking to perform, such as weekly backups for example. Although not tested, this script should also work on any version of Apple's Mac.

Copy and paste this into a file:

If for some reason your grub has gotten corrupted, here are the steps to restore it.

Boot into a rescue CD (either Ubuntu or System Rescue CD, which you can download freely).

Mount the drive, where sdXY is the partition (eg: /dev/sda1)

apache server

Q. I am getting a Forbidden 403 error after I've changed the DocumentRoot in Apache for my domain. What do I do?

A. This is a security feature on the Apache running on Ubuntu (and Debian). The solution is quite simple:

centosThe widely used ifconfig is missing from Centos 7.X version of Linux with minimal install. To get it back, run the following command:

yum install net-tools

The command will then be available as usual.

If you don't want to use ifconfig and are wondering how else you can find the IP address, you can run this command:

ip link

Due to some corruption issue during ubuntu (and ubuntu based sytems), this error may come up:

apt: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

There's no clear answer on how to fix this or why it happens, but it corrupts the file libapt-private.so.0.0.0. One way to resolve the issue is to copy the file from another ubuntu 16.04 install. (Or you can download it from here: libapt-private.so.0.0.0 version x64)

Linux IT SupportSometimes it is a good idea to schedule a regular reboots, to clear the memory and remove any crashed processes.

This can be easily achieved by adding the task to a cron tab (Linux scheduling system):

First, open the crontab (as a root):

crontab -e

and add a line similar to this:

For some reason Zentyal 5 (and 4 before it) does not enable the vacation out-of-office message in Sogo (even thought the function is available in the software).

To enable it, follow these steps (you will need access to the command line console):

ubuntu10If a linux reboot fails by just running the reboot command (sometimes there are run away or hanging processes), you may get the following errors (if you view the logs of systemctl, it will give you a better indication of what is crashing and not letting it reboot):

Failed to start reboot.target: Connection timed out
See system logs and 'systemctl status reboot.target' for details.

A quick way to fix this (short of pulling the plug), is to force reboot using systemctl:

ubuntu10We'll use Ubuntu for this example, but essentially you need an ntfs-3g package, which contains ntfsfix. Under Ubuntu, run the following to install it:

sudo apt-get install ntfs-3g

Then this (where /dev/sdd1 would be your ntfs disk):

ntfsfix /dev/sdd1

Depending on what you are trying to fix, you may want to use options -b and -d.

Last updated Jun 4, 2024