Available Distribution Packages

Pivotal Web Server is split into the following two distribution packages to simplify the installation and deployment to your datacenter:

pivotal-web-server: Base package entirely sufficient for all production environments.

pivotal-web-server-devel: Supplemental package that developers can use to compile and link http modules with the same headers and libraries as httpd itself using the httpd- 2.4 /bin/apxs tool. This package requires that you also install the base package.

Prerequisites

Install the Pivotal repository RPM, which makes it easier for you to browse the Pivotal RPMs, including the Pivotal Web Server RPM. You install the Pivotal repository RPM on each RHEL computer on which you want to install one or more Pivotal products, such as Pivotal tc Server.

On the RHEL computer, start a terminal as the root user.

Install the Pivotal repository RPM using the following wget command, passing it the appropriate URL. The URL differs depending on the version of RHEL you are using.

Important: You must run the entire wget command on a single line. Be sure you include the | sh at the end, or the RPM installation will not work.

Procedure

Download the Web Server RPM file to a directory on your computer. The RPM file is called pivotal-web-server-version.architecture.rpm.

Start a terminal and change to the directory in which you downloaded the RPM.

Execute the following rpm command to install Web Server:

prompt# rpm -ivhf pivotal-web-server-version.architecture.rpm

In the previous section, see What the yum install command does for post-installation information, such as the installation directory. (The yum install command corresponds to the rpm command in this procedure.)

Unix - Install Pivotal Web Server from a Self-Extracting ZIP

You can install Pivotal Web Server on Unix computers with a self-extracting ZIP file that you download from the Pivotal Web site. Self-extracting zip files expand themselves, or you can use unzip if your platform supports it. Using unzip explicitly enables you to specify options in addition to what is executed by default when the ZIP self-extracts.

Prerequisites

If you want to use unzip so you can specify additional options, but your platform does not support unzip, obtain an unzip command.

If your operating system is configured to support only 64-bit operation, an external unzip utility is required. Do not use the jar utility to unpack these zip files, because the file system permissions will not be unpacked correctly.

Be sure you have installed Perl on your computer, and that it is at least version 5.8. Pivotal recommends that you run the Perl script (described in the procedure) in multibyte character encoding such as UTF-8, especially if you are an international customer.

Procedure

Log in as the root user on to the Unix computer on which you want to install Pivotal Web Server.

Create the directory in which you will install Pivotal Web Server. For example:

Download the appropriate Pivotal Web Server self-extracting ZIP, and place it in the directory you created.

Be sure to choose the correct Unix operating system and chip architecture. For example, the file to install Pivotal Web Server on a 64-bit Linux platform is pivotal-web-server-version-x86_64-linux-glibc2.zip.sfx.

From your terminal window, change to the directory in which you downloaded the ZIP file:

prompt# cd /opt/pivotal

If necessary, change the permissions of the downloaded ZIP file to make it executable:

Prerequisites

You must use Windows PowerShell 2.0 to execute the Pivotal Web Server scripts on Windows computers. Most recent Windows versions have PowerShell installed by default, but some older versions of Windows do not. To check whether your version of Windows has PowerShell installed, go to Start > All Programs > Accessories and check for Windows PowerShell in the list.

Start PowerShell from the Start Menu as an Administrator by opening Start > All Programs > Accessories > Windows PowerShell, then right-clicking on Windows PowerShell and selecting Run as Administrator. A PowerShell window starts.

Check the current PowerShell setting by executing the following command:

PS prompt> Get-ExecutionPolicy

If the command returns Restricted, it means that PowerShell is not yet enabled. Enable it to allow local script processing at a minimum by executing the following command:

PS prompt> Set-ExecutionPolicy RemoteSigned

You can choose a different execution policy for your organization if you want, as well as enable PowerShell using Group and User policies. Typically, only the Administrator will be using the Pivotal Web Server scripts, so the RemoteSigned execution policy should be adequate in most cases.

Procedure

From the Windows computer on which you want to install Pivotal Web Server, log in as the Administrator user.

Start PowerShell from the Start Menu as an Administrator by opening Start > All Programs > Accessories > Windows PowerShell, then right-clicking on Windows PowerShell and selecting Run as Administrator. A PowerShell window starts.

Create the directory into which you will install Pivotal Web Server. Do not create a directory name that contains spaces. For example:

Download the appropriate Pivotal Web Server self-extracting ZIP, and place it in the directory you created.

Be sure to choose the correct architecture (32- or 64-bit). For example, the file to install Pivotal Web Server on a 64-bit Windows platform is pivotal-web-server-version-x64-windows.zip.exe.

Execute the downloaded *.zip.exe file to self-extract the files into the directory you created. You can do this, for example, by opening Window Explorer, navigating to the directory, and double-clicking on the *.zip.exe file.

When the extraction completes, the Pivotal Web Server files are located in the webserver subdirectory.

From your command window, change to the main Pivotal Web Server directory:

PS prompt> cd c:\opt\pivotal\webserver

Run the fixrootpath.ps1 PowerShell script to correct the root paths:

PS prompt> .\fixrootpath.ps1

Create a symbolic link from the existing httpd- 2.4.version directory to one called httpd- 2.4 , where version refers to the minor version and architecture of Pivotal Web Server.

PowerShell does not include mklink intrinsically, so you must use the command cmd /c mklink. For example, to use the 64-bit edition of Pivotal Web Server, run the following command:

Description of the Pivotal Web Server Installation

The main Pivotal Web Server directory structure, although similar in many ways to the standard Apache HTTP directory layout, differs from it in a very fundamental way: Pivotal Web Server separates the runtime binaries from the configuration data.

To implement this separation, you use the newserver command to create a Pivotal Web Server instance that lives in a subdirectory of the main Pivotal Web Server home directory. The name of the instance is the name of the new subdirectory. You then configure this instance as you want, using the standard Apache httpd files in the server-name/conf directory, such as httpd.conf.
Note:
Perform all configuration work inside the server instance (server-name/conf) directory. Never modify any files under the binary directory (such as httpd- 2.4).

Keeping the runtime binary files apart from the files that are configured by administrators or end users makes it easier to upgrade or apply patches to the code without the risk of overwriting or corrupting user data. It also enables administrators to run multiple server instances independently.

Directly after installing Pivotal Web Server, you see the following files and directories:

After you use newserver to create a new Pivotal Web Server instance, the command creates a new directory that contain a separately configurable instance of Pivotal Web Server. An instance is a complete, discrete server configuration. You can create multiple instances. You can run multiple instances at the same time if you are careful not to use the same ports in two different instances. For example, the default HTTP listening port is 80, and only one instance on any computer is allowed to communicate on port 80 at any one time. So if you wanted to have two Pivotal Web Server instances running at the same time on the same computer, you would configure one instance to use a port other than 80.

Each instance directory contains subdirectories that contain all the data required to run a given Pivotal Web Server instance. This includes configuration data as well as all other data that is associated with that instance’s configuration. For example, assume you installed Pivotal Web Server in /opt/pivotal/webserver and create an instance called myserver:

The conf directory contains the Pivotal Web Server configuration files, such as httpd.conf. The bin directory contains the startup script used to start and stop the myserver instance (httpdctl). Each of these directories is specific to the myserver instance. Each instance that you create has a similar set of directories.