Archive for the ‘Distributions’ Category

How to convert RPM software packages to Debian (.deb)

Thursday, March 4, 2010 posted by Till

Maybe you had this problem already: you use Debian or Ubuntu Linux and a software package that you like to install is only available in RPM format. The solution is a handy tool called alien, which converts .rpm files to .deb.  Installing alien:


apt-get install alien


Converting a rpm package to debian format:


alien --to-deb /tmp/mysoftwarefile.rpm


Conversions from .deb to rpm are also possible:


alien --to-rpm /tmp/mysoftwarefile.deb

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to Update ISPConfig 3

Friday, February 19, 2010 posted by Till

The ISPConfig update script is a easy way to update a ISPConfig 3 installation. If you want to backup the installation before, take a look at the instructions at the end of the article.

To update ISPConfig 3, login as root user on the shell of your server and run the command:

ispconfig_update.sh


>> Update

Please choose the update method. For production systems select 'stable'. The update from svn is only for development systems and may break your current setup.


Select update method (stable,svn) [stable]:


You should always select “stable” on a production system. The “svn” version is only suitable for ISPConfig 3 development.

The updater will then check the version of your system, download the latest update and starts the update process. In the next step, enter the mysql root password:

This application will update ISPConfig 3 on your server. MySQL root password []:


Then you were asked if the services shall be reconfigured:

Reconfigure Services? (yes,no) [yes]:


You should choose “yes” here, only if you modified your system configuration manually, it might be better to choose no. But in this case, new features in ISPConfig might not work or functions might stop working until you adjusted the config files manually. So its always a good choice to select ‘yes’ here. In the next step, select the ispconfig port:

ISPConfig Port [8080]:


Port 8080 is the default, if you have not changed it, press enter. Otherwise enter the port number and then press enter. As the last step, you wre asked if the crontab shall get reconfigured, you can select yes here by just pressing return.

Reconfigure Crontab? (yes,no) [yes]:


The ISPConfig updater will then update the ispconfig files and restart services, if the configuration has been changed.

Backup before updates

Before you update a software, it is always a good idea to backup all relevant data. This enables you to restore the software version that you had before in case of an error. The steps to create a backup of the ispconfig software and settings are:

Create a backup folder:

mkdir /home/backup chmod 700 /home/backup cd /home/backup


Backup the database

mysqldump -u root -p dbispconfig > dbispconfig.sql


Backup the ISPConfig software

tar pcfz ispconfig_software.tar.gz /usr/local/ispconfig


Backup the configuration files in /etc

tar pcfz etc.tar.gz /etc


This backup does not include the emails and website data.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Keep the spamassassin filter rules up to date in ISPConfig 3

Friday, February 5, 2010 posted by Till

To update the spamassassin rules regularily on your ISPConfig 3 server, add the following line to the root crontab by running:

crontab -e


then insert the following line:

23 4 */2 * * /usr/bin/sa-update --no-gpg &> /dev/null


and save the file. The path to the sa-update script is /usr/bin/sa-update on Ubuntu and Debian Linux, if you use a different linux distrubution, run the command:

which sa-update


to find the location of the sa-update script and adjust the path in the crontab line above so that it matches the path on your system.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Sometimes you need to know which debian package contains a specific file e.g. because you deleted a system file accidently or you try to install a new software that requires this file. The apt package management utility which is used in Debian and Ubuntu comes with a handy tool called apt-file which allows a saerch for filenames in the package database.

Install apt-file

apt-get install apt-file


Update the apt-file database

apt-file update


Search for a specific file name, e.g. “lcrypto”

apt-file search /bin/bash


apt-file search /bin/bash bash: /bin/bash bash: /usr/bin/bashbug bash-minimal: /bin/bash-minimal bash-static: /bin/bash-static bashdb: /usr/bin/bashdb mybashburn: /usr/bin/bashburn

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Make the gnome desktop in Ubuntu 9.10 to look like Windows XP

Thursday, January 7, 2010 posted by Till

The following steps describe the Installation of the XPGnome theme for Ubuntu Linux. Run the following commands in the Ubuntu Shell window to make Ubuntu look like Windows XP:

cd /tmp wget http://ubuntu.online02.com/files/XP_Gnome.tar.gz cd XP_Gnome ./InstallXpGnome.sh


Screenshots:

http://ubuntu.online02.com/node/14

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Optimize MySQL performance with mysqltuner

Tuesday, December 22, 2009 posted by Till

The following tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script.

Login to your server on the shell, then execute the following commands:

Download the mysqltuner script:

cd /usr/local/bin wget http://mysqltuner.pl/mysqltuner.pl chmod +x mysqltuner.pl


Run mysqltuner

/usr/local/bin/mysqltuner.pl


Then enter root as username and the mysql root password.

You will get a output similar to this:

root@v221:/usr/local/bin# /usr/local/bin/mysqltuner.pl


>>  MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net> >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/ >>  Run with '--help' for additional options and output filtering Please enter your MySQL administrative login: root Please enter your MySQL administrative password:


-------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.0.51a-24+lenny2 [!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM


-------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 26M (Tables: 215) [!!] InnoDB is enabled but isn't being used [!!] Total fragmented tables: 33


-------- Performance Metrics ------------------------------------------------- [--] Up for: 96d 23h 3m 41s (10M q [1.239 qps], 686K conn, TX: 701M, RX: 1B) [--] Reads / Writes: 44% / 56% [--] Total buffers: 58.0M global + 2.6M per thread (100 max threads) [OK] Maximum possible memory usage: 320.5M (12% of installed RAM) [OK] Slow queries: 0% (20/10M) [OK] Highest usage of available connections: 33% (33/100) [OK] Key buffer size / total MyISAM indexes: 16.0M/8.5M [OK] Key buffer hit rate: 99.9% (57M cached / 30K reads) [OK] Query cache efficiency: 78.6% (5M cached / 6M selects) [!!] Query cache prunes per day: 483 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 408K sorts) [!!] Temporary tables created on disk: 36% (269K on disk / 745K total) [OK] Thread cache hit rate: 99% (427 created / 686K connections) [!!] Table cache hit rate: 2% (64 open / 3K opened) [OK] Open file limit used: 11% (120/1K) [OK] Table locks acquired immediately: 99% (3M immediate / 3M locks)


-------- Recommendations ----------------------------------------------------- General recommendations: Add skip-innodb to MySQL configuration to disable InnoDB Run OPTIMIZE TABLE to defragment tables for better performance Enable the slow query log to troubleshoot bad queries When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Increase table_cache gradually to avoid file descriptor limits Variables to adjust: query_cache_size (> 16M) tmp_table_size (> 32M) max_heap_table_size (> 16M) table_cache (> 64)


The script recommends to adjust or add the following variables in the mysql my.cnf file. The location of my.cnf is normally /etc/my.cnf or /etc/mysql/my.cnf depending on the Linux distribution that is installed on your server.

Open the my.cnf file:

vi /etc/mysql/my.cnf


and increase or set the variables in the [mysqld] section of the file. Mine looks now like this:

[mysqld] # # * Basic Settings # user            = mysql pid-file        = /var/run/mysqld/mysqld.pid socket          = /var/run/mysqld/mysqld.sock port            = 3306 basedir         = /usr datadir         = /var/lib/mysql tmpdir          = /tmp language        = /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address            = 127.0.0.1 # # * Fine Tuning # key_buffer              = 16M max_allowed_packet      = 16M thread_stack            = 128K thread_cache_size       = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover          = BACKUP #max_connections        = 100 table_cache            = 128 #thread_concurrency     = 10 # # * Query Cache Configuration # query_cache_limit       = 1M


query_cache_size        = 32M tmp_table_sizee        = 64M max_heap_table_sizee        = 32M


Then save the file and restart mysql. After a few hours, rerun mysqltuner and check again if the values are fine now or if the have to be increased to a higher value.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to renew the SSL certificate for dovecot on Ubuntu Linux

Monday, December 21, 2009 posted by Till

To create new SSL certificates for the dovecot pop3 and imap server on Ubuntu, follow these steps:

Make a backup copy of the old key and certificate file

sudo cp /etc/ssl/private/dovecot.key /etc/ssl/private/dovecot.key.old sudo cp /etc/ssl/certs/dovecot.pem /etc/ssl/certs/dovecot.pem.old Create the new key file <p class="command">openssl genrsa -out /etc/ssl/private/dovecot.key 1024

Create the new certificate file, valid for 2 years

Then restart dovecot

/etc/init.d/dovecot restart

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Sometimes you need to know to which debian or ubuntu package a specific file belongs, e.g. because you deleted a system file and want to reinstall it. There is a handy utility called apt-file which searches for a filename in all debian packages.

Installation

apt-get install apt-file

Usage example

search for the file /etc/sysctl.conf

apt-file search /etc/sysctl.conf

result:

apt-file search /etc/sysctl.conf
procps: /etc/sysctl.conf
mypc:~#

Now we see that the file is part of the debian / ubuntu package with the name “procps”.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How does Ubuntu’s screenshot tool Take Screenshot actually work?

Friday, November 27, 2009 posted by andreea

The easiest way to make screenshots is to use Take Screenshot. You find it under Applications/Accessoires.
First change the delaytime for the screenshot from 0 to 1 or 2 seconds. This is the time you have to mark the chosen area. You should be fine with 1 second!

Then choose your screenshot option, e.g. Grab the current window. Klick on Take Screenshot and activate the window you need.

takescreenshot

Take Screenshot closes. If all works well, a pop-up comes up to ask where to save the screenshot, which comes a s a .png.

takescreenshot2

For another screenshot you have to open the application again, so put it best in your panel.

The uncommon thing is that you have to run first Take screenshot and then choose an object, and not the other way round. That’s it!

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

KRITA is a free image editing tool that ist pretty versatile and helps you not only to edit images, but also to use it for more artistic work on e.g. tablet PCs. It will surely remind you of Photoshop.
The easiest way to install KRITA is to download it over the Ubuntu Software Center. Do not take the complicated way to install it manually…

First go to Applications/Ubuntu Software Center:

UbuntuSoftwareCenter1

Type in the searchfield KRITA and press Enter to mark KRITA for installation.
As KRITA appears, double click it, and then just klick on the Install button, start the installation and wait some seconds.

UbuntuSoftwareCenter2

Now KRITA should appear checked as it has beeninstalled. That’s it!

UbuntuSoftwareCenter3

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon