nav HOME » Archive by category 'Linux'

Easy way to remove all .svn directories inside directory tree

If you want to check first what will be removed (good idea), run: find . -name .svn -type d Now run the same command with rm xargs: find . -name .svn -type d | xargs rm -rf

Posted in Linux
Tags: , ,

Zsh named directories

Zsh has a useful feature called Named directories. Usage is simple, you can define it with hash command: hash -d my_dir=/home/user/some/deep/directory/structure Now you can use it like normal directory, just add prefix ~: cd ~my_dir cp ~my_dir/file.txt /other_dir/

Posted in Linux
Tags: ,

Reducing reserved blocks percentage to free disk space

ext2, ext3 and ext4 filesystems by default reserves 5% of filesystem blocks for use by privileged processes. On modern drives with a lot of space, that can result in much lost space. Fortunately, that behavior can be easily changed with command tune2fs. For example, partition /dev/sdb5 have 384MB and default reserved blocks: nevermind1:/# df -h [...]

Posted in Linux
Tags: , , ,

apt-get fopen permission denied

Today I got some interesting errors when running “apt-get install” command on one debian lenny server. srv1:~# apt-get install host Reading package lists… Done Building dependency tree Reading state information… Done The following NEW packages will be installed: host 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 70.0kB [...]

Posted in Linux
Tags: , ,

How-To: Nagios 3 installation on Debian

Nagios is a great monitoring software. This is how I get it working on debian lenny…

Posted in Linux
Tags: , , , ,

How-To: phpmyadmin 3 on debian lenny

phpMyAdmin 3 is not available in lenny repositories, but it can be easily installed manually.

Posted in Linux
Tags: , ,

How-To: MySQL 5.1 and PHP 5.3 on debian lenny

Edit file /etc/apt/sources.list and add lines….

Posted in Linux
Tags: , , ,

How-To: Linux mail server with Postfix and Dovecot on Debian Lenny

I will show you how to set up a simple linux mail server with Postfix and Dovecot servers with PostfixAdmin and Roundcube for web administration and webmail…

Posted in Linux
Tags: , , , , ,

How-To: NGINX with PHP-FPM (FastCGI implementation) on debian lenny

PHP-FPM is PHP FastCGI implementation. It works great in combination with NGINX. This is a simple way to install it on lenny.

Posted in Linux
Tags: , , , , ,

How-To: Backup linux host over rsync and ssh with BackupPC

We have two hosts – one with BackupPC installed (I will call it “backuppc_host”), and other to backup (“backup_host”)… On backup_host Install rsync apt-get install rsync Create a user for backup: adduser rbackup On backuppc_host Become backuppc user: su – backuppc Create a ssh  key pair: ssh-keygen Copy public key to backup_host (replace 2222 with [...]

Posted in Linux, System administration
Tags: , , , ,