debian – Derek Demuro https://www.derekdemuro.com Software Engineer Tue, 03 Jun 2025 17:06:20 +0000 en-US hourly 1 160473225 Compiling Qemu-KVM https://www.derekdemuro.com/2016/07/07/compiling-qemu-kvm/ https://www.derekdemuro.com/2016/07/07/compiling-qemu-kvm/#respond Thu, 07 Jul 2016 06:28:09 +0000 https://www.derekdemuro.com/?p=3221 Lets compile KVM – QEMU from scratch on Debian Jessie

This… will take a long ass time!.

mkdir -p /usr/local/libexec
mkdir -p /usr/local/lib/qemu
mkdir -p /usr/local/var
mkdir -p /usr/local/share/doc
 
cd /usr/local/src/
git clone git://git.qemu-project.org/qemu.git
 
sudo aptitude install libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libaio-dev \
    libbluetooth-dev libbrlapi-dev libbz2-dev  libcap-dev libcap-ng-dev libcurl4-gnutls-dev \
    libgtk-3-dev libibverbs-dev libjpeg8-dev libncurses5-dev libnuma-dev librbd-dev \
    librdmacm-dev libsasl2-dev libsdl1.2-dev libseccomp-dev libsnappy-dev libssh2-1-dev \
    libvde-dev libvdeplug-dev libvte-2.90-dev libxen-dev liblzo2-dev valgrind xfslibs-dev \
    gnutls-dev libiscsi-dev libgoogle-perftools-dev libspice-protocol-dev libspice-server-dev \
    libusb-dev libusb-1.0-0-dev libusbredirparser-dev libusbredirparser1 libnfs-dev
 
./configure --target-list=i386-linux-user,i386-softmmu,x86_64-linux-user,x86_64-softmmu --enable-system \
    --enable-sdl --enable-gtk --enable-vte --enable-kvm --enable-bzip2 --enable-libssh2 --enable-linux-user \
    --enable-docs --enable-gnutls --enable-nettle --enable-curses --enable-modules --enable-virtfs \
    --enable-curl --enable-fdt --enable-rdma --enable-uuid --enable-vde --enable-linux-aio --enable-cap-ng \
    --enable-attr --enable-vhost-net --enable-spice --enable-rbd --enable-libiscsi --enable-libnfs --enable-libusb \
    --enable-usb-redir --enable-lzo --enable-snappy --enable-seccomp --enable-coroutine-pool --enable-glusterfs \
    --enable-tpm --enable-vhdx --enable-numa --enable-tcmalloc
 
make -j4 <- (Core count)
 
checkinstall -D
 
(This will create the .deb package), make sure to fill in version, package name, etc.
dpkg -i (just created package)
qemu-system-x86_64 –version <== Check it's your version.

Find attached my .deb if you’re too lazy for that.

Meet this requirements first, before using my .deb !!

apt-get install libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libgl1-mesa-glx libdrm2 libelf1 libglapi-mesa \
    libllvm3.5 libpciaccess0 libtxc-dxtn-s2tc0 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 \
    libxcb-present0 libxcb-sync1 libxshmfence1 libxxf86vm1 libgl1-mesa-dri libglib2.0 libfdt \
    libpixman-1 zlib1g libaio libbluetooth libbrlapi libbz2 libcap libcap-ng libcurl4-gnutls \
    libgtk-3 libibverbs libjpeg8 libncurses5 libnuma librbd librdmacm libsasl2 libsdl1.2 libseccomp \
    libsnappy libssh2-1 libvde libvdeplug libvte-2.90 libxen liblzo2 xfslibs gnutls libiscsi \
    libgoogle-perftools libgoogle-perftools4 libspice-protocol libspice-server libusb libusb-1.0-0 \
    libusbredirparser1 libnfs4 libnfs8

If you’re missing packages… then… here you also have my apt sources.list

#------------------------------------------------------------------------------#
#                   OFFICIAL DEBIAN REPOS                    
#------------------------------------------------------------------------------#
 
###### Debian Main Repos
deb https://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src https://ftp.us.debian.org/debian/ jessie main contrib non-free
 
###### Debian Update Repos
deb https://security.debian.org/ jessie/updates main contrib non-free
deb https://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
deb-src https://security.debian.org/ jessie/updates main contrib non-free
deb-src https://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
 
#------------------------------------------------------------------------------#
#                      UNOFFICIAL  REPOS                       #
#------------------------------------------------------------------------------#
 
###### 3rd Party Binary Repos
 
#### Debian Mozilla team - https://mozilla.debian.net/
## Run this command: apt-get install pkg-mozilla-archive-keyring
deb https://mozilla.debian.net/ jessie-backports firefox-release
 
#### Debian Multimedia - https://deb-multimedia.org/
## Run this command: apt-get update && apt-get install deb-multimedia-keyring && apt-get update
deb https://www.deb-multimedia.org stable main non-free
 
#### Dotdeb - https://www.dotdeb.org
## Run this command: wget -q -O - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
deb https://packages.dotdeb.org oldstable all
 
 
####### 3rd Party Source Repos
 
#### Dotdeb (Source) - https://www.dotdeb.org
## Run this command: wget -q -O - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
deb-src https://packages.dotdeb.org oldstable all
 
deb https://cloudmin.virtualmin.com/kvm/debian binary/

Install missing keyrings!

apt-get install pkg-mozilla-archive-keyring
apt-get update && apt-get install deb-multimedia-keyring && apt-get update
wget -q -O - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
]]>
https://www.derekdemuro.com/2016/07/07/compiling-qemu-kvm/feed/ 0 3221
Munin configure and setup in Debian 7 https://www.derekdemuro.com/2014/02/01/munin-configure-and-setup-in-debian-7/ https://www.derekdemuro.com/2014/02/01/munin-configure-and-setup-in-debian-7/#respond Sat, 01 Feb 2014 06:58:35 +0000 https://www.derekdemuro.com/?p=3351 Configuring Munin on a Debian 7 system for monitoring of server.

Following this, we’ll install all we need to make munin service run and be optimized to what we need to monitor.

Lets install munin:

apt-get install munin munin-node munin-plugins-extra

Let’s enable some default plugins:

cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/mysql_ mysql_
ln -s /usr/share/munin/plugins/mysql_bytes mysql_bytes
ln -s /usr/share/munin/plugins/mysql_innodb mysql_innodb
ln -s /usr/share/munin/plugins/mysql_isam_space_ mysql_isam_space_
ln -s /usr/share/munin/plugins/mysql_queries mysql_queries
ln -s /usr/share/munin/plugins/mysql_slowqueries mysql_slowqueries
ln -s /usr/share/munin/plugins/mysql_threads mysql_threads

Now let’s start editing the server configuration:

vi /etc/munin/munin.conf

More or less you should see something like this.

# Example configuration file for Munin, generated by 'make build'
 
# The next three variables specifies where the location of the RRD
# databases, the HTML output, logs and the lock/pid files.  They all
# must be writable by the user running munin-cron.  They are all
# defaulted to the values you see here.
#
dbdir   /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir  /var/run/munin
 
# Where to look for the HTML templates
#
tmpldir /etc/munin/templates
 
# Where to look for the static www files
#
#staticdir /etc/munin/static
 
# temporary cgi files are here. note that it has to be writable by
# the cgi user (usually nobody or httpd).
#
# cgitmpdir /var/lib/munin/cgi-tmp
 
# (Exactly one) directory to include all files from.
includedir /etc/munin/munin-conf.d
[...]
# a simple host tree
[server1.example.com]
    address 127.0.0.1
    use_node_name yes
[...]

Now to finish the default’s lets restart munin and apache:

service apache2 restart
service munin-node restart

Some advanced stuff:

We need to check that we’re not missing any libraries for Munin to work correctly for this; let’s run:

munin-node-configure --suggest

Here a long list will appear saying what you’re missing, it’s common to see with MYSQL you’re missing cache pearl libs… so

apt-get install libcache-cache-perl

To work with plugins, you’ll be creating and removing system links, so…

cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/apache_accesses

That would be an example on how to work with plugins.

I NEED BIND9!

Okay, don’t get crazy, lets work with bind9 and munin.

In: /etc/bind/named.conf.options we need to enable stat’s file, add the following line.

statistics-file "/var/cache/bind/named.stats";
logging {
        channel b_query {
                file "/var/log/bind9/query.log" versions 2 size 1m;
                print-time yes;
                severity info;
        };
        category queries { b_query; };
};

/var/log/bind9 > add that path, and chown to bind, and allow it to write the log there.

Next, lets tell munin to process that:

vi /etc/munin/plugin-conf.d/munin-node

[bind9]
user root
env.logfile   /var/log/bind9/query.log
 
[bind9_rndc]
user root
env.querystats /var/cache/bind/named.stats

Once that is done, lets make the symlinks.

ln -s /usr/share/munin/plugins/bind9 /etc/munin/plugins/bind9
ln -s /usr/share/munin/plugins/bind9_rndc /etc/munin/plugins/bind9_rndc

As usual restart munin-node!

DONE!.

REMEMBER TO RM [SYMLINKS] to plugins you don’t need, or Munin can turn into a huge memory hog… in my experience bind9 plugin… take’s a long time to process, leading to a sluggish system.

]]>
https://www.derekdemuro.com/2014/02/01/munin-configure-and-setup-in-debian-7/feed/ 0 3351