Installation and Startup


Documentation / Administrator Docs / Developer Docs / Index

This document has the following sections:

Before Installing JavaServer

The Java Web Server 1.0 product ships with the JRE (Java Runtime Environment) 1.1.2. You do not have to install the JDK (Java Development Kit) on your computer.

Installing on Unix

  1. Download the JavaServer compressed tar file from the JavaServer web site. Instructions for doing this are available at the site.

  2. Move the compressed tar file to the directory where you want to install the JavaServer software.

    NOTE: The JavaServer can be installed in any directory in your system.

  3. Uncompress the tar file and remove the .Z extension. Enter:

    The tar file is now ready to be installed.

  4. Install the contents of the tar file. Enter:

    This creates a directory called JavaServer1.0, which contains the product release. The JavaServer1.0 directory is also called the server_root. This term is used to throughout the JavaServer documentation.

After you have finished installing the JavaServer you can delete the tarfile, if you wish.

Installing on Windows95 and Windows NT

  1. Download the JavaServer self-extracting .exe file from the JavaServer web site. Instructions for doing this are available at the site.

  2. Move the self-extracting .exe file to the directory where you want to install the JavaServer software.

    NOTE: The JavaServer can be installed in any directory in your system.

  3. Double-click on the .exe file to extract the JavaServer files into it.

  4. Follow the instructions in the Setup program to install JavaServer in a directory location on your hard disk. By default, Setup installs JavaServer in C:\JavaServer1.0. The JavaServer1.0 directory is also called the server_root. This term is referred to throughout the JavaServer documentation.

  5. If you are installing on Windows NT, a question will be asked by InstallShield if you want to install the NT Service application. If you click yes, an entry will be added to the Control Panels -> Services and the JavaServer will be started up automatically. If you click no, no entry will be made and you can still start up the NT Service as described in Starting automatically on Windows NT.
After you have finished installing the JavaServer you can delete the temporary directory, if you wish.

Environment Variables in JavaServer

Because the JavaServer 1.0 ships with a JRE, no environment variables are necessary or significant. Specifically the CLASSPATH and the JAVA_HOME environment variables are ignored. The default class path will always have the classes subdir in the server_root directory included.

Starting the JavaServer

There are two ways to start the JavaServer:

Starting Manually on Unix

  1. Enter:

    For example, to run the server as a background process (listening on the default port 8080), enter:

  2. Connect to the server by displaying the default home page.

Starting Manually on Windows 95 and Windows NT

  1. Enter:

    For example, to run the server (listening on the default port 8080), from the MS-DOS shell, enter:

    Note: The source file for httpd.exe is called httpd.c, and is located in the bin directory. If you want, you can edit httpd.c and then recompile it.

  2. Connect to the server by displaying the default home page.

Starting Automatically on Solaris

On Solaris systems, you can set up JavaServer to start whenever your machine boots.

The server_root/etc/java-server.startup shell script is a standard /etc/init.d style script. Read it for installation directions. This requires setting two environment variables (pointing to the Java runtime environment and the server_root/etc/java-server.startup directory).

Starting Automatically on Windows NT

The Windows NT service application $HTTP_HOME/bin/httpsvc is generally installed during the JavaServer installation using the InstallShield facility. Once it is installed, you can start it automatically by rebooting your machine. Rebooting sets up your system so that each subsequent reboot automatically starts the JavaServer.

If you do not initially set up the JavaServer as a system service using InstallShield, but later want to make it an automatic system service, follow these steps:

  1. Make sure you have administrator privileges.
  2. Run the following command

    C> httpdsvc JavaWebServer install
The automatic startup of system services applies only to Windows NT, versions 3.5.1 and 4.0. Windows95 does not support the automatic start up of system services.

Starting the JavaServer On Port 80

To use JavaServer as the default World Wide Web server for your machine, you will need to change the port number to port 80. Please follow these steps for that.

After you have started the JavaServer, you can connect to the server by displaying the default home page.

Stopping the JavaServer

Stopping the JavaServer On a Unix Machine

To stop the JavaServer you must first locate the process number that it is running under, and then kill the process. The JavaServer actually runs as two processes:

To stop the JavaServer, follow these steps:

  1. Find the process number for both processes by typing:

    % ps -eaf

  2. Once you have located the process numbers, kill them by typing:

    % kill process_number process_number

This stops the JavaServer from running on your machine. To start the JavaServer again, see Starting the JavaServer.

Stopping the JavaServer on a Windows95 Machine

To stop the JavaServer running on a Windows95 machine:
  1. Select the DOS window where the JavaServer is running.
  2. Hit Control-C.

Stopping the JavaServer on a Windows NT Machine

To stop the JavaServer running on a Windows NT machine:
  1. Click on the Control Panel.
  2. Click on Services. This displays a list of the services running on your machine.
  3. Select the JavaServer service.
  4. Click on Stop.

To restart the JavaServer service, follow the directions above and click on Start.

Removing the JavaServer

Removing JavaServer From a Solaris Machine

The JavaServer does not have a de-install script to remove the JavaServer files from your machine. To remove the JavaServer files manually and de-install the JavaServer, type:

  1. % cd server_root

  2. % rm -r *

Removing JavaServer from a Windows Machine

  1. Remove the JavaServer by hand (only on Windows NT 3.5.1 or 4.0). Type:

    C> cd JavaServer1.0\bin
    C> httpdsvc JavaWebServer remove

  2. If Windows NT 3.5.1. Type:

    • Double-click on the UnInstall icon from the JavaServer program folder.

  3. If Windows 95 or Windows NT 4.0. Type:

    • Click on the Control Panel.
    • Click on Add/Remove Programs.
    • Highlight on the Java Web Server entry in the window and then click on Add/Remove.

Displaying the Default Home Page

After you have started the server, you can display the default JavaServer home page by entering the following URL:

http://Server_Host_Name: port /

where Server_Host_Name is the name of your machine and port is 8080 by default. (For example, if your machine is named galaxy, http://galaxy:8080).

On Windows 95 and Windows NT platforms, the Server_Host_Name is the name assigned to your computer, as specified in the Network control panel. To find this name:

  1. Open the Network control panel

  2. Click on Identification. Use the name supplied in the "Computer name" field for the Server_Host_Name.

To set up your own web site, use your normal web authoring tools to change the default home page. Then tell your clients about your site!

Using JavaServer Administration

To use the JavaServer Administration feature:

  1. From the default home page (on port 8080) click on the link labeled Administer the Web Server.

    Note: You can also connect to the Administration Tool by typing its URL. For example, if the host name for your JavaServer is bagua, then you enter the URL http://bagua:9090/index.html.

  2. Login using the default user name admin and the default password admin

Once you have logged in, you'll want to change the password for the default "admin" account. For more information on using the JavaServer Administration, see the Administration Contents page.

NOTE: Most server properties can be changed without needing to restart the server. However, if you change the default port, you must restart the server. To change the default port number, use the Basic Setup page.

Changing Your Admin Password and Default Port

Once you have installed the JavaServer on your system and logged in to the Administration Tool, it is recommended that you take the following two steps to provide additional security for your JavaServer:

If You Have Lost Your Password

If, by chance, you change your Administration password and then forget it and can no longer get access to the JavaServer Administration Tool, you can recover by following these steps:
  1. Stop your JavaServer.
  2. In your favorite text editor, open the file

    server_root/realms/data/adminRealm/keyfile

  3. Change the admin line there so that it reads:

    admin::YWRtaW4=

  4. Save the file.
  5. Restart your JavaServer.

Setting up JavaServer to Use SSL

The Secure Socket Layers (SSL) protocol is only implemented on the US Domestic releases of the JavaServer for the Solaris/SPARC, Windows95, and Windows NT platforms.

For other platforms, and for other countries, please download the Solaris global version of the software, which does not have SSL.

For information on setting up JavaServer to use SSL, see Using SSL with JavaServer.

Using the Documentation

Documentation for the JavaServer (in HTML format) is installed in the system/doc directory. The API documentation is installed in /system/doc/apidoc/packages.html.

To display the documentation, enter the following URL:

You can also display the documentation by:

  • Clicking "Help" from any of the Server Administrator screens.

  • Visiting the JavaServer web site at http://www.javasoft.com.

    Any future updates to the documentation, especially the FAQ and bug information, will be posted to the JavaServer web site.


    Top
    java-server-feedback@java.sun.com