If you get an error ERROR 1005 (HY000) at line 14: Can’t create table example.tbl (errno: 150) it could be for at least two reasons. MySQL doesn’t allow to create foreign keys for a set of tables one of which doesn’t exist. To solve this restriction you can set SET foreign_key_checks to 0: mysql> SET…
All posts tagged linux
RPM: how to get changelog from package
Often there’s a need to get changelog of RPM package. Here is a way to do that: [root@playground ~]# rpm -qp –changelog kernel-2.6.41.9-1.fc15.x86_64.rpm | head * Fri Jan 13 2012 Josh Boyer <jwboyer@redhat.com> 2.6.41.9-1 – Linux 3.1.9 – CVE-2012-0045 kvm: syscall instruction induced guest panic (rhbz 773392) * Wed Jan 11 2012 Josh Boyer <jwboyer@redhat.com>…
phpMyAdmin: how to use it with several MySQL servers
If you have several MySQL servers it makes sense to use one phpMyAmin to manage them. To do it just add as many server as you need to config.inc.php. In Fedora and Centos it is located in /etc/phpMyAdmin/. Here’s an example: <?php /* Servers configuration */ $i = 0; /* Server: localhost [1] */ $i++;…
nginx: Using fcgiwrap for CGI applications deployment
From the box nginx doesn’t support CGI applications deployment since CGI is very old and poor performance way to run them. But some applications still should be deployed with use of CGI (earlier, we covered setup of Nagios and OTRS with nginx). Here is another way to do that. In this case we will use…
Bind: how to get statistics information
To get statistics information about query numbers that Bind has served you need to add next line to configuration file: statistics-file “/var/stats/named.stats”; It should be added in a ‘global’ options statement. After that you need to restart Bind and run: rndc stats Bind will dump statistics to this file. Note that if you run Bind…
munin: fixing ‘Can’t locate object method “new” via package “LWP::UserAgent” ‘
If you get next message Can’t locate object method “new” via package “LWP::UserAgent” at /usr/share/munin/plugins/nginx_request line 106. when you are installing nginx plugins for munin in Debian, this means that you don’t have perl LWP library. Installing it fixes an issue: apt-get install liblwp-useragent-determined-perl After munin-mode restart munin will start to create graphs.
Migrating Nagios from Apache to Nginx
Nagios is powerful monitoring software. And like OTRS in most cases it’s used with Apache. But sometimes you might want to use it with nginx. Here is a simple way to do that. Actually it’s very similar to launching OTRS with nginx – in both ways we use Perl FastCGI wrapper. I assume that you…
Trac: fixing ‘Warning: Can’t synchronize with repository “(default)” (Unsupported version control system “svn”: No module named svn).’
If you get a message ‘Warning: Can’t synchronize with repository “(default)” (Unsupported version control system “svn”: No module named svn). Look in the Trac log for more information’ while setting up or migrating you Trac, it means that you don’t have SVN library for Python installed. Note that Trac uses subversion-python package and not pysvn.…
Migrating OTRS from Apache to Nginx
Installing OTRS on Fedora is quite easy considering it has pre-built RPM packages and clean documentation. Usually OTRS is used with Apache. It’s stable well-tested solution. But what to do if you have nginx and you don’t want to have Apache? An issue becomes more complicated considering that nginx doesn’t support CGI from a box,…
Dumping MySQL database from slave for replication set up
Usually to set up MySQL replication it’s convenient to dump database from current master with –master-data parameter. With this option mysqldump includes commented SQL operator which needs to be issued on slave to set up replication: CHANGE MASTER TO MASTER_LOG_FILE=’mysqld-bin.000008′, MASTER_LOG_POS=687808977; But sometime it’s not very good idea to dump database from master server. For…