Posts Tagged ‘linux’

How to Listen on Multiple (More) IP Addresses on Linux

Friday, October 9th, 2009

One of the best articles that discussed how to bind or listen on multiple IP addresses is this article:

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

Amazing!  Useful!

How to Figure Out the Last Month (Previous Month) in MySQL

Thursday, August 20th, 2009

In the Traceback URL, I indicate the article I used to figure this out:

DATE_FORMAT(DATE_SUB(DATE_FORMAT(CURRENT_TIMESTAMP,'%Y%m01'), INTERVAL 1 MONTH),'%Y%m' )

Indicates one month prior to the current (in the form of YYYYMM).

Take a look at this mention in the MySQL Documentation for Date_Sub.

Configuring Syslog (Syslogd) on Debian to Automatically Accept Remote Logging on reboot or on restart

Friday, August 14th, 2009

I wanted a Debian linux server to become a remote logger for another Linux host.  I had edited this other remote host’s /etc/syslog.conf to have a copy of all its logs sent to a remote server.

However, this remote server was not accepting information as I had requested.  Sure, I could restart the service with the desired parameters, but it wouldn’t stick around after a reboot!

That is, until I found this post on how to edit the parameters of the file in Debian Linux.

Simple as pi!  Edit the /etc/default/syslogd file and include the -r parameter!  Now I remote-log by default.  Works great!

I also edited my /etc/hosts file to include the server I am receiving logs from.  That way the syslog file is less messy!

Installing CPAN Perl Modules without HTTP, FTP, DNS, or CPAN Access

Thursday, August 13th, 2009

This was pretty easy.

Step 1. Download the module you want from CPAN.org.  In this example, it’s the File::Tail module.  (The download link is the ‘download tar.gz’ link.  Not the source.)

Step 2.  Upload it to the destination server directly, OR use the SCP command to transfer it from another web-server to your destination server.

My preferred method was using wget at the middle server so I didn’t have to manually upload it to the middle server myself!

Step 3.  On the destination server, which now has the file, run tar -xzf (filename) to extract the file from the tar and GZip.  It will likely be in a folder that matches the name of the original tar.gz file.

Step 4. Go to the newly created folder (cd) and look at the readme file.  (Try using the VIM editor by typing vim (filename) .  When done reading, type :q to exit the file.  ( :q! to exit without saving any accidental changes.)  The readme file should have listed a few perl commands you should execute– usually ‘perl makefile.PL’, then ‘make’, then ‘make test’, then ‘make install’.

Step 5: After executing the commands requested by the readme file, you should be done!  If you need to resolve any dependencies to install this package, go back to step #1 and try again with the new package.

Best of luck!

(13) Permission denied: FastCGI can’t create server (problem solved)

Friday, August 7th, 2009

I was getting the following error on my Red Hat Enterprise Linux 5 server.  (RHEL 5)

[Thu Aug 06 17:48:03 2009] [crit] (13)Permission denied: FastCGI:
can’t create server “(Fast CGI File)”: bind() failed [(location of FastCGI location)]

I fixed this by:

chmod o+x /parent/directory/of/fastcgi

EG:
If Fast CGI was /var/log/httpd/fastcgi,
I’d do chmod o+x /var/log/httpd.

Worked fine.  (Kudos to my coworker who originally proposed the idea and it worked– Mentioning it again ’cause I did it again.)

Did it help you? Leave a comment! :)