Posts from 2011-02
Sketch of an Advanced HDD / Partition Setup with high availability (mdadm software raid), encryption (dm-crypt) and high flexibility (lvm volume management)
Recently I found an interesting comment on an article about Fedora 16 maybe using btrfs as default file system: The author Vanger explained his current hard disk / partiton setup on a server and how he hopes to get a more efficient system with btrfs. More than the outlook...
To set the screen resolution of gdm when you don't use a proprietary graphics card driver, go to System → Preferences → Monitors, choose the desired resolution, test it (by applying it) and click on Make Default.
- German Wiki Article on Screen Resolution (with Gnome): http://wiki.ubuntuusers.de/Baustelle/Bildschirmaufl%C3%B6sung#GNOME
apt-get install libapache2-mod-fcgid php5-cgi apache2-common apache2-mpm-worker apache2-suexec a2enmod fcgid a2enmod suexec
If you want the document root to be something different to
/var/www, you need
apache2-suexec-custom instead of
Now let's create a user PHP will run as and create the directory structure for our new site.
If you want to know who is behind an IP address (or a domain name) you should use the command line tool
whois, which Mac OS X, most Linux and BSD distributions ship. For example, if you want to get information on the IP 10.8.0.1:
And the output...
The built in possibility on Ubuntu / Debian is to change the configuration file
RUN=yes CONF_DIR=/etc/lxc CONTAINERS="vm0 vm1"
In this example,
vm1 are LXC configuration files stored or linked in
/etc/lxc. These containers will be started at startup.
custom init script /etc/init.d/lxc
update-manager with the option
-d for development release:
Or if you don't want run that gui (because you are running an Ubuntu server) then you have to change your apt sources:
sudo sed -i 's/OLD_VERSION/NEW_VERSION/g' /etc/apt/sources.list sudo apt-get dist-upgrade --fix-missing # you also might want to run the...
- Use the mount option
noatimeif you are brave) for the SSD partitions in
- Replace several directories (those, the system writes to frequently) with a tmpfs file system as shown below.
- Disable Firefox caching by setting
browser.cache.disk.enableto false in about:config.
Alternatively create the entry
To clear the cache / cached memory (free pagecache, dentries and inodes) on Ubuntu or Debian you can write the value
# You should be the superuser ('root') or become the superuser: sudo su # Now sync filesystem and clear the caches: sync && echo...
Error when trying to upgrade the mysql tables using
root@fooserver:/root# mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect FATAL ERROR: Upgrade failed
The solution is to...
LXC application containers are good tools to isolate single applications. Instead of directly creating them using
lxc-create you can also create them with libvirt /
If you have dnsmasq installed and running globally you will get into trouble running
net-start default. So follow the advice on http://mytipsandtricson.blogspot.com/2010/12/kvm-failed-to-start-network-default-in.html.
Now let's create...
Little Snitch is the classic user interface for the Mac OS X firewall. But it has a drawback: it costs ~30 EUR for a single licence.
The three notable alternatives are:
- Hands Off! http://www.metakine.com/products/handsoff/ Costs 38.75 EUR
There are also some open source tools:
An interface to the new...
e107 is a nifty content management system for websites. It has lots of extensions and is ideally suited for portal websites.
Installation log for e107 on Ubuntu 10.10:
sudo mkdir -p /var/www/e107 cd /var/www/e107 sudo chown $USER ./ wget http://sourceforge.net/projects/e107/files/e107/e107%20v0.7.24/e107_0.7.24_full.tar.gz/download tar -xf download echo "CREATE DATABASE e107;" | mysql -u root -p echo "GRANT all ON...
If you work with multiple users on the same Linux computer remotely you might want to communicate with other users that are logged in. This could be the case for example if their processes slow down the computer and you want to ask them about it. A simple way to...
The blog post describes how to install the firewall distribution pfSense based on FreeBSD in a kernel based virtual machine (KVM) on Ubuntu 10.10.
Specialities: you either need two NICs or a single one with VLANs as pfSense requires you to define at least one WAN and one LAN interface.
I was not successfull creating a bootable USB stick for the netbook using Mac OS X by following the steps described on the Ubuntu download page.
What worked: I started a virtual machine with Ubuntu and connected the USB stick to it. Then I ran the Startup Disk Creator. I...
Install KVM and libvirt:
sudo apt-get install kvm virtinst libvirt-bin
If you also want the graphical helpers (viewer via vnc and a manager of the installed virtual machines) install:
sudo apt-get install virt-viewer virt-manager
Now set up the connection to the local KVM hypervisor:
sudo virsh connect qemu:///system
sudo apt-get install lvm2
To create a logical volume on a loop device (
/dev/loop1 stored in ~/.lvmcontainer):
dd if=/dev/zero of=~/.lvmcontainer bs=512 count=2048000 sudo losetup /dev/loop1 ~/.lvmcontainer sudo pvcreate /dev/loop1 # initialize /dev/loop1 as a physical volume sudo vgcreate volg1 /dev/loop1 # create the volume group volg1, consisting of /dev/loop1 sudo lvcreate -L...
The btrfs file system is the future of linux file systems.
sudo apt-get install btrfs-tools sudo mkfs.btrfs /dev/sdXY
- efficient snapshots (and subvolumes)
- automatic calculation of hashes for data and metadata (better data integrity)
- transparent compression (mount option
- solid state disk optimization (mount option
- copy on write (better data...
It's called loop device not loopback device (which is related to networking)!
To create a file with 50 MiB of 0x00 (51,200 blocks with 1024 byte each = 50 MiB) and create the block device
/dev/loop1 from it:
dd if=/dev/zero of=~/.lvmcontainer bs=1024 count=51200 sudo losetup /dev/loop1 ~/.lvmcontainer ## and to detach /dev/loop1...