Tuesday Feb 05, 2008

As I mentioned earlier, Apache 2.2, MySQL and PHP has now been integrated within Open Solaris. If you haven't already, check out Solaris Developer Express 01/08 and let us know with your comments.

Here is a step by step instruction on how to deploy a Web 2.0 site like MediaWiki on Open Solaris using Apache 2.2, MySQL 5.0 and PHP 5.2.4 . Probably, for the first time in Solaris history, we can now deploy a Web 2.0 site in such a short time. 

Download and Install Open Solaris Developer Express 01/08

To simplify the initialization and configuration steps required for Apache and MySQL within Open Solaris, engineers within Web Stack project like Ludovic Champenois has done an amazing job of creating a a 'initialize' script so as to successfully setup the Web Stack Environment within couple of minutes. Here is a screen snap shot of the Web Stack Initialize 'script' posted in Ludovic Champenois's Blog

Once the Web Stack 'initialize' script completes successfully, you are now ready to start Web Stack Apache 2 and MySQL service as shown here . This is pretty much all is needed to host your web site and start developing and deploying PHP scripts.

However, to use PHP 5.2.4 database shipped within Open Solaris, we will need this below temporary work around to force PHP to use MySQL 5.0 based client library. Note: Going forward, PHP build process has been modified to look for MySQL 5.0 based client libraries as well.

  • Open a terminal and become root from your Open Solaris box
  • Run the following command (as a temporary work around)
    • root> ln -sf /usr/mysql/5.0/lib/mysql/libmysqlclient.so.15.0.0 /usr/mysql/5.0/lib/mysql/libmysqlclient.so.12

Now, you will need to download MediaWiki tar ball from here and unpack the downloaded tar ball to Apache 2.2 document root location. Now, let us follow the instructions on how to configure MediaWiki as mentioned under 'Installation Instructions' within MediaWiki web site.

  • These below commands show how to unpack and set up under Apache 2.2's document root.

    root> cd /var/apache2/2.2/htdocs

    root> /usr/sfw/bin/gtar zxvf  <location of the downloaded tar ball>

    Let us go ahead and create a symbolic link of the unzipped media wiki tar ball to a valid name

    root> ln -sf mediawiki-1.11.1 mediawiki

     

    Finally, proceed to configuring MediaWiki and complete the rest of the MediaWiki configuration by visiting http://localhost/medawiki as mentioned under 'Further Configuration' section within MediaWiki web site. 

    Technorati Tags: webstack,opensolaris,mysql,php,mediawiki

    In addition to my day time job with  Sun Web Server 7 development,  I have recently got myself involved with Web Stack project that is responsible for integrating / improving the open source web tier technologies like PHP for Open Solaris.  As part of this project, we have now successfully integrated  PHP(version 5.2.4) with Open Solaris (Nevada) build 79b - aka known as Solaris Developer Express 01/08.  Finally, with SXDE 01/08, I believe that we are now one step closer to facilitate our customers choose SAMP stack for their development and production requirements.

    So, what is cool with this integration ? -

    • Includes tighter and built-in support for Apache 2 pre-fork MPM
      • Simply enabling Apache 2 SMF service is all is now required for developing PHP applications with your Web Server
      • For example
        • svcadm enable network/http:apache22
    • tighter integration with PHP NetBeans IDE and also includes popular 3rd party PHP extensions like APC, XDebug and DTrace
    • Includes out of the box support for commonly used PHP extensions like LDAP, SSL, SOAP, JSON, MySQL, PostgreSQL, PDO, XML, Zlib
    • PHP is compiled with Sun Studio compiler and includes necessary compiler optimizations to derive the best performance on Solaris.

     

    And what is not so cool ...

    • With the current integration, popular PHP extensions like IMAP, MCrypt are still missing. We are very hopeful of  integrating the currently missing PHP extensions integrations , in the order of user popularity, in the next coming months.
    • We all know that Open Solaris Developer Express 01/08 includes MySQL 5.0 database as well. However, due to a build issue, PHP is still looking for MySQL 4.0 client libraries instead of the default MySQL 5.0 client libraries. This issue is now resolved with Nevada build 83.  So, for now, here is a temporary work around to work around this issue
      • Open a terminal and become root from your Open Solaris box
      • Run the following command
      • ln -sf  /usr/mysql/5.0/lib/mysql/libmysqlclient.so.15.0.0 /usr/mysql/5.0/lib/mysql/libmysqlclient.so.12

     

    We very much want to hear your thoughts on what we did right and how we can improve. So, please consider joining Web Stack discussion forum.

    If this interests you, do give Solaris Developer Express 01/08 a spin and let us know. Instead of a stable build, if you would prefer to try out the latest and greatest, you can also check out - Open Solaris Community Express - (recent milestone build) . 

    Technorati Tags: ,,

    This blog copyright 2009 by natarajan