Category: CentOS

mysqldump: Got error: 1016: Can’t open file:

  Issue: When you try to create a MySQL database dump, you may encounter the following error: # mysqldump -u root -p database | gzip -9 > database.sql.gz Enter password: mysqldump: Got error: 1016: Can’t open file: ‘./database/some_table.frm’ (errno: 24) when using LOCK TABLES Solution: Add --lock-tables=false to the mysqldump command: # mysqldump -u root …

Continue reading

Install htop on CentOS 5.x

  htop is an interactive process viewer for Linux, which is a powerful alternative to the ‘top’ utility. Some of the benefits of htop: Supports mouse operation Color formatted display Scroll the list vertically and horizontally to see all processes and complete command lines Kill a process through htop To install htop on CentOS (5.X) …

Continue reading

Create a Self-Signed SSL Certificate with OpenSSL

  This Self-Signed SSL Certificate was created on a server running CentOS 5.7 with Virtual Hosts and SELinux disabled. Requirements: – openssl – mod_ssl # yum install openssl mod_ssl To begin, change to the following directory. We will temporarily create our SSL files here. # cd /etc/pki/tls/certs/ Generate Your Private Key. # openssl genrsa -des3 …

Continue reading

You down with NTP… Yeah you know me!

  NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference. Type the following command to install NTP. # yum install ntp Setup the time sync. # echo 0.centos.pool.ntp.org > /etc/ntp/step-tickers Set the run levels required for the ntpd service. # chkconfig …

Continue reading

Add Iptables Chain

  Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. Add Chain Example (from command line): Create a new chain in iptables: # iptables -N chainname Insert the chain into the input chain at the head of the list: # iptables -I INPUT 1 …

Continue reading

Dynamic Firewall Rules

  Would you like to block everyone from remotely accessing your server but still be able to access it from your dynamic IP address at home? To do this, you will need to create an account with a dynamic DNS service  provider (i.e. http://www.dyndns.com). Your home computer will tell the dynamic DNS service what your …

Continue reading