Contact
Site: US UK AU |
Nexcess Blog

Posts by: Linux

D-LUG: Part Deux

June 26, 2012 0 Comments RSS Feed

Detroit Linux User Group

It’s my pleasure to announce the second edition of D-LUG!

We have a special guest speaker this time around. His name is Mark Stanislav (www.uncompiled.com)

“Mark Stanislav is a Senior Consultant at NetWorks Group, focused on
operational automation and information security. With a career
spanning a decade, Mark has worked within small business, academia,
start-up, and corporate environments primarily focused on Linux
architecture, information security, and web application development.
Mark holds a Bachelor’s degree in Networking & IT Administration and a
Master’s in Technology Studies focused on Information Assurance, both
from Eastern Michigan University. Mark also holds his CISSP,
Security+, Linux+, and CCSK certifications.”

Read more

Posted in: Linux, Nexcess

Introducing the Detroit Linux User Group (D-LUG)!

May 4, 2012 1 Comment RSS Feed

Introducing the Detroit Linux User Group (D-LUG)!

Detroit’s official motto:

Speramus Meliora; Resurget Cineribus
“We Hope For Better Things; It Shall Rise From the Ashes.”

It’s my pleasure to announce the first meeting of the Detroit Linux User Group A.K.A. D-LUG! With the rapid growth of the technology industry in Detroit, it was only a matter of time before we all got together, so let’s start it off right. Whether you’re a seasoned system administrator or you’re just beginning to explore the world of Linux and Open Source Software, we want you!

Since this is the first meeting, I’ll start it off with a brief presentation on fun command line tricks and one-liners. From there, we’ll have a “roundtable” discussion on the current state of Linux/OSS, where it’s going, and ways to leverage it to provide access to those without. Detroit is currently a hotbed for technological innovation; without the barrier of license restrictions we, as Linux/OSS users, have the ability to create something new, something fresh.

Bring yourself, your ideas, and your passion for technology. We’ll take care of the rest.

Free coffee and pizza!

Thursday May 17th at the M@dison building. 7PM – 8:30PM.

E-mail me at bhill@nexcess.net if you have any questions.

Posted in: Linux

mkdir(): Too Many Links – What It Is and How to Fix

April 27, 2012 1 Comment RSS Feed

mkdir(): Too Many Links - What It Is and How to Fix
Recently, I was notified of an “out of disk space” error message which showed up in one of our applications while trying to send an email. I knew right away the source of the problem and while the short term solution was easy (I renamed the problem directory and created a new one – these files were only for logging) we definitely needed a long term solution.

All I found in the logs were a bunch of “Too many links” error messages and didn’t know exactly what it could mean. Hey, I’m a programer, not a systems admin; this was a new one for me. I could see we hadn’t run out of disk space but I knew “links” had to do with the filesystem.
Read more

Posted in: Linux

Ack is Better Than Grep

January 12, 2012 0 Comments RSS Feed

Ack is Better Than Grep

In my last blog posting I wrote about some basic features of grep. If you already use grep a lot, it was probably a pretty boring post. One problem I used to have is when running grep, I’d get a lot of unwanted files that would match. For example I might try searching for the string ‘foobar’ to find where that appears in some code but there’s a DB dump in the directory too and the .sql file has the word ‘foobar’ in it somewhere. And when it does, it will be on one line that has 300 characters on it which fills my screen with its long line, making things hard to skim through.

Read more

Posted in: Linux

Installing Apache Solr on CentOS

December 30, 2011 5 Comments RSS Feed

Installing Apache Solr on CentOS
Apache’s Solr search platform is a common solution for more flexible and better performing searches on sites that have outgrown their database’s built-in search facilities. Here at Nexcess, the most common use is by clients with Magento Enterprise Edition (the only version with built-in support for Solr). In this post I will walk through setting up Solr for general use, with some comments on setting it up for use the Magento EE.

Solr runs as a Java servlet, so the first thing needed is a way to run Java servlets. We’ll be using the OpenJDK and Tomcat from the JPackage repo, so we need to install the repo with:

wget http://jpackage.org/jpackage50.repo -O /etc/yum.repos.d/jpackage50.repo

Then install tomcat and java:

yum install -y java-1.6.0-openjdk tomcat6

Read more

Posted in: Linux

Debugging Apache Rewrites and Redirects

December 19, 2011 2 Comments RSS Feed

Debugging Apache Rewrites and Redirects
Apache’s mod_rewrite and mod_alias can be very useful, but they can also be a huge pain to debug when a problem arises. Luckily, there are a few things that can help, and since you’re probably not the first person attempting to rewrite or redirect something in a specific way, you’ll likely be able to find the answer by just searching around intelligently once you understand the basics.

The first resource that I use would be the Apache mod_rewrite and mod_alias documentation. It might seem tedious, but Apache HTTP Server actually has some of the best documentation in the industry. If you spend 10 minutes reading the actual documentation and give understanding it a shot, you’ll probably find the majority of your questions answered. Make sure you check out the section of the mod_rewrite docs that covers the RewriteLog directive, since having a log turns guesswork into something debuggable.
Read more

Posted in: Linux

Features of Grep

December 5, 2011 0 Comments RSS Feed

Features of grep

In my last blog posting I wrote about features of the less pager. Its one of those very common Linux utilities that everyone uses but no one reads the man page to learn about features. Just like less, everyone uses grep, but there’s a lot of features you’re missing out on if you haven’t read the man page.

grep is a very very old command, its name comes from the command that was run through the ed editor. If you wanted to print out the lines of a file that matched a regular expression (re) you’d run ‘g/re/p’ in ed which stood for globally search for a regular expression and print the matching lines. vi and sed users might recognize the syntax and other basic ed commands since they both adopted a lot from ed.

Read more

Posted in: Linux

Testing Network Performance and Throughput with Iperf

November 4, 2011 1 Comment RSS Feed

Testing Network Performance and Throughput with Iperf
Scenario 1: You you have two servers located a large geographical distance apart, say one in The US, the other in the UK. You are copying a large file between these two locations via scp but you are only averaging 200Kbps. You know it should be faster and want to increase the TCP window scaling size according to the bandwidth delay product, but want a reliable way to test the changes easily to see if there is improvement.

Scenario 2: You have a local two server gigabit network where each server has a nice GigE network card connected via a good gigabit switch. You want higher transfer speeds between the servers and are considering enabling jumbo packets on the servers and network switch but need a way to verify that the changes have actually increased throughput.

Scenario 3: You use VOIP for your phone system and have a remote office that has terrible call quality to your Asterisk server. You think the network connection is to blame but need a way to verify the amount of jitter and packet loss.
Read more

Posted in: Linux

Features of the Less Pager

October 30, 2011 0 Comments RSS Feed

Features of the Less Pager

less is what is known as a pager in the world of Linux. Pagers are used to view files or output piped in. As their name implies, they’re used when there are multiple pages of text that can’t fit on the screen. Some people use their favorite editor to read log files but I always use a pager because pagers are read-only, there’s no possibility you’ll accidentally make a change to a log file and save it like there is with your favorite editor.

less was written in 1983 by Mark Nudelman, who still maintains it today. The name of it is a play on the name of an older pager called more which is unable to move backwards if you were viewing something piped to it. It can go backwards in a file but not if something is piped in to it, compare more /var/log/dmesg which will allow you to go backwards but not cat /var/log/dmesg | more.

Read more

Posted in: Linux

Running CGI Scripts on the CLI

October 17, 2011 0 Comments RSS Feed

Running CGI Scripts on the CLI
CGI (Common Gateway Interface) is one of the oldest and most widely supported methods of adding dynamic content to a website. However, debugging CGI scripts can be quite a pain, since often the error messages are vague and unhelpful (such as the “Premature end of script headers” error in Apache). In cases like these, it’s helpful to be able to test the script by running it manually from a shell, but some scripts and interpreters are strict about running in a proper CGI environment and won’t work if you just try to run them. Magento is an example of this:

$ php-cli -f index.php<br />
$ php-cgi -f index.php<br />
&lt;script type=&quot;text/javascript&quot;&gt;window.location.href = 'http://localhost/errors/report.php?id=265091827059&amp;skin=default';&lt;/script&gt;<br />
$ php-cgi index.php<br />
Status: 302 Moved Temporarily<br />
Content-Type: text/html; charset=UTF-8<br />
Location: http://example.com/

Read more

Posted in: Linux