thorko.deLinux / Unix systems administrator

Latest SysadminDB entries

If you want to use a NFS server behind a firewall you need to open some ports

in /etc/default/nfs-kernel-server

PCMOUNTDOPTS="--manage-gids -p 32767"

in /etc/default/nfs-common

STATDOPTS="--port 32765 --outgoing-port 32766"

in /etc/default/quota


if you are using ufw put that in before.rules

-A INPUT -p udp --dport 2049 -j ACCEPT
-A INPUT -p tcp --dport 2049 -j ACCEPT
-A OUTPUT -p tcp --sport 2049 -j ACCEPT
-A OUTPUT -p udp --sport 2049 -j ACCEPT
-A INPUT -p udp --dport 111 -j ACCEPT
-A INPUT -p tcp --dport 111 -j ACCEPT
-A OUTPUT -p tcp --sport 111 -j ACCEPT
-A OUTPUT -p udp --sport 111 -j ACCEPT
-A INPUT -p tcp --dport 32764:32769 -j ACCEPT
-A INPUT -p udp --dport 32764:32769 -j ACCEPT

Enable touch events in chromium / chrome

To enable touch events in chromium / chrome browsers open the chrome://flags page and search for "touch" and "pinch" and switch the dropdown menu to enable. Close your browser and start it again and you will see you can touch and zoom on your screen (of course only if you have a touchscreen).

High CPU usage with chromium and spotify

When using fglrx driver on an acer e5-551g laptop chromium and spotify using the options --type=gpu-process which then ends up in high cpu usage.

To disable this option for chromium and spotify:

Create a file in /etc/chromium.d/disablegpu

export CHROMIUM_FLAGS="--disable-gpu"

In spotify go to preferences->User interface and disable "Enable hardware acceleration"

SaltStack - Using grains in top.sls

Targeting a minion by grains

  'G@role:zabbix and G@type:proxy':
    - match: compound
    - zabbix

More compound matches can be checked here

Using grains in state files (sls)

{% if grains['type'] == 'proxy' %}
- source: salt://files/server.conf
- user: {{ grains['zabbix_splunk_search_user'] }}
- group: zabbix
- template: jinja
{% elif grains['type'] == 'server' %}
- source: salt://files/server.conf
- user: zabbix
- group: zabbix
- template: jinja
{% endif %}

Debian - build a deb package

Install some packages required to build the package

apt-get install dh-make autotools-dev fakeroot devscripts

Download the source and extract it

tar -xzvf httpd-2.4.1.tar.gz && cd httpd-2.4.1
dh_make -n -s -e

edit debian/control file

fakeroot debian/rules clean
dch -i local 'Your Version'
cp ../httpd-2.4.1.tar.gz ./
sudo debuild -us -uc

(c) 2014 by