mysqldump: Got error: 1042: Can’t get hostname for your address when trying to connect

If you getting error: 1042: Can’t get hostname for your address when trying to connect when trying to dump remote database using mysqldump it can be fixed by adding configuration directive: skip-name-resolve into section [mysqld] Also, MySQL service should be restarted using command: # /etc/init.d/mysqld restart Stopping mysqld: [ OK ] Starting mysqld: [ OK … Continue reading mysqldump: Got error: 1042: Can’t get hostname for your address when trying to connect

rkhunter installation procedure

To install rkhunter on Linux servers I am usually using the following procedure: To find out where it is installed I am use command: # whereis rkhunter rkhunter: /usr/bin/rkhunter /etc/rkhunter.conf /usr/share/man/man8/rkhunter.8 To update rkhunter databases run: [ Rootkit Hunter version 1.4.0 ] Checking rkhunter data files… Checking file mirrors.dat [ No update ] Checking file … Continue reading rkhunter installation procedure

Problems with cPanel update MySQL conflicts with mysql-5.0.x

To fix problem with cPanel / WHM upgrade if: error: Failed dependencies: MySQL conflicts with mysql-5.0.x Read: http://docs.cpanel.net/bin/view/AllDocumentation/InstallationGuide/RPMTroubleshoot and forum posts http://forums.cpanel.net/f5/case-64049-overnight-update-failed-mysql-conflicts-mysql-5-0-77-4-el5_4-2-i386-320381.html Made all MySQL databases backup and run command as root user: # rpm -e –nodeps –allmatches –justdb mysql-5.0.x It will resolve Conflict With Rogue mysql RPM. Run cPanel / WHM update once again.

Apache .htaccess mod_rewrite rule redirect old URL to new one

Sometimes I need .htaccess mod_rewrite rule to redirect old URL to new one. I am using the following rules: # Add followsymlinks to server options Options +FollowSymLinks # It will work only if web server Apache mod_rewrite is enabled <IfModule mod_rewrite.c> # Turn on mod_rewrite engine RewriteEngine On # Should be added if virtual document … Continue reading Apache .htaccess mod_rewrite rule redirect old URL to new one

MySQL full text search: minimum word length setting

To set up full text search parameter minimum word length edit your main MySQL configuration file /etc/my.cnf. In section [mysqld] # set minimum word length for full text search ft_min_word_len=3 Restart MySQL using command: # /etc/init.d/mysqld restart Documentation: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

Linux ProFTPD setup passive mode

1. IPTables configuration. If you have IPTables firewall enabled add rule -A INPUT -m state –state NEW -m tcp -p tcp –dport 63000:65535 -j ACCEPT to IPTables configuration file /etc/sysconfig/iptables and restart IPTables service: # /sbin/service iptables restart iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] … Continue reading Linux ProFTPD setup passive mode

Linux mount Windows samba share

To mount Windows samba share on Linux: 1. Log in as root administrator user. 2. Create mount point: # mkdir -pv /mnt/share_name 3. Mount share to it using command: # mount -t cifs -o username=User,password=Password //192.168.0.123/share_name /mnt/share_name 4. Use files from Windows share located in /mnt/share_name Note, User should have access to Windows share //192.168.0.123/share_name