Centos7下IBM WAS Liberty轻量化中间件安装部署教程

1、准备工作

OS:CentOS Linux release 7.5.1804 (Core)

下载地址:
https://developer.ibm.com/wasdev/downloads/#asset/runtimes-wlp-javaee8

JDK
官网下载安装jdk1.8

Nginx
http://nginx.org/en/download.html

2、安装Liberty

安装JDK

[root@k14 ~]# rpm -ivh jdk-8u121-linux-x64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:jdk1.8.0_121-2000:1.8.0_121-fcs  ################################# [100%]
Unpacking JAR files...
    tools.jar...
    plugin.jar...
    javaws.jar...
    deploy.jar...
    rt.jar...
    jsse.jar...
    charsets.jar...
    localedata.jar...

解压下载的Liberty压缩包到安装目录

[root@k14 ~]# unzip wlp-javaee8-19.0.0.2.zip -d /usr/local/was

启动默认实例

[root@k14 ~]# /usr/local/was/wlp/bin/server start
Starting server defaultServer.
Server defaultServer started with process ID 2967.

启动成功,但是现在还访问不了,因为默认监听在127.0.0.1 的9080端口,所以需要安装个nginx反向代理

3、安装nginx

下载nginx源码包,编译安装

先安装依赖

[root@k14 nginx-1.14.2]# yum install -y gcc-c++ pcre-devel zlib-devel

编译安装

[root@k14 nginx-1.14.2]# ./configure --prefix=/usr/local/nginx && make && make install

设置反向代理

[root@k14 nginx-1.14.2]# vim /usr/local/nginx/conf/nginx.conf
.
        location / {
            root   html;
            index  index.html index.htm;
                        #location里面增加一行
            proxy_pass http://127.0.0.1:9080;
        }

启动nginx

[root@k14 was]# /usr/local/nginx/sbin/nginx

打开测试,起来了

Centos7下IBM WAS Liberty轻量化中间件安装部署教程

4、发布应用程序

这里以jenkins为例

先停止Liberty

[root@k14 was]# /usr/local/was/wlp/bin/server stop

把war包放到defaultServer下的dropins目录下,启动Liberty即可

[root@k14 was]# mv jenkins.war /usr/local/was/wlp/usr/servers/defaultServer/dropins/

[root@k14 was]# /usr/local/was/wlp/bin/server start
Starting server defaultServer.
Server defaultServer started with process ID 12275.

启动成功,使用http://192.168.1.14/项目名 即可访问

Centos7下IBM WAS Liberty轻量化中间件安装部署教程

完成

转载于:https://blog.51cto.com/niubdada/2366812

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值