Mild Ramblings of a Techhead
Recent
Photo
Sets

Posts Tagged Programming

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


Code Code Code…

The past couple of days, I’ve been churning out some php code.  I’ve been making some modifications to the gallery code.  Mostly back end stuff.  I created a script where I can upload photos into a folder on the server and have a PHP page process those photos and add them to an album I created.  It’s alot quicker (and eaiser) than going the web form route.  I also ended up fixing some bugs and making tweaks here and there.  Still needs alot more work.

One of the major changes I made to the gallery site is how the photos were stored.  Before, I had them all lumped into one folder which would make trying to backup and restore the photos somewhere else a nightmare.  Now, they are all stored in folders named after the album they were created for.  Also, I created some code to automatically create a smaller version of the original photo if it didn’t already exist.  This would save time uploading my album to another host if I needed to.

Last night, I started working on another WordPress theme I’d like to use.  I saw it on another site and I sort of copped it.   :grin:  I like the color scheme and all, but I will add my own unique touches to it.

I’ve been tweeting alot lately, perhaps for the past month or so.  I guess I can “blame” a friend of mine for that.  He suggested I follow a couple of his Oakwood buddies and they ended up being a very chatty bunch.  It’s been fun.  Meet some really cool people.  I’ve only been on Twitter and year, but it feels like it’s been much longer.   I guess because everyone is talking about it and doing it.  It’s the thing to do thanks to Ashton Kutcher and Oprah.

My car turned 40K yesterday somewhere on I-20 on the way to work.  I’ve had it two years and less than 3 months.  The amount of miles I’ve been putting on it a month have slowed down since I’ve moved to Atlanta.   All that traveling between sites with the previous job racked up alot of miles.  But she’s still holding together.

My Mazda3

My Mazda3


On Geek Celebrity

I forgot to mentioned in my last entry, that I attended an Apple seminar yesterday in the Library on iPhone and iPod Touch Development. From what I could tell, the attendees were mostly (if not all) GT people and mostly staff. I believe there were a few students there.

iPhone development involves learning Objective-C along with the Cocoa framework. I tried my hand at learning Objective-C a couple of months ago, but I was having a hard time getting a grasp of the syntax. After watching and listening to the presenters, I was encouraged to try getting back into it.

One of the speakers was Evan Schoenberg who happens to be one of the lead developers for Adium. He has also written several iPhone apps and is aparently doing well enough to help him pay off some medical school debt. He’s in med school at Emory and should be finishing up this spring and entering into a residency program somewhere in Florida. Dude is pretty smart! I was impressed!