Install ZNC


Official source tarballs can be found here.

If you want to compile ZNC with OpenSSL support, you need the OpenSSL development package. On Debian/Ubuntu this is called libssl-dev, on CentOS/Fedora/Red Hat it’s openssl-devel.

  1. Download the latest source tarball
  2. tar -xzvf znc*.*gz
  3. cd znc*
  4. ./configure --prefix=$HOME/znc
  5. ./configure
    (use --prefix="$HOME/.local" if you don’t want a system wide installation or simply don’t have root access; use --with-openssl=/path/to/openssl if you have a non-standard SSL path)
    (use --help to see other configure options) or
  6. make
    (if you are on a dedicated server and your CPU has more than one core, you can use make -jX where X is the number of CPU cores to speed up compilation)
  7. make install

Please note that compiling can take 5-10mins or more.

Once you have installed znc, you can use znc --makeconf to make a configuration file for ZNC. This config is stored in ~/.znc under the user you run it as. You should create a dedicated non root user to run znc under.

ZNC is run by just executing znc under the dedicated znc user, at which stage it goes to background. It does not make an init.d service for itself nor does it need to be run in screen or something similar.

How to make sure it stays up and restarts after a reboot/crash

Simply add a crontab/cronjob that will try to start it every 10 minutes, if it is not currently started:

crontab -e

Add the line:

*/10 * * * *   /home/znc/znc/bin/znc >/dev/null 2>&1

Or if you installed it to /usr/local add the line:

*/10 * * * *   /usr/local/bin/znc >/dev/null 2>&1
Facebook Comments
It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

About alderson

AKA Pseudo

Comments are closed.
Asia/Jerusalem : 09:52:29America/New_York : 02:52:29Asia/Tokyo : 16:52:29Asia/Kuala_Lumpur : 15:52:29