Tuesday Feb 02, 2010

Web Server 7 Update 8 addresses critical Security Issues

Recently, Sun published Sun Alert for recently discovered security vulnerability within Sun Web Server and immediately released updates to Web Server 7 and Web Server 6.1 release train to address these discovered vulnerabilities. 

If you are running Sun Java System / iPlanet / Sun ONE Web Server, we strongly urge to upgrade to this latest update. 

Monday Jun 30, 2008

Installing Web Server 7 in enterprise data centers...

Large center deployments require the ability to simply layout the product binaries through automated data center tools like Sun N1 Service Provisioning System or  HP (formerly known as Opsware) Server Automation software . This allows server administrators managing large data center to replicate or provision new servers on need basis with very little overhead. 

Sun Java System Web Server 7 has always provided the ability to automate its installation through our silent state file mode. In this mode, web server 7 can non interactively layout the binaries as well as configure the installation in a single step. Sun N1 Service Provisioning System uses Web Server 7 silent state file based installation to provision servers in data centers.

However, some enterprise customers wanted the ability to simply layout Web Server 7 binaries and without actually configuring them. With  Web Server 7 Update 3, we have now provided the ability to simply layout our binaries - a typical requirement in data center based deployments using Opsware Server Automation center.  For this mode, a new state variable known as CONFIGURE_LATER  has been introduced. Now, once this variable is defined within the Web Server 7 state file , Web Server 7 installer will simply layout the binaries without configuring Web Server 7 administration server or an actual server instance. Customers will then need to run 'configureServer' to actually configure a server instance and administration server or node.

Here is a quick write up on how to do this.

  • Download Web Server 7 Update 3 from here and unpack the zip into a temporary location (say /tmp)
  • Now, you will need to create a state file as shown in our docs
  • Within this state file, also include another variable as 'CONFIGURE_LATER' and set it to True
  • Using this state file , you can now install to a given location without actually configuring an administration server or a server instance as shown below :
    • run ./setup -silent <statefile>  command from the command line
  • Once the installation is completed successfully, you can now non-interactively configure Web Server 7 with an administration node or server and a server instance. If you are confused as to what is this administration server or node, please check out this Understanding Web Server 7 guide for some back ground. 
  • Getting back to the topic on completing configuration for Web Server 7 , you can either choose to edit 'configureServer.properties' file found under under <install-root>/setup directory as shown in Configure Later  section. (Please remember to set WS_IS_JES to False ) . A sample configuration file is already created for you with all values filled within <install-root>/setup/configureServer.properties. You can feel free to customize this as well.
  • Finally, you can run the <install-root>/lib/configureServer script to complete the configuration as shown below
    • <install-root>/lib/configureServer -inputfile <config-file>
    • For example, if you installed non interactively under /sun/webserver7, then you would do something like below
      • /sun/webserver7/lib/configureServer -inputfile /sun/webserver7/setup/configureServer.properties -verbose -logfile /sun/webserver7/setup/configure.log

Note:  Please find attached a sample script for UNIX/Linux platforms to non interactively layout and configure the binaries . Feel free to download , read through and customize this script to suite your needs.

Friday Nov 02, 2007

Deploying PHP (from Cool Stack 1.2) with Sun Web Server 7


I am sure, some of you already used Cool Stack for  deploying your web application on Solaris. . If you haven't , then you might be very interested in knowing that Sun's Cool Stack highly optimizes various open source components like Apache 2, PHP5, Ruby, Light HTTPd so that these components can perform optimally on Solaris 10 or greater. Cool Stack engineering team has just released their latest release - Cool Stack 1.2 . If you would like to leverage the benefits of Solaris 10 and deploy your web applications (AMP stack) on Solaris, then kindly check out  Cool Stack 1.2 release from their web site.

I personally like PHP5 runtime bundled with Cool Stack 1.2 as it now includes FastCGI support besides having the ability to work with whole lot of databases like Oracle, MySQL, PostgreSQL etc.  Now, having FastCGI support within PHP5 runtime allows PHP applications to be deployed on top of web servers like Sun Java System Web Server 7 or with Apache 2 worker MPM.

Because of my involvment with Sun's Web Server 7 engineering , naturally I am very interested in finding out how to help our customers deploy their PHP application on top of Web Server 7 using Cool Stack's PHP runtime.  This way, customers can enjoy the performance benefit of using the highly scalable Web Server 7 with optimized Cool Stack PHP5 for their PHP based applications.


Here is a quick run through on the steps involved in deploying the Cool Stack's PHP runtime within Sun Java System Web Server 7

Installing and Configuring Web Server 7


-  If you haven't already, you can download and deploy Web Server 7 for free from here. You might also be interested in checking out the 'What's new in this release' to find out more about how this high performing and enterprise ready Web Server . Here is a useful  Screencast (if you would like to) and Getting Started guide.

- Now, me being a command line person, I am leveraging Web Server 7 Administration server's command line interface here. If command line is not your cup of tea, you can also use the administration GUI  (browser based) to do these steps.

Note: This below step is very much optional. Web Server 7 installation provides you with a default configuration. You can choose to use the already existing configuration, if you prefer so.

Let us start the Administration Server and create a new configuration cum instance here. For testing purposes, in this example, I am creating a new configuration to run this server at port 8080 on my local machine(sriramn)

/sun/webserver7> admin-server/bin/startserv

/sun/webserver7> bin/wadm create-config --user=admin  --http-port=8080 --server-name=sriramn.red.iplanet.com coolstack

/sun/webserver7> bin/wadm create-instance --user=admin  --config=coolstack sriramn.red.iplanet.com


Installing Cool Stack 1.2


- You will need to visit either Sun's Cool Stack web page or download the Cool Stack 1.2 release from here. (You will need to login Sun's Online Account to successfully download Cool Stack 1.2 release).

- In their downloads web page, you will need to select and download "Core Libraries (CSKruntime package)" and "Apache / PHP5 (CSKamp)" components.

Note: To successfully install Apache/PHP5 package on your system , you will need to download and install "Core Libraries(CSKruntime)" component as well. (Unfortunately, the downloads web page does not mention this information before hand. )

- Unzip the downloaded packages by doing some thing like

bunzip2 -f CSKruntime_1.2_sparc.pkg.gz
bunzip2 -f CSKamp_1.2_sparc.pkg.gz

Note: If you are using Solaris on Intel / AMD hardware, then you will need to download the "x86" version of these packages and accordingly the downloaded files will be 'CSKruntime_1.2_x86.pkg.bz2' and 'CSKamp_1.2_x86.pkg.bz2'

- You will need to become 'root' and install these packages by doing something like

For Solaris SPARC hardware

pkgadd  -d CSKruntime_1.2_sparc.pkg
pkgadd -d CSKamp_1.2_sparc.pkg

For Solaris x86 hardware:

pkgadd  -d CSKruntime_1.2_x86.pkg ( if you are using SolarisCSKruntime_1.2_x86.pkg if you are on Solaris x86)
pkgadd -d CSKamp_1.2_x86.pkg

Configuring Cool Stack 1.2 PHP with Web Server 7


- Once the package installs successfully, you could change your current directory and go to Cool Stack PHP5 installation location by doing some thing like 'cd /opt/coolstack/php5' on the command line.

- Within the Cool Stack 1.2 PHP5 installation location '/opt/coolstack/php5' , you should find a script with the name 'setup-ws7-php.sh'.   Now, run this script by doing some thing like
./setup-ws7-php.sh

and you should see a message box like this


Usage:

This script will configure Coolstack PHP with Sun Java System Web Server 7
Here, you will need to provide the top level location of your Web Server 7
installation and your Web Server 7 instance_name name to which this script
should configure to run PHP scripts.

Enter your Web Server installation location(/sun/webserver7) :


- Follow the setup by providing the appropriate Web Server 7 installation location on your system. Obviously, this needs to refer to the location where you installed Web Server 7.

- Later, this script will require you to provide you with an Web Server instance name .Web Server instance name translates to a directory under your installation location containing all the necessary configuration file necessary for running your web site. If you are using Java Enterprise System 5 based Web Server, then your instances will be under /var/opt/SUNWwbsvr7. 

- In our example, we will use the instance name 'https-coolstack' that was created using Web Server 7 Administration CLI at the beginning. If in case, you want to PHP enable a different instance, you can choose to provide another valid instance name here. The instance name that you provided to this script is now PHP enabled and now you can use Cool Stack 1.2 PHP within Web Server 7.

- Now, you should be able to start the Web Server 7 by doing some thing like

/sun/webserver7/https-coolstack/bin/startserv

- In our case, we are now ready to create sample php files under /sun/webserver7/https-coolstack/docs


Kindly give it a spin and let us know what you think and how we can improve and thanks a bunch for reading !

Saturday Oct 27, 2007

Web Server 7's world record results finally shows up SPECweb'2005 web site

It has been almost a month since Sun announced a world record on SPECweb'2005 benchmark using Sun SPARC T5200 hardware server and Sun Java System Web Server 7 Update 2. Since then , I have been wishing to compare our results with HP's ProLiant DL 580 server. Well, the results have finally shown up in SPEC's web site. Boy, am I not glad to see these results. You can checkout the results for yourselves and draw your own conclusions :-)

Tuesday Oct 23, 2007

How to setup FCKeditor web application within Web Server 7

Some one asked a question in our forum today as how to configure FCKeditor within Web Server. Now, if  you are wondering as to what is FCKeditor - FCKeditor is an open source WYSIWYG text editor that can be used within web pages and you can check out a demo from FCKeditor's web site.

Here, I will show how to leverage the JSP integration plugin that comes with FCKeditor and deploy it as a Java web application so that web programmers can simply invoke this nice WYSIWYG text editor within their JSP / JSTL pages without the complexity of using a Java scriptlets or the JavaScript API.

Okay, here we go -

- If you haven't already, you can download and install Sun Web Server 7 from here

- Now, me being a command line person, I am leveraging Web Server 7 Administration server's command line interface here. If command line is not your cup of tea, you can also use the administration GUI  (browser based) to do these steps.

Note: This below step is very much optional. Web Server 7 installation provides you with a default configuration. You can choose to use the already existing configuration, if you prefer so.

Let us start the Administration Server and create a new configuration cum instance here. For testing purposes, in this example, I am creating a new configuration to run this server at port 80 on my local machine(sriramn)

C:\\Program Files\\Sun\\WebServer7> admin-server\\bin\\startserv.bat

C:\\Program Files\\Sun\\WebServer7> bin\\wadm create-config --user=admin  --http-port=80 --server-name=sriramn.red.iplanet.com fckeditor

C:\\Program Files\\Sun\\WebServer7> bin\\wadm create-instance --user=admin  --config=fckeditor sriramn.red.iplanet.com

- Download the latest version of FCKeditor JSP Integration Pack from following this URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511

- Now, create and change to a new directory 'FCKeditor' in your system (say C:\\FCKeditor in my case) and use an appropriate tool to unzip the downloaded JSP Integration Pack from the following URL:

mkdir C:\\FCKeditor

cd  C:\\FCKeditor

unzip c:\\downloads\\FCKeditor-2.3.zip

Moving on - FCKeditor JSP Integration Pack that we just unzipped in C:\\FCKeditor, doesn't include the core of the editor. So, we will need to download the core FCKeditor (written using JavaScript) from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=75845

 So, download and unpack the content of the FCKeditor core files from the above URL inside "FCKeditor\\web" folder.

cd  C:\\FCKeditor\\web

unzip C:\\downloads\\FCKeditor_2.5b.zip 

The FCKeditor core zip file that we just unpacked under C:\\FCKeditor\\web creates another FCKeditor directory underneath containing the core files within 'editor' subdirectory. Since, we are interested only in this 'editor' subdirectory from this FCKeditor core zip file, let us move this 'editor' sub directory to JSP Integration Pack location (C:\\FCKeditor\\web in my case).

cd C:\\FCKeditor\\web\\FCKeditor

move editor C:\\FCKeditor\\web

Now, we will have to simply use Web Server 7 Administration Server to deploy this C:\\FCKeditor\\web as as web application within Web Server 7 with context root as 'FCKeditor' . Finally, start this server instance 'https-fckeditor' and point your browser to http://hostname/FCKeditor/_samples/index.jsp for the list of the samples.   

C:\\Program Files\\Sun\\WebServer7>bin\\wadm add-webapp --user=admin --uri=/FCKeditor --vs=fckeditor --file-on-server --config=fckeditor --directory=c:/FCKeditor/web c:\\FCKeditor\\web

C:\\Program Files\\Sun\\WebServer7>bin\\wadm deploy-config --user=admin fckeditor

C:\\Program Files\\Sun\\WebServer7>bin\\wadm start-instance --config=fckeditor sriramn.red.iplanet.com

Now, if you are a web programmer wondering for some tips on how to use this rich HTML text editor within your web page, please check out the FCKeditor's Developer Guide.

Please try it out and tell us what you think .

Monday Oct 15, 2007

Configuring multiple HTTP Listeners with Web Server

Some time back, I wrote a blog about how one can take advantage of Solaris 10 and make Sun Web Server 7 to run at port 80 as "non root" user. One customer, who probably read this blog, posted a follow up question on how to get multiple HTTP Listeners working with Web Server 7 and still run at port 80.  So, here is a follow up post on the same topic to help this customer.

Here is a step by step instruction to get this done

1. Download Sun Java System Web Server 7 from here

2. It is better to decide on the runtime user of your Web Server before actually installing Web Server on your system. On Linux systems, user used to simply choose 'nobody' as the runtime user of the Web Server.

With Solaris 10 or OpenSolaris , 'webservd' is a default user created by Solaris - so that Web Servers like Apache or Sun Java System Web Server 7 can leverage this as 'non root' user. On Solaris 10 or above, you can run the following command to configure a non root user like 'webservd' to run as non root and still listen at port 80.

# /usr/sbin/usermod -K defaultpriv=basic,net_privaddr webservd

3. Now, kick off Web Server 7 installation and at the time of installation, you will need to choose Web Server 7 runtime user as 'webservd' or whatever the user you chose in the above step.

4. Web Server 7 installer creates a default HTTP listener (most likely the default port number is 80) and a default configuration with the same name as your 'hostname' . This should allow your web site to run at port 80.

5. Now, if you would like to configure multiple HTTP listeners so that your web server can respond to requests like

http://<hostname> or http://<hostname>:8080  or https://<hostname> or http://<hostname>:82 etc

then all you need to do simply configure more HTTP listeners. If you are new to Web Server 7, check out Getting Started and Managing Configurations link to get you started.

6. For simplicity , let us use Web Server 7 CLI to get this job done

 

/sun/webserver7/bin/wadm create-http-listener --user=admin --server-name=<hostname> --listener-port=82 --default-virtual-server-name=<hostname>  --config=<hostname>

/sun/webserver7/bin/wadm deploy-config --user=admin  <hostname>

 

 

Now, your Web Server can listen to HTTP requests comming in at both 80 as well as 82.

Wednesday Oct 10, 2007

Quercus 3.1.2 with Web Server 7

Thanks to Caucho Technology's Quercus (a complete PHP runtime in Java), now In less than 5 minutes, one can get a PHP page deployed using Web Server 7. Check out this article to see how simple and easy it is with Web Server 7.

Tuesday Oct 09, 2007

Cruising with Web Server 7 and Sun SPARC T5200

  Today (9th Oct'07) morning - we got a Niagara 2 based server to our lab and with the help of our lab guys, we booted up this ultra cool Ultra SPARC T2 processor based Sun SPARC Enterprise T5220 server. Bringing up the server was totally a breeze - very much like Sun Fire T2000.

  Like every one else, I was sure curious as to what we got here. So, once I logged in, I ran 'uname -a' and 'psrinfo' commands to find out the OS version and the processor information. Here is the sample output.- telling me that we have a 1 socket server with 64 virtual processors (translates to a 8-core with 8 thread / per core CPU) and Solaris 10 Update 4 comes pre-installed on this server.

[root@accel]'~'>uname -a
SunOS accel 5.10 Generic_120011-12 sun4v sparc SUNW,SPARC-Enterprise-T5220

[root@accel]'~'>/usr/sbin/psrinfo -pv
The physical processor has 64 virtual processors (0-63)
  UltraSPARC-T2 (cpuid 0 clock 1417 MHz)



Being a Web Server engineer, I couldn't stop myself installing the latest Web Server 7 release -  Sun Java System Web Server 7 Update 1 on this beauty and run some quick and very basic performance runs just for the heck of it.

As you might already know, Solaris 10 bundles Apache HTTPd 2 server. I decided to use this simple but efficient performance benchmarking client - 'ab'  and  run a very simple performance test against Web Server 7.0.  So, here we go - hitting the default home page that comes with Web Server 7 (a static 'index.html')

[root@accel]'~'>  /usr/apache2/bin/ab -c 20000 -k http://accel.red.iplanet.com/index.html
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking accel.red.iplanet.com (be patient).....done

Server Software:        Sun-Java-System-Web-Server/7.0
Server Hostname:        accel.red.iplanet.com
Server Port:            80

Document Path:          /index.html
Document Length:        12038 bytes

Concurrency Level:      20000
Time taken for tests:   0.1712 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Keep-Alive requests:    1
Total transferred:      12297 bytes
HTML transferred:       12038 bytes
Requests per second:    584.11 [#/sec] (mean)
Time per request:       34240.000 [ms] (mean)
Time per request:       1.712 [ms] (mean, across all concurrent requests)
Transfer rate:          7009.35 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     1    1   0.0      1       1
Waiting:        1    1   0.0      1       1
Total:          1    1   0.0      1       1


Not bad huh - supporting 20,000 simultaneous connections and delivering 584 requests per second (though for a very simple static HTML page). Unfortunately, the stress client that I was using - 'ab' , had some limitations and I had to restrict myself to 20,000 simultaneous connections. Some other day, I will try this again with Faban - open source next generation benchmark runtime and see how far I can juice this workhorse for such simple static HTML pages.

Looks like, if you got Ultra SPARC T2 processor based Sun SPARC Enterprise T5220 server and a highly scalable web server on the market like Sun Java System Web Server 7, you sure could be cruising and saving a lot of money in your data center.

Web Serving with Sun's Web Server 7 and Ultra SPARC T2


Today (9th Oct'07), Sun announced the ultra cool  Ultra SPARC T2 processor and the availability of Sun SPARC Enterprise T5220 server running on this processor. Also, if you haven't heard already, you might be interested in knowing that Sun's Web Server - Sun Java System Web Server 7 - posted world record in SPECweb'2005 running on this eco friendly Sun SPARC Enterprise T5220 workhorse. You can get more information on this milestone from here and here.  Interested in hearing more about this ultra cool Ultra SPARC T2 (internally called as Niagara 2) processor, checkout  CMT Comes of Age
 link.


 
 

Wednesday Feb 07, 2007

Simplest way to run 'PHP' with Sun Java System Web Server 7.0

Hey
 Are you one of the many millions of web developers developing web sites using PHP ? In that case, you might be interested in knowing that  PHP Add-on 1.0 bundle (PHP 5.2.0 based binaries with FastCGI and NSAPI plugin support) for Sun Java System Web Server 7.0 comes up with a setup script that takes away all the pain in configuring PHP with Sun Java System Web Server 7.0 - Sun's latest Web Server release. 
 
 So, if you are interested in developing or deploying PHP on top of highly scalable Web Server that comes with clustering and monitoring supports, then this is what you can do
  1. Download Sun Java System Web Server 7.0, if you haven't already
  2. Install Web Server 7.0 in your machine.
  3. Download the Sun Java System Web Server 7.0 PHP Add-on 1.0 (PHP pack to work with Sun Java System Web Server) 
  4. Now, cd to <Web Server Install Root>/plugins directory
  5. Let us 'unzip' the downloaded PHP Add-on zip bundle by doing something like
            unzip phppack-5_2_0-<OS-platform>.zip

Now, cd to <Web Server 7.0 Install Root/plugin/php> directory and run the 'setupPHP' with the instance name as the argument. This instance will be now configured to execute 'PHP' scripts.               

Example:

setupPHP <https-foo> where foo will be the name of the instance that you want to execute PHP scripts.

Since this script (setupPHP) makes some changes to your instance's configuration files, Web Server 7.0 administration server will need to be told about it. The way to do this either through 'pull-config' CLI command or through GUI.

Features that I liked in this Add-on

  • Includes 64-bit PHP binaries for Solaris platform where Web Server 7.0 also supports 64-bit . So, if you are interested, you can configure this Add-on as an NSAPI plugin and run Web Server + PHP in 64-bi
  • If I am not mistaken these bits are not officially supported by Sun but still  some amount of  internal testing has been performed on these bits with Web Server 7.0. So, we can expect to not see whole bunch of crashes happening every where
  • Last but not least - configuring PHP with Web Server 7.0  is finally a breeze !

For example, this is what I did on my Windows laptop

Note: Please refer to my earlier blog on how to save the Web Server 7.0 Administration password within a file. You will need this to follow the below steps that I have given here. Without this, you will need to type the password for every command.

Start the 7.0 Administration Server:

C:\\Program Files\\Sun\\WebServer7> admin-server\\bin\\startserv.bat

Create a new configuration and instance to execute all the PHP scripts under :

C:\\Program Files\\Sun\\WebServer7> bin\\wadm.bat create-config --user=admin --password-file=.password --http-port=8082 --server-name=sriramn php
CLI201 Command 'create-config' ran successfully

C:\\Program Files\\Sun\\WebServer7> bin\\wadm.bat create-instance --user=admin --password-file=.password --config=php sriramn.red.iplanet.com
CLI201 Command 'create-instance' ran successfully

Unpack the download phppack for Web Server 7.0 under 'plugins' directory

C:\\Program Files\\Sun\\WebServer7> unzip c:\\downloads\\phppack-5_2_0-windows.zip

Invoke the PHP Add-on installer :
 
C:\\Program Files\\Sun\\WebServer7> cd plugins\\php

C:\\Program Files\\Sun\\WebServer7\\plugins\\php>setupPHP.bat -instancename=https-php


- Now, let us verify if you are able to execute PHP scripts. So, let us write a quick one like

<?php
 echo phpinfo();
?>

and save this one with the name under 'info.php' under your server's document root directory

- Start the instance (https-php\\bin\\startserv.bat) and try accessing the info.php web page

- If you are satisfied with what you see, then you can bring over these recent configuration changes into Administration Server's configuration repository by running the following command



C:\\Program Files\\Sun\\WebServer7\\plugins\\php>cd ..\\..\\

C:\\Program Files\\Sun\\WebServer7>bin\\wadm.bat pull-config --user=admin --password-file=.password --config=php sriramn.red.iplanet.com
CLI201 Command 'pull-config' ran successfully



- Now, use your favorite browser to access 7.0 Administration Console  (https://<HOSTNAME>:<PORT>;)

- At the top right, you will see something like 'Deployment Pending'. Click this button

- This should open a pop up window and provide you with 2 choices
    - first one is when you want to bring over the configuration changes that already exists in the administration server's configuration repository but needs to brought down to an instance.
    - second one is when you have made some changes to your local instance either by manually editing the configuration files or by running scripts like 'setupPHP' and you want administration server configuration repository to know about this.

- In this case, we will select the 2nd radio button as our choice, and click 'Deploy'.

- If you are thinking of going live with these bits, then you defintely want to configure a 'php.ini' under '<WebServer Install Root>/plugins/php' directory. The Add-on does come with the standard 'php.ini-dist' and 'php.ini-recommended' for reference purposes.  Please take time to create a php.ini that suites your needs.

Please let us know as to what you think. As usual, you can post your experiences and pain points to our Forum


Wednesday Nov 22, 2006

PHP and MediaWiki on Web Server 7.0

If you are interested in running PHP based web sites like MediaWiki with Web Server 7.0 (formerly known as iPlanet or Sun ONE Web Server) , check out recent article : Deploying MediaWiki on Web Server 7.0

[Read More]

Monday Sep 25, 2006

Article on deploying JSPWiki to Sun Java System Web Server 7 Technology Preview release

      After a long delay,  my introductory article on how to configure / deploy JSPWiki to Sun Java System Web Server 7.0 has finally gone alive. Developers and administrators who are new to Sun Java System Web Server 7.0 might find this helpful.
    I guess, what is missing , as critics already pointed out, is how to connect the dots between JAAS (Java Authentication and Authroization service) that comes with JSPWiki 2.4 release and Sun Java System Web Server 7.0's security infrastructure. I will need to figure this out and probably publish a follow up on my earlier article.
 Any comments / criticisms are as usual more than welcome .

Cheers

Sunday Jul 30, 2006

Developing and deploying 64-bit NSAPI plugins on top of 64-bit Sun Java System Web Server 7

Well, one of the many features of Sun Java System Web Server 7 is the support of 64-bit on Solaris (both SPARC and AMD64 platforms). Also, with the upcoming beta release of Sun Java System Enterprise Server 2006Q4(JES5) both  Sun Java System Portal Server and Sun Java System Access Manager will be able to leverage the 64-bit Web Server.  If in case, you haven't heard, Sun Java System Web Server 6.1 64-bit holds the world record for maximum number of simultaneous connections during SpecWeb 2005 benchmark. So, there are lot of potential benefits of moving over to 64-bit Web Server.

[Read More]

Tuesday Jun 27, 2006

Installing NSAPI plugins on top of Sun Java System Web Server 7

If some one ever asks me the most primary reason for the success of Firefox and Thunderbird, I guess, I would probably vote for  'Add-ons' . Some of the extensions that I use with Firefox / Thunderbird are almost life saving  for my day to day work that switching sounds almost inconcievable.   To me, the ability to have your customers extend the product to better suite their business is such a powerful thing !.

Almost, most popular products today support such an ability and Sun Java System Web Server  has the ability to extend as well. Hope, this is not news to most of the readers considering that we have had this support for quite a long time .

Well, the way extensions work with our Web Server is through something called as NSAPI plugins. For the curious one's, wanting to know more about how our extensions / plugins work with Web Server, check out Developer Programmer Guide. where in one will find necessary API's to learn , use so as to develop custom NSAPI plugins.

As far as I am aware of, there are quite a number of very popular NSAPI plugins like Reverse Proxy Plugin (bundled within Web Server 7 Technology Preview) , Sun Java System ASP ServerNSAPI plugin for PHP , Weblogic Plugin currently running on top of Sun Java System Web Server.  Also, may I recommend you to check out this article on Sun Java System Web Server use cases describing how well NSAPI plugins can be utilized to solve your business needs.

Considering that, it has been a long day for me and my wife, who keeps tab on me these days as to what time I go to bed, I am not going to go in detail as to how to write a NSAPI plugin / extension or when would you want one. I guess, that can wait for some other day.  For now, let us concentrate on how to install these NSAPI plugins (most likely 3rd party) on top of Sun Java System Web Server 7

Assuming that you have some basic idea on what NSAPI plugin is, let me just concentrate on how to install your favorite NSAPI plugins on top of Sun Java System Web Server 7.

First things first - any 3rd party NSAPI plugins that worked with our previous versions of our Web Server also known as Sun ONE Web Server, Netscape Enterprise Web Server should continue to work with Sun Java System Web Server 7 Technology Preview as well.  I am sure, that must be a relief but the catch is your plugin provider might not yet officially support  this new release (or not yet officially released !) from Sun.  Until then, I am afraid, you might be on your own !.
 
Also, Web Server 7 will not support any 3rd party NSAPI plugin migration from previous versions. Also, we do not have any GUI or Command Line (CLI) support to configure these 3rd party plugins.  So, if you are a web server admin or 3rd party NSAPI plugin developer, wondering how to hack your current NSAPI plugin on top of Sun Java System Web Server 7,  here are few thing to keep in mind

  • Sun Java System Web Server 7 has introduced the notion of 'configurations' and internally stores these configuration within internal repositories so as to allow deploying either to single or cluster mode environment.
  • Sun Java System Web Server 7 has rich CLI and introduces commands like 'get-config-file' , 'set-config-file' or 'pull-config' to make any manual changes made to the server's configurations can be made aware to administration server configuration repository.
  • Unless you make Web Server 7 Administration server make aware of any manual configuration changes made to your configuration / instance, you will not be able to deploy any new set of configuration changes through Administration Server.
Considering the above issues, this is what I would do to install a 3rd party NSAPI plugin like PHP on top of Web Server 7
  • Start Web Server 7 Administration Server
  • modify 'magnus.conf' , 'mime.types', 'obj.conf' as mentioned in your plugin documenation.
  • use Web Server 7 Administration Server CLI as follows
bin/wadm pull-config --user=admin --port=8989 --config=CONFIG  NODE

where CONFIG is the configuration that you are currently working on.
and      NODE is the host name of the machine in which you want this change to apply to.

In most cases, NODE and CONFIG will the fully qualified  hostname (hostname.domainname) of your current system 

Well, the easy way to find out the configurations is to do something like
bin/wadm list-config  --user=admin --port=8989 --config=CONFIG

For folks interested in venturing into advanced scenarios, read below :

In some situations (if you have lot of web applications or search collections configured within your server instance, then you might notice that running the above mentioned 'pull-config' might take little longer. In that case, there is this command that one can try it out  (assuming you haven't started the NSAPI plugin configuration yet)
  • Start Web Server 7 Administration Server
  • Run the following CLI command
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG  magnus.conf  > /tmp/magnus.conf
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG mime.types  > /tmp/mime.types
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG obj.conf  > /tmp/obj.conf
  • Now, manually make changes to /tmp/magnus.conf, /tmp/mime.types, /tmp/obj.conf changes as mentioned within your plugin provider documentation to configure this 3rd party plugin
  • Once all done, run the following command
bin/wadm set-config-file  --user=admin --port=8989 --config=CONFIG  --upload-file=/tmp/magnus.conf magnus.conf
bin/wadm set-config-file  --user=admin --port=8989 --config=CONFIG  --upload-file=/tmp/mime.types obj.conf
bin/wadm set-config-file  --user=admin --port=8989 --config=CONFIG  --upload-file=/tmp/obj.conf  mime.types

If in case, you have read through the whole section and found it useful, please feel free to send me your rants, comments etc.

Cheers



About

Sharing what little I know

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today