Converting OVA for use with KVM / QCOW2

The OVA file is nothing more than a TAR archive, containing the .OVF and .VMDK files. Easy!

Using Evergreen ILS for example:

~ $ file Evergreen_trunk_Squeeze.ova

Evergreen_trunk_Squeeze.ova: POSIX tar archive (GNU). I’ts possible to use the tar command to list the contents

~ $ tar -tf Evergreen_trunk_Squeeze.ova 
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk

Simply extract those things…

~ $ tar -xvf Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk

Read more

Share

Installing Smokeping on Ubuntu 14.04 LTS

Installing Smokeping on Ubuntu used to be a total breeze. Since 14.04 however, it’s been a bit of a mission.

This guide assumes a fresh out of the box Ubuntu install. I’m using the 64bit Server variety, but this should work on any 14.04 system.

UPDATE – It also works perfectly on Ubuntu 16.04 LTS Server :~)

Step 1: install smokeping (and you’re done).

sudo apt-get install smokeping -y

Step 2:  normally, you’d be done by now.. But things have changed.

sudo nano /etc/smokeping/config.d/pathnames

You’re going to want to go into the pathnames file and comment out the line about mail. Setting up mail to work with smokeping is outside the scope of this post. Because I’m lazy.

Do this:

#sendmail = /usr/sbin/sendmail

Then hit CTRL-O, Enter, CTRL-X. That’s how you save a file in Nano, I won’t stick that bit in again.

Read more

Share

Install Rocket Chat on Centos 7with Jitsi Video Conferencing

Add the epel repository and update everything.

yum -y install epel-release nano && yum -y update

Populate the yum repo with the mongodb-org repository

nano /etc/yum.repos.d/mongodb-org.repo

Paste this into the new file:

[mongodb-org]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

To write and save do:

CTRL-O, CTRL-X

Now we need to install our dependencies from yum:

yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++

Now that we have Node.js and npm installed, we need to install a few more dependencies:

npm install -g inherits n

The recommended Node.js version for using Rocket.Chat is 8.9.3. Using n we are going to install that version:

n 8.9.3

Installing Rocket.Chat

Now we download and install Rocket.Chat

cd /opt
curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tar.gz
tar zxvf rocket.chat.tar.gz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..

You can set PORT, ROOT_URL and MONGO_URL:

Read more

Share

Reset CentOS Root Lost or Forgotten Password

In the event your Linux box experiences disk or file system issues you may receive a “Give root password for maintenance” prompt upon reboot. If you have your root password you can login but in the event your using ‘slide’ or ‘sudo’ for wheel access or you’ve just mis-placed your root password – you’ll need to reset it.

To reset your root password:

  1. When the GRUB loader shows during boot press the spare bar to pause boot.
  2. Select your boot kernel.
  3. Type ‘e’ to edit the default kernel line.
  4. Type ‘e’ again on the line that starts with ‘kernel’.
  5. Add ‘init=/bin/bash’ to the end of the ‘kernel’ line then press enter.
  6. Type ‘b’ to boot the modified kernel parameters.
  7. Once you’re at the /bin/bash prompt you will need to remount the root file system as read/write in order to edit the passwd file:
    # mount -o remount,rw /
  8. Change your root password:
    # passwd root
  9. Remount the filesystem back to read only:
    # mount -o remount,ro /
  10. Reboot your server using CTR-ALT-DELETE.
  11. You will now be able to login with your new root password and carry out the maintenance.
Share

Install Cacti 1.1 on CentOS 7

Cacti is a free and open source network monitoring and graphing tool written in PHP. With the help of RRDtool (Round-Robin database tool), Cacti can be used to provide various useful features, including remote and local data collectors, graph templating, network discovery, device management automation, etc.

Prerequisites
A fresh CentOS 7 x64 server instance. Say its IP address is 1.2.3.4.
A sudo user.
The server instance has been updated to the latest stable status using the EPEL YUM repo.

Step 1: Setup an up to date LAMP stack
Before you can properly install and run Cacti, you need to setup a LAMP stack or an equivalent web operating environment.

The following will set up an up to date LAMP stack for Cacti, which consists of CentOS 7, Apache 2.4, MariaDB 10.2, and PHP 7.1

# Install Apache 2.4
sudo yum install httpd -y
sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
sudo systemctl start httpd.service
sudo systemctl enable httpd.service

Read more

Share

Fix: Unable to start TLS: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed when connecting to ldap master.Cannot determine services – exiting

My ZImbra 8.6 was throwing the following error once after my letsencrypt SSL got expired:

Unable to start TLS: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed when connecting to ldap master.Cannot determine services - exiting

The Fix:

In order to fix the problem you need to modify the following parameters as Zimbra user:

zmlocalconfig -e ldap_starttls_required=false
zmlocalconfig -e ldap_starttls_supported=0

Then restart zimbra by using

zmcontrol restart

Hope it’ll restarted

Share

Zimbra Letsencrypt SSL Renew – Zimbra 8.6

Let’s Begin:
This works if you already have an expired letsencrypt ssl certificate and assuming you have already deployed SSL in you zimbra system. However, if you come up here already, and would like to know how to setup letsencrypt on your system you may read my other article here:

https://tweenpath.net/installing-encrypt-zimbra-server/ 

Log on Zimbra user then stop proxy and mail box service for renew proccess.

su zimbra
zmproxyctl stop
zmmailboxdctl stop

Then return root user and renew Letsencrypt certificate

exit

letsencrypt renew: Change directory to Zimbra Letsecnrpyt SSL folder

Read more

Share

Zimbra – deleting all email in queue by sender

As root user execute:

/opt/zimbra/postfix/sbin/postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } / sender@mail\.com/ { print $1 }' | tr -d '*' | /opt/zimbra/postfix/sbin/postsuper -d -

To Delete ALL Messages From Queue

/opt/zimbra/postfix/sbin/postsuper -d ALL

or

/opt/zimbra/common/sbin/postsupe -d ALL

Another way to do this:

mailq | awk '{print $1}' | postsuper -d -

To Delete ALL Messages From The Deferred Queue

/opt/zimbra/postfix/sbin/postsuper -d ALL deferred

To Delete ALL Messages From The Hold Queue

/opt/zimbra/postfix/sbin/postsuper -d ALL hold

There’s a nice Zimbra wiki page with detailed on cleaning up mail queues.

https://wiki.zimbra.com/wiki/Managing-The-Postfix-Queues

Share

Syslog server with Rsyslog and LogAnalyzer in Ubuntu 12

Installing Rsyslog from repository

First make sure you have the latest update of Ubuntu 12.04 LTS

sudo apt-get update && sudo apt-get upgrade

Adding PPA repository

sudo add-apt-repository ppa:adiscon/v8-devel

If you get this error: “add-apt-repository: command not found”

Try installing this python-software-properties package

apt-get install python-software-properties

Update your apt cache and install rsyslog

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install rsyslog

Read more

Share

Varnish daemon not listening on configured port – Hack for Debian or Ubuntu

If you’re already troubled with varnish on changing listening ports from default. Here’s a little hack that worked on my Debian and Ubuntu distribution.

sudo apt remove varnish

sudo apt-get purge varnish

# I manually remove the 3 files in created in /etc/systemd/system/*

sudo apt install varnish
sudo nano /lib/systemd/system/varnish.service # put the rigth conf
sudo nano /etc/varnish/default.vcl #put the rigth conf
sudo systemctl daemon-reload
sudo service varnish restart

Share