Liberty's initial use

1. Download wlp.zip package: Download: https://developer.ibm.com/wasdev/downloads/#asset/runtimes-wlp-javaee8

2, extract

3, start the cmd command:

Enter the  wlp/bin directory :(cd path_to_liberty是我自己的目录)

  • Where path_to_liberty is the location you installed Liberty on your operating system.

    For HP UNIX platforms For Solaris platforms For Windows platforms For IBM i platforms For LINUX platforms For AIX platforms For UNIX platforms

    cd path_to_liberty/wlp/bin

  • Execute the following command (server_name is to own their own applications from the name), server created usr liberty in your installation path / services below.
    For HP UNIX platforms For Solaris platforms For Windows platforms For IBM i platforms For LINUX platforms For AIX platforms For UNIX platforms

    server create server_name

    For example: server create myServer

    4, items labeled as war package, placed serverName created under the path dropins folder.
    5, change the port server.xml folder, consistent with your project path port

     

    <?xml version="1.0" encoding="UTF-8"?>
    <server description="new server">
     
        <!-- Enable features -->
        <featureManager>
            <feature>javaee-8.0</feature>
        </featureManager>
     
        <!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->
        
        <!-- For the keystore, default keys are generated and stored in a keystore. To provide the keystore password, generate an 
             encoded password using bin/securityUtility encode and add it below in the password attribute of the keyStore element. 
             Then uncomment the keyStore element. -->
        <!--
        <keyStore password=""/> 
        -->
        
        <!--For a user registry configuration, configure your user registry. For example, configure a basic user registry using the
            basicRegistry element. Specify your own user name below in the name attribute of the user element. For the password, 
            generate an encoded password using bin/securityUtility encode and add it in the password attribute of the user element. 
            Then uncomment the user element. -->
        <basicRegistry id="basic" realm="BasicRealm"> 
            <!-- <user name="yourUserName" password="" />  --> 
        </basicRegistry>
        
        <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
    	
    	<-! host configuration directory represents the ip address, if you do not configure the host, then the application can only be accessed through 127.0.0.1 ->
        <httpEndpoint ID = "defaultHttpEndpoint" Host = "*" 
                      httpPort = "9080" 
                      httpsPort = "9443" /> 
                      
        <-! the Automatically the expand the WAR and the EAR Files Files -> 
    <-! <applicationManager autoExpand = "to true" / > -> 
    	
    	<! - configured to publish the war package localtion represents the position of war, mo default apps directory pointing, 
    	as required in apps / war directory, then, will be replaced localtion war / test.war - > 
    	<file application ID = "the Test" LOCATION = "test.war" name = "the Test" type = "WAR" /> 
     
    </ Server>
    

      

     6, start and stop services from the command in cmd:

    server start serverName;

    server stop serverName;

Guess you like

Origin www.cnblogs.com/yatou-blog/p/12121165.html