Centos

Building GEOS on CentOS

It should be simple, but I ran into a number of errors.

First I got stuck on libtool: line 990: g++: command not found. It turns out I needed to install g++ using:

yum install gcc-c++

Then I got stuck on this one:

platform.h:110:2: error: #error "Can not compile without isnan function or macro
[...]
"Coordinate.inl:38: error: ‘ISNAN’ was not declared in this scope

The author of this page faced the problem, but the real insight came from this bug report on an unrelated project:

In these versions of g++ isnan is defined as a macro in <math.h> unless is included, in which case std::isnan() is defined instead.

And so I tried replacing #include <math.h> with #include <cmath> in include/geos/platform.h. Amazingly, that worked.

Configuring Amazon Linux For Web Services (Spring 2012)

I’ve tested this cookbook against Amazon Linux, but it will probably work just as well with the current version of CentOS. Basic Installation First, get root and update the OS: With that done, let’s get the basic packages and services installed: That gets us Apache HTTPD with SSL, PHP with a number of modules, Memcached, […] » about 400 words

Speed WordPress MultiSite With X-Sendfile For Apache

Like WordPress MU before, MultiSite implementations of WordPress 3.0 use a script to handle image and other attachment downloads. That script checks permissions and maps the request path to the files path on disk, then reads the file out to the web server, which sends it to the browser. That approach has some inefficiencies, and […] » about 400 words

Installing PHP APC On RHEL/CentOS

  1. Yum up some packages:
    ```

    yum install php-pear php-devel httpd-devel

              </td>
            </tr>
          </table>
        </div>
    
      2. Install APC using pear (the pear installer is smarter than the pecl installer):
      
        When the installer asks about APXS, say ‘no’. </p> <div class="wp_syntax">
          <table>
            <tr>
              <td class="code">
                ```
    pear install pecl/apc
    
          </td>
        </tr>
      </table>
    </div>
    
    1. Tell PHP to load APC:
      ```

      echo extension=apc.so > /etc/php.d/apc.ini

                </td>
              </tr>
            </table>
          </div>
      
        4. Restart Apache: <div class="wp_syntax">
            <table>
              <tr>
                <td class="code">
                  ```
      /sbin/service httpd graceful
      
            </td>
          </tr>
        </table>
      </div>

      Installing memcached On CentOS/RHEL

      Using info from CentOS forums, Sunny Walia and Ryan Boren, here’s how I got memcached running on my Dotster VPS:

      Install libevent:

      ``` wget http://www.monkey.org/~provos/libevent-1.3e.tar.gz tar zxvf libevent-1.3e.tar.gz cd libevent-1.3e   ./configure make make install ```

      Install memcached

      ``` wget http://danga.com:80/memcached/dist/memcached-1.2.5.tar.gz tar zxvf memcached-1.2.5.tar.gz cd memcached-1.2.5   ./configure make make install ```

      We will start the server to use 30 megs of ram (-m 30), listen on ip 127.0.0.1 (-l 127.0.0.1) and run on port 11211 (-p 11211) as user ‘nobody’ (-u nobody):

      ``` memcached -u nobody -d -m 30 -l 127.0.0.1 -p 11211 ```

      Get an error?

      ``` memcached: error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such file or directory ```

      Show it the path to the library:

      ``` LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH ```

      CentOS 5 Released

      At work I use Red Hat Enterprise Linux, but my personal stuff is served from machines running CentOS. Both distros were just bumped to version 5, bringing with them support for current components of the LAMP stack. I care because I want Apache 2.2.4, and while it’s pretty easy to get MySQL & PHP 5 […] » about 300 words