tag: debian

vnstat: Network Stats

19 Aug, 2012 - 1 minutes
To gather network statistics for your interfaces, have a look at vnstat vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources. This is how to install on Debian:

Install Mongo DB on Debian with PHP support

Steps to Install MongoDB - This should work with Debian and Ubuntu, with the upstart init system. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 && sudo sh -c 'echo ''deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'' > /etc/apt/sources.list.d/10gen.list' && sudo apt-get update && sudo apt-get install mongodb-10gen; If all goes well you should have a fully working MongoDB. To make sure things are working have a look at /etc/var/log/mongodb/mongodb.log Try it out with:

Debian Bash Auto Completion

20 Jun, 2012 - 1 minutes
Install the bash auto completion package. sudo apt-get install bash-completion Uncomment the following in /etc/bash.bashrc to enable to auto completion. You will need to open a new terminal after doing this. sudo vi /etc/bash.bashrc # enable bash completion in interactive shells if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi You should now be able to hit tab and have commands automatically completed. Try it with apt-get in<tab>

Quick and diry way to set-up shared web hosting.

29 Jan, 2012 - 1 minutes
I have a web server running lighttpd and I have a few sites I want to run from it. This is what I did to enable “shared” web hosting with separate user login. Fist create a new user for the domain. useradd newDomain Add this user to the www-data group usermod -a -G www-data newDomain Create the virtual domain in lightys config. $HTTP["host"] =~ "(^|\.)newDomain\.co.uk$" { server.document-root = "/var/www/newDomain/" server.

Find out your Ubuntu/Debian Release

24 Jul, 2011 - 1 minutes
lsb_release -c or cat /etc/debian_version I can never remember, and now you don’t have to.

Some info on apt

apt-get install food apt is a very cool and easy to use package manager for UNIX based systems. Here are some simple and effective commands that might help you do things XD apt-get update - makes sure that all the information is newest. apt-get upgrade - checks for all packages that needs to be updated. apt-get remove <package> - Removes the package from the system. apt-get purge <package> - Same as remove but deletes all the configuration files.