Tips & Tricks

Little tips & tricks that are useful in everyday’s work

Install PHP 5.6 on Debian Wheezy

To install PHP 5.6 on Wheezy, you can add this repo: echo "deb wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list echo "deb-src wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list Add the key: wget -O- |apt-key add – And install PHP: apt-get update apt-get install php5-cli php5-fpm ….. (or whatever package you might need)  

Installing grive on Debian for Google Drive Sync

Prerequesites: apt-get install cmake gcc make build-essential libjson0-dev libcurl4-openssl-dev binutils binutils-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-test libqt4-core libqt4-dev libqt4-dev-bin libqt4-gui qt4-dev-tools libgcrypt11 libgcrypt11-dev libyajl-dev yajl-tools libjson-c-dev libjson-c2 libjson0-dev git   Installation: git clone git:// cd gdrive mkdir build cd build cmake ../ make mkdir grive/bgrive/doc touch grive/bgrive/doc/grive.1 make install The file /root/grive/bgrive/doc/grive.1 was missing in my […]

Choosing the fastest Mirror on Debian

On Debian there's a tool that finds out which is the fastest/nearest mirror and creates a sources.list file for you: netselect-apt The installation: apt-get update apt-get install netselect-apt To find the fastest/nearest mirror: netselect-apt Backup your old sources.list: mv /etc/apt/sources.list{,.bak} Replace it with the new one: cp sources.list /etc/apt/sources.list Update and install your packages: apt-get […]

Parsing JSON files on the command line

You've ever wondered if there's not a nice command line tool to parse json input? There is. Mac Users can install jq using brew in a terminal: brew install jq For Debian users, have a look here: For all other OS'es (Linux, Windows, Solaris) have a look here: If your JSON code is valid, this will output […]

Adding new Admins in Virtualmin

I had to work with Virtualmin a little bit and I've been looking around how to create additional admins. It's actually quite easy: useradd newuser passwd newuser Your /etc/passwd should contain something like this now: newuser:x:1549:1549::/home/newuser:/bin/sh The trick is now just to add the new user to /etc/sudoers: newuser ALL=(ALL) ALL Having done this you […]