PHP 5.4 and Apache 2.4 on CentOS 6

 

Compile and install the latest apr from source and install to
./configure –prefix=/usr/local/httpd

Compile and install the latest apr-util from source
./configure –prefix=/usr/local/apr-util –openssl –with-apr=/usr/local/apr/httpd

Compile and install the latest pcre-config from source
./configure –prefix=/usr/local/pcre

Apache

./configure \
--prefix=/usr/local/httpd \
--enable-modules=most \
--enable-so \
--enable-rewrite \
--enable-ssl \
--with-apr=/usr/local/httpd \
--with-apr-util=/usr/local/httpd \
--with-pcre=/usr/local/pcre

PHP


./configure --prefix=/usr/local/php
--with-libdir=lib64 --with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/usr/local/httpd/bin/apxs \
--with-mcrypt=/usr/local/mcrypt --with-openssl \
--with-bz2 --with-curl --with-freetype-dir=/usr \
--with-png-dir=/usr --enable-gd-native-ttf \
--with-gettext --with-gmp --with-iconv \
--with-jpeg-dir=/usr --with-openssl --with-pspell \
--with-zlib --enable-exif --enable-ftp \
--enable-sockets --enable-zip --with-pear \
--enable-calendar --enable-mbstring --with-ldap=/usr \
--enable-soap --with-xmlrpc --with-gd --enable-intl

Latest PHP and Apache Config

Here is the latest configure options I used on Ubuntu 12.04.1 LTS Precise Pangolin for PHP and Apache.  MySQL was installed from packages.

Downloaded the latest Apache and PHP (2.4.3 and 5.4.7 respectively as of this post)

Had to run:

sudo apt-get install libaprutil1-dev

Before this would work for Apache:

./configure \
--prefix=/usr/local/httpd \
--enable-modules=most \
--enable-so \
--enable-rewrite \
--enable-ssl \
--with-apr-util=/usr

Next is a list of prerequisites for PHP

sudo apt-get install libxml2-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install libgmp-dev
sudo apt-get install libicu-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libpspell-dev

I still had to install Openssl and cURL from source even though they were already installed:

Installed Openssl from source and installed it to /usr/local/ssl
Installed curl from source and installed it to /usr/local/curl

And the config options for PHP:

../configure
--prefix=/usr/local/php \
--with-mysql \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/usr/local/httpd/bin/apxs \
--with-mcrypt=/usr \
--with-curl=/usr/local/curl \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl=/usr/local/ssl \
--with-pspell \
--with-zlib \
--enable-exif \
--enable-ftp \
--enable-sockets \
--enable-zip \
--with-pear \
--enable-calendar \
--enable-mbstring \
--enable-soap \
--with-xmlrpc \
--with-gd \
--enable-intl

Perfect Timing

Some things you’re not letting happen right now because the timing isn’t perfect for you. Some you’re not letting happen because you are very aware of where you are. But all things, as they are happening, are happening in perfect order. And if you will relax and begin saying, “Everything in its perfect time. Everything is unfolding. And I’m enjoying where I am now, in relationship to where I’m going. Content where I am, and eager for more,” that is the perfect vibrational stance.

— Abraham

Latest PHP/Mysql/Apache From Source

I setup a new 64-bit virtual server running CentOS 5.6.    It was a pretty much vanilla install of CentOS minus Apache, PHP and MySQL

I  decided to compile MySQL, PHP and Apache from Source.  Everything was installed in /usr/local/ I created sym links to the version directories to keep a copy of the programs just in case anything went wrong.

ln -s /usr/local/php-5.3.6 /usr/local/php
ln -s /usr/local/mysql-5.5.11 /usr/local/mysql
ln -s /usr/local/httpd-2.2.17 /usr/local/httpd

edited /etc/profile to have /usr/local/mysql/bin and /usr/local/php/bin in PATH variable. Below was added to the bottom of /etc/profile

PATH=$PATH:/usr/local/mysql/bin:/usr/local/php/bin
export PATH

Steps to Install MySQL Apache and PHP from source

1. Had to install and compile Cmake first for MySQL from source (cmake.org).  I installed it to /usr to keep things simple.

  • cmake .
  • make -j3
  • make install
  • created mysql user and group
  • changed ownership of data dir to mysql
  • run mysql_install_db from MYSQL_INSTALL_DIR/scripts/mysql_install_db –user=mysql

2. Apache was configured with:

./configure --prefix=/usr/local/httpd --enable-ssl --enable-so --enable-rewrite
3. yum install libicu-devel
4. yum install libmcrypt-devel
5. yum install aspell-devel

6. For PHP, I used the following configure options.  Notice this is for a 64 bit install.

./configure --prefix=/usr/local/php --with-libdir=lib64 --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sqlite-utf8 --with-apxs2=/usr/local/httpd/bin/apxs --with-mcrypt=/usr/local/mcrypt --with-openssl --with-bz2 --with-curl --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-zlib --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-zip --with-pear --enable-calendar --enable-mbstring --with-ldap=/usr --enable-soap --with-xmlrpc --with-gd --enable-intl

Phone Drama

Battle of the Smart Phones

Before I switched from my beloved T-Mobile back in 2008 to get the iPhone from AT&T, I waited until the first Android phone was to be released.  I saw the FCC sketches and the prototypes of the G1 and I thought i was an ugly phone.   I didn’t like the “chin” and the sliding keyboard looked awkward.  I had the T-Mobile MDA so I was use to the sliding keyboard action.

I had been lusting after the iPhone since it came out in 2007.  I just didn’t have $600 to plunk down on a phone and I was still under contract with T-Mobile.  So when the iPhone 3G was released summer of 2008 I was excited, but not ready to part with T-Mobile just yet, I decided to wait to see what the G1 would be like.

Since I was disappointed in the design of the G1, I decided to make the switch to AT&T to get the iPhone.   I was sooo in love with the phone when I got it.  The day after, I couldn’t hardly get any work done.  There was some serious endorphins being kicked off owning the iPhone.  I never have felt so content in my life.  It was  weird feeling.  It was like the iPhone made my life complete.

In 2009, when the iPhone 3GS came out, I had new tech envy.  The 3GS proved to be a definite improvement over the previous generation in speed and memory.  I wouldn’t be eligible for an upgrade until March of 2010.  After agonizing over it a bit, I decided to just wait until the new iPhone would be release for 2010.

Forward to 2010

Back in December, the school board switch from Alltel to Verizon.  The Motorola Droid was the new hotness and I decided to get it as my work phone.  After using it for a couple of weeks, I hated it!  The screen was too narrow and the on screen keyboard was not very accurate.  Some parts of the UI were just awkward and inconsistent.  It just didn’t have that iPhone polish and granted, I was a little biased.  I passed it along to a coworker who is completely happy with it.  *kanye shrug*

Next I decided to try out the Palm Pre Plus.   The packaging of the Pre had the new car smell and inhaled the inside the box quite a bit.  It did smell good. *lol*  I thought the Pre was a nice compact phone but the keyboard was an issue for me.  The keys were just too small and I didn’t like having to slide open the phone every time I wanted to make a text entry.   I longed for an onscreen keyboard.  Voice recognition input would have been helpful.  The UI wasn’t too bad to navigate.  I found the notification system a little awkward; better than the iPhone’s but still awkward.  Still unsatisfied, I sent it back and opted for the Droid Eris.

I liked the Eris better than the Pre and Droid.  Even though the screen is smaller than the iPhone’s, but I got use to it.  The Eris, made by HTC, has the Sense UI “stuff” which adds some much needed polish to the Android interface.  It was alot better to use than the Droid to me, but it still had some UI issues.  The on screen keyboard wasn’t as much as a pain to type on as the Droid, but a pain nonetheless.  Adding shapewriter helped.  Overall, I think my Eris was a lemon.  Battery life was horrible (wouldn’t last a complete day, where as my coworker didn’t have any problems), and it didn’t like to hang on to the 3G signal when I was in Tuskegee.  In Auburn, it wasn’t much of a problem.  Also, the phone wouldn’t associate itself with a remembered wireless network automatically.

A month or so later, I discovered that Verizon would be releasing another Android phone called the Incredible which boasted some impressive specs.  It’s specs are very similar to the Nexus One and the Desire, which are considered to be the “best” Android phones out there.  I decided to give it a try.  I preordered the phone which arrived a day after the official release date.

So far, I’m really impressed with the phone.  It’s light, fast, and I really like the gorgeous OLED display.  Battery life is excellent even after heavy use.  Reception is pretty good as well.  The camera is light years better than the Eris or any mobile phone camera that I’ve seen so far.

Tough Decision

Lately, I’ve been debating whether I should stick with AT&T or not.  The only thing they really have going for them is the iPhone and their 3G speed.  I can consistently get 2MBps download speed in Atlanta and where I now live in Auburn.  I have the MyWi Wifi/USB tether app for the iPhone and it works really well as a hotspot for the iPad (drains the battery like crazy though).  My phone bill is $80+ a month and that’s with a discount I’m getting with my previous employer.  That $80+ is for the 450 anytime minutes, 1500 sms/mms for $15 and the mandatory $30 dataplan.  The $30 data plan is a rip off since I’m mostly on wifi when I’m at work or home and I don’t use anywhere near the 5GB cap each month;  I use less than 250MB per month on the data connection.  Since I have so very little daytime minutes, I use Skype alot during the week before 9pm and I’ve banked alot of daytime minutes in the process.  For a similar plan, I won’t get much of a deal with the other carriers.  Only Sprint and T-Mobile offer much better deals.  One issue with T-Mobile is that their 3G coverage isn’t as good as the others, but it’s no worse than AT&T’s in the area where I work and live.  My other issue I have with T-Mobile is the lack of any high end Android phones.

There is the rumor that the iPhone is coming to Verizon this year.  I don’t see that happening and this is why:  Apple and AT&T proudly shows that with the iPhone you can surf and talk at the same time over the 3G network.  Verizon or Sprint’s EV-DO network does not allow that and since that’s one of the marketing points of the iPhone, I doubt we’ll see a iPhone on Verizon’s 3G network.  That may be a different story when Verizon starts rolling out their LTE network and I can then see a Verizon branded iPhone perhaps next year.  And there’s also the issue of Apple’s supposedly 5 year exclusivity contract with AT&T.

Also, the HTC Incredible impressed me to take a second look at the Android phones.  The Nexus One looks bland to me and I don’t like the its stock Android UI.  I believe it has been rooted and it wouldn’t be a big issue to get Sense UI on it.   The Incredible and Nexus One’s sibling, the HTC Desire, should be coming to AT&T soon so says FCC approval on it’s 3G radio bands.

Sprint is coming out with with a high end Android phone called the HTC EVO 4G this summer.  As a carrier, Sprint probably has the best value in their plans.  Their 3G network is compatible with Verizon’s; so where ever big Red works, the Now Network should work as well.  I’m not currently covered by Sprint’s 4G network yet, but again, I’m mostly at home or at work where I have wifi access.  The EVO 4G boast some pretty impressive specs as well.  It doesn’t have an AMOLED display, so I’m not sure how well battery life will fair with it.

I’ve been thinking about going the prepaid route since I no longer have an interest in staying with AT&T and to ultimately save a few bucks.  I’m not that impressed with the iPhone 4 update coming out later this summer either.  There are some useful improvements, but not really enough for me to upgrade to the new iPhone.  I may try to cop a 3GS from eBay or Craigslist to get some extra speed.  The iPad pretty much satisfies my Apple gadget needs so I don’t feel compelled to stick out out with AT&T again for the new iPhone.

Dreaming of Bones

So, I’m addicted to the TV show Bones!

Last night I dreamed I was watching it.  Somehow a dead body ended up in Will Smith’s pool (yes the actor).  It was green from the algae.  I remember Dr. Brennan wanted to get some drudged from the bottom of the pool so that Dr. Hodges could examine it for particulates.  I also distinctly remember wanted to know what he found.  However, the dreamed ended before I could find out. :roll:

Why Auburn

A few days after excepting the job (and after the board approved it), I drove down to Tuskegee to try and find somewhere decent to live.  I knew trying to find somewhere in Tuskegee I was going to like was going to be a challenge.

Before I moved back to Atlanta, I lived in a studio apartment in a duplex that was within walking distance of campus.  Work was 5 to 10 minutes away depending on how many slow cars I got behind or traffic lights I caught.  Often I would roll out of bed and head to work and would come home for lunch.  I really wanted that convenience again.

However, my main concern with living in Tuskegee was security.  My apartment in Tuskegee was broken into twice within six months (between October 2006 and February 2007).  I have an idea who it was.  Granted, it was probably my fault for letting strangers in my house and leaving the windows open all day some days.  I believe that reason Asia disappeared was because of the second break in.

I first looked at an apartment complex where a lot of college students lived.  It was decent by Tuskegee standards.  They had bars on the doors and windows.  However, the apartment manager had all of the leases expire at the same time and I was looking to be moved before that happened.   I also checked another apartment complex out in Tuskegee.  Single bedroom, rent was cheap too.  Perfect for a college student, or someone trying to save some money starting off.  There were no bars on the windows or doors and it look like an easy target for a determined thef.  Even though the units were wired for ADT, someone could still break in your apartment and steal something before the police came.  Plus you have the added emotional baggage of someone violating your stuff.    I figured I could live there for a year or so, save up a lot of cash and perhaps find something else decent in Tusekgee.   I checked out a couple of houses that were for rent, but i just didn’t like the neighborhood that they were in.

I started  to become tired and frustrated.  It looked as if I wasn’t going to find something I liked in Tuskegee in timely matter.

Auburn it is!

The biggest issue I had with living in Auburn is the football traffic.  Auburn University’s football team is doing very well and their home games are well attended by students, alumni and fans.  As if one didn’t see enough of the variety Auburn University decals affixed to vehicles in all kind of ways, home games added flags on cars and faux tiger tails attached to rear bumpers.

By the time I got to Auburn, it was lunch time and so most of the rental offices were closed.  I was able to check out one place that catered to a lot of college students.  What irked me about a lot of the apartments in Auburn is that they were rented by the rooms and not units.  College town business I guess.  This particular complex only had three bed rooms available, but they said I could rent it  for paying the price of two rooms which came about to be a little over $1100.  $1100 for an apartment in Auburn, Alabama!?!?  $1100 would get me a studio or one bedroom apartment in midtown Atlanta with a decent view.  I started to get a headache and even more frustrated than i was before I left Tuskegee.

After driving around Auburn looking at different places there, I decided to call a friend of mine and asked her where she lived.  I spoke with her before online a few days prior and she told me about the complex where she stayed.  It was a little more than what I really wanted to start paying for a place initially, but the rent was within my preliminary budget.  My other concern was that it was a little further from work which would increase my commute time.

I got the directions from my friend and decided to check the place out.  The complex is called Paces at the Estates and is currently the only apartment complex in the Estates subdivision. The Estates is a relatively new subdivision that have very nice homes from the upper 200s, town homes in the upper 100s and perhaps 2 to 3 bedroom homes in the upper 100s.  The subdivision is in close proximity of the mall, movie theater and a private school.  A Wal-Mart is less than 5 minutes away and Tiger Town (a shopping center) is about 10 minutes away.  It’s also not far from a main artery of the Auburn/Opelika area where a lot businesses are situated.

I had already seen pictures from the website my friend sent me and it seemed like a really nice place.  And it is.  They only had two one bedrooms available.  One of the first and one of the second floor.  The one on the second floor is cheaper than the top and bottom floor.  The top floor has vaulted ceilings and the bottom floor has a nice stained concrete floors.  I had opted for the cheaper option, but the tenet wasn’t scheduled to move for a few more weeks and I needed to be moved in right away.  So I decided to take the first floor apartment and I’m glad I did.  I like the floors anyway and I can stomp all I want to.  My apartment has a study which will be my office.  It’s currently full of junk right now from the move.  The kitchen has track lighting, and I also got a complementary washing machine.  It was left from the previous tenet and the landlord said I can keep it.  I’m currently renting a dryer.

About a month ago, I finally got some furniture and bought my first very first tv, a 50 inch Panasonic Plasma.

All in all, things are going pretty good so far.  The job is keeping me busy as expected, but at least they are paying me right this time.  Makes it all worth it.

Transition: Complete

The past couple of months have been pretty interesting.  I’ve moved back to Alabama after excepting to take my old job back with a bigger salary.  Even with the increase, it wasn’t an easy decision.  I toiled with the idea day and night.  I called and asked other people’s thoughts and opinions.  My family was all in for me going back.  Some of my friends not so much.  My friends knew of the drama I had with the job before and all of the ish that went on.  I went back to Atlanta not looking back and hoping to start my life over there.  God had other plans….

I really enjoyed myself at Georgia Tech.  My coworkers were pretty cool and I got to work for one of the most internationally recognized universities in the world.  I learned alot more about admining linux servers thanks to my boss.

All in all, I’m enjoying being back.  The people are super nice and friendly as usual and most people (as I knew would be) were happy to see me come back.

Moving back  has put a new spin on things with my life and put some other things on hold.  I’m back to having no social life, but being an introvert, it’s the least of my worries.