Tuesday, January 22, 2013

One-Day Shopping Event from Apple Hong Kong

Wow~ Apple Hong Kong will run a One-Day Shopping Event on January 25. It is time to hold your purchase from Apple Hong Kong for a few days and let's see which item will be on discount on coming Friday.

For more information, go to http://store.apple.com/hk/browse/new_year/red_friday

How to Compile Apache HTTP Server 2.4.3 from Source on CentOS 6.3

This post describes how do I compile the Apache HTTP Server 2.4.3 from Source tarball on CentOS Linux 6.3. I am writing this blog post is because the YUM server does not provide any HTTPD packages on Apache HTTP Server version 2.4.3. At the time of writing of this blog post, the version provided by the YUM repository is version 2.2.15.

Prerequisite

Install the required packages to compile the Apache HTTP Server by using yum.
  • yum install gcc
  • yum install gcc-c++

Compile the Apache Portable Runtime Project

The Apache Portable Runtime Project (APR) is required for building Apache HTTP Server 2.4.3 on CentOS 6.3.

1. Download the Apache Portable Runtime project from http://apr.apache.org. As the time of writing this blog post, APR version 1.4.6 was used.
2. Extract the Unix Source file downloaded

tar zxvf apr-1.4.6.tar.gz


3. Run the following command to compile the Apache Portable Runtime project

cd apr-1.4.6
./configure --prefix=/opt/apr-1.4.6
make
make install

4. The Apache Portable Runtime project should be installed at the location /opt/apr-1.4.6

Compile the Apache Portable Runtime Utility Library

The Apache Portable Runtime Utility (APR-util) Library is also required for building Apache HTTP Server 2.4.3 on CentOS 6.3

1. Download the Apache Portable Runtime Utility project from http://apr.apache.org. As the time of writing this blog post, APR-util version 1.5.1 was used.
2. Extract the Unix Source file downloaded

tar zxvf apr-util-1.5.1.tar.gz

3. Run the following command to compile the Apache Portable Runtime Utility Library


cd apr-util-1.5.1
./configure --prefix=/opt/apr-util-1.5.1
make
make install

4. The Apache Portable Runtime project should be installed at the location /opt/apr-util-1.5.1

Compile the Perl Compatible Regular Expression Library

The Perl Compatible Regular Expression Library (PCRE) is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. It is used by Apache HTTP Server 2.4.

1. Download the PCRE library from http://www.pcre.org
2. Extract the Unix Source file downloaded

tar zxvf pcre-8.32.tar.gz

3. Run the following command to compile the PCRE Library. Assuming the directory to be installed is /opt/pcre-8.32.

cd pcre-8.32
./configure --prefix=/opt/pcre-8.32
make
make install

4. The PCRE Library should be installed at the location /opt/pcre-8.32

Compile the Apache HTTP Server 2.4.3

Finally, it comes to compiling the Apache HTTP Server 2.4.3

1. Download the Unix Source of Apache HTTP Server 2.4.3 from http://httpd.apache.org
2. Extract the Unix Source file downloaded

tar zxvf httpd-2.4.3.tar.gz

3. Run the following commands to compile the Apache HTTP Server 2.4.3. Assuming the directory to be installed is /opt/httpd-2.4.3

cd httpd-2.4.3
./configure --prefix=/opt/httpd-2.4.3 --with-apr=/opt/apr-1.4.6 --with-apr-util=/opt/apr-util-1.5.1 --with-pcre=/opt/pcre-8.32
make
make install

To start the Apache HTTP Server 2.4.3

Assuming you completed the compiling procedures stated above, run the following command to start the Apache HTTP Server.

cd /opt/httpd-2.4.3/bin
./apachectl start




Sunday, April 15, 2012

Time to Update the Adobe Reader

It is a good practice to keep all software on your computer up-to-date. I just receive a pop-up alert regarding Adobe Reader security update.


The release note for this update is available at http://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html

Saturday, February 11, 2012

Building MySQL 5.5.20 on CentOS 5.7 from Source Tarball


Prerequisite
Install the following package using yum. Please remember to run yum using root.
shell> yum install cmake
shell> yum install ncurses-devel
shell> yum install gcc-c++

Download the Source Code
At the time of this blog, the current version of MySQL to be installed is version 5.5.20. The source tarball can be downloaded from www.mysql.com.

Unpack the Source Code
Run the following command to extract the MySQL 5.5.20 source tarball.
shell> gunzip -dc mysql-5.5.20.tar.gz | tar xvf -

Building the Source Code
Assuming MySQL 5.5.20 to be installed to the directory /opt/mysql-5.5.20 on the CentOS 5.7.
shell> cd mysql-5.5.20
shell> cmake . -DCMAKE_INSTALL_PREFIX=/opt/mysql-5.5.20 -DCURSES_LIBRARY=/usr/lib/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include
shell> make
shell> make install
shell> cd /opt/mysql-5.5.20
shell> chown -R mysql:mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
shell> cp support-files/mysql.server /etc/init.d/mysql.server

Startup and Shutdown Script
Login as root and run the following command to start or stop MySQL Server.
To Start MySQL 5.5.20: /etc/init.d/mysql.server start
To shutdown MySQL 5.5.20: /etc/init.d/mysql.server stop


Saturday, January 7, 2012

Specifying a Java Virtual Machine (JVM) for Eclipse IDE


In a developer machine with multiple Java SDK installed, you may specify which Java Virtual Machine (JVM) is used for your Eclipse IDE. To specify it, edit the “eclipse.ini” file as follow.

In my example, I have a Java 1.6.0_30 installed at “C:\Java\jdk1.6.0_30″.

The following is the ”eclipse.ini” file in the Eclipse IDE directory

-vm
C:/Java/jdk1.6.0_30/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
–launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m