Deploy PHP applications
We can use the various qualities of service of Intelligent Management product to manage PHP-based applications in addition to Java EE 5 applications.
- Create a PHP deployment target by creating either a PHP dynamic cluster or a PHP server. Verify that we can start the deployment targets. For more information read about creating PHP servers and PHP dynamic clusters.
- Prepare the PHP application to be deployed. Your PHP application consists of an archive file and optional setup or clean-up scripts. The supported archive file types are zip, tar, tar.gz, tar.tgz and jar. The optional scripts run for each server on which the application is deployed. The setup script runs during the application installation, and the clean-up script runs when you uninstall the application to remove any residual artifacts. The setup scripts can include commands such as setting file permissions and creating or deleting directories.
We can experience the same qualities of service that the product provides for Java EE 5 applications for PHP applications.
- Navigate to the PHP application wizard. In the administrative console, click Applications > Install new middleware application. Choose the PHP application type, and click Next.
- Specify the location of the application archive, setup, and clean-up scripts.
- Specify installation options, including the application name, edition, and edition description. The application name must be unique among all of the applications that are deployed in the cell, including applications that are other types, such as Java EE 5 or unmanaged Web applications.
- Define the deployment properties of the application.
- Specify the context root and virtual host information for the application.
- Choose the servers and clusters on which the application runs by selecting deployment targets. Choose PHP servers or PHP dynamic clusters. We can filter the list of deployment targets by only clusters, only servers, or by entering a name. Click Add or Remove to specify which servers and clusters run the application.
- For an unmanaged Web application with multiple modules, click Apply to add the module and deployment targets to the module list.
- Confirm the new PHP application, and save the changes. The application archive expands and the setup script runs.
- Start the application. With middleware applications, applications start when you start the PHP server in the administrative console. Click Servers > Server types > PHP servers. Select the servers that you chose as deployment targets, and click Start. We can also start the application from Applications > All applications in the administrative console. However, doing so from this panel will start all the servers associated with this application. The same rule applies if you stop PHP applications from this panel.
ResultsYour PHP application runs on the defined PHP deployment targets. If we deployed the application to a PHP dynamic cluster, then the dynamic cluster can add or remove PHP servers as needed.
What to do nextDefine service policies and routing policies for the application. All application edition manager functions are available. When you roll out a new edition, the clean-up script from the first edition runs, the application archive of the new edition is expanded, and the setup script of the new edition runs.
Restriction: Only one active edition of a PHP application is supported on a node. If we have multiple active editions of the same PHP application, ensure that the editions are not deployed to servers that are on the same node.
Deploy applications with defined service levels Define a service policy Deploy and managing application editions with Intelligent Management Create PHP servers and PHP dynamic clusters
Intelligent Management: middleware application administrative tasks Intelligent Management: middleware server creation administrative tasks