jboss eap 76.4 installer怎么安装

CAS (8) —— Mac下配置CAS到JBoss EAP 6.4(6.x)的Standalone模式(服务端)
jboss版本: jboss-eap-6.4-CVE-
jdk版本: 1.7.0_79
cas版本: cas4.1.3
配置cas server到jboss eap 6.4需要做以下准备:
一个cas-server-webapp
一个jboss eap服务
配置jboss SSL
cas-server-webapp
可以参照下面两篇文章,进行准备和配置:
jboss eap 6.4
配置jboss eap比较简单,直接去官网注册后就能了。
下载后也无需编译,如果再Mac或linux下可以直接运行命令启动jboss eap
Standalone模式:
:node6-a Richard$ ./bin/standalone.sh
Domain模式:
:node6-a Richard$ ./bin/domain.sh
新的EAP提供了两种部署方式,官方推荐产品上使用Domain模式,关于Domain模式和Standalone模式有何区别,再次不赘述,weblogic也有类似特性,可以去官网上查找。
如果能正常启动,最后几行的console输出可能是:
09:05:34,206 INFO
[org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 69)
FrameworkServlet 'cas': initialization completed in 820 ms
09:05:34,251 INFO
[org.jboss.as.server] (Controller Boot Thread)
JBAS015859: 已部署的 &cas.war&(runtime-name: &cas.war&)
09:05:34,256 INFO
[org.jboss.as] (Controller Boot Thread)
JBAS015961: 侦听 http://127.0.0.1:9990/management 的 HTTP 管理接口
09:05:34,257 INFO
[org.jboss.as] (Controller Boot Thread)
JBAS015951: 管理控制台侦听于 http://127.0.0.1:9990
09:05:34,257 INFO
[org.jboss.as] (Controller Boot Thread)
JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 9651ms - Started 551 of 588 services (60 services are lazy, passive or on-demand)
默认情况下,本地后台服务管理的入口是。
*注意以下的测试都是基于Standalone模式
配置jboss SSL
这个版本的SSL的配置过程与Tomcat有些许差异,主要是因为jboss eap提供了Standalone与Domain两种模式以及对配置文件范式的修改。至于从哪个版本起做的改变,在此不考证。
SSL密钥和证书生成过程与一致,在此不赘述。
standalone.xml里面有关键配置(Line 295~):
&subsystem xmlns=&urn:jboss:domain:web:2.2& default-virtual-server=&default-host& native=&false&&
&connector name=&http& protocol=&HTTP/1.1& scheme=&http& socket-binding=&http&/&
&connector name=&https& protocol=&HTTP/1.1& scheme=&https& socket-binding=&https& secure=&true&&
&ssl name=&https& password=&Hoau123& certificate-key-file=&/Users/Richard/Documents/Dev/servers/cluster/keys/hoaukey&/&
&/connector&
&virtual-server name=&default-host& enable-welcome-root=&true&&
&alias name=&localhost&/&
&alias name=&&/&
&/virtual-server&
&/subsystem&
为subsystem添加了https connector以及为ssl指定certificate-key-file的路径。
安装cas.war
通过后台console界面来部署比较方便
(1)选择“Create Deployment”
(2)选择“Add”
(3)点击“Browse”并选择编译好的war
部署后可能会出现错误:
查看server.log(../servers/cluster/jboss/node6-a/standalone/log)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'supportsTrustStoreSslSocketFactoryHttpClient': FactoryBean threw exceptio nested exception is java.lang.NoSuchMethodError:
org.apache.http.impl.client.HttpClientBuilder.setSSLHostnameVerifier(Ljavax/net/ssl/HostnameV)L
org/apache/http/impl/client/HttpClientB
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:127)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1523)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:314)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
... 64 more
此处怀疑jboss容器自带的库可能和Tomcat(8.x)有所差异,此处报错的“org.apache.http.impl.client.HttpClientBuilder”属于包下。
查看文件module.xml (路径“../servers/cluster/jboss/node6-a/modules/system/layers/base/org/apache/httpcomponents/main”),发现jboss这个版本的jar是依赖与redhat自己打包的&httpclient-4.3.6.redhat-1.jar&和“httpcore-4.3.3.redhat-1.jar”。
暂且不考虑影响和更好的解决方案,一个可行方案是修改这个配置,将这两个jar替换成httpclient的更高版本(此处为4.4.1)
&dependency&
&groupId&org.apache.httpcomponents&/groupId&
&artifactId&httpclient&/artifactId&
&version&4.4.1&/version&
&/dependency&
module.xml
&?xml version=&1.0& encoding=&UTF-8&?&
&module xmlns=&urn:jboss:module:1.1& name=&org.apache.httpcomponents&&
&properties&
&property name=&jboss.api& value=&private&/&
&/properties&
&resources&
&!-- redhat original --&
&resource-root path=&httpclient-4.3.6.redhat-1.jar&/&
&resource-root path=&httpcore-4.3.3.redhat-1.jar&/&
&resource-root path=&httpmime-4.3.6.redhat-1.jar&/& --&
&!-- redhat original --&
&!-- Richard Modify --&
&resource-root path=&httpclient-4.4.1.jar&/&
&resource-root path=&httpcore-4.4.1.jar&/&
&resource-root path=&httpmime-4.3.6.redhat-1.jar&/&
&!-- Richard Modify --&
&!-- Insert resources here --&
&/resources&
&dependencies&
&module name=&javax.api&/&
&module name=&mons.codec&/&
&module name=&mons.logging&/&
&module name=&org.apache.james.mime4j&/&
&/dependencies&
并使用我们在数据库里面预埋的数据&casuser/Mellon&登陆
参照数据库用户验证和JpaTicketRegistry的方式,重新发布cas.war。这时可能会遇到另一个错误:
查看server.log
10:28:09,762 ERROR [org.springframework.web.context.ContextLoader]
(ServerService Thread Pool -- 216) Context initialization failed:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]:
Invocation o nested exception is java.lang.NoSuchMethodError:
javax.persistence.Table.indexes()[Ljavax/persistence/I
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
[spring-beans-4.1.8.RELEASE.jar:4.1.8.RELEASE]
这主要还是因为jboss EAP 6.4这个版本自带jar包的问题。
修改hibernate-jpa-api的jar包版本,路径:
/Users/Richard/Documents/Dev/servers/cluster/jboss/node6-a/modules/system/layers/base/javax/persistence/api/main
module.xml
&module xmlns=&urn:jboss:module:1.1& name=&javax.persistence.api&&
&dependencies&
&!-- PersistenceUnitInfo needs javax.sql.DataSource --&
&module name=&javax.api& export=&true&/&
&/dependencies&
&resources&
&!-- original --&
&!-- &resource-root path=&hibernate-jpa-2.0-api-1.0.1.Final-redhat-3.jar&/& --&
&!-- orginal --&
&!-- Richard modify --&
&resource-root path=&hibernate-jpa-2.1-api-1.0.0.Final.jar&/&
&!-- Richard modify --&
&!-- Insert resources here --&
&/resources&
阅读(...) 评论()jboss-eap-6.4.0-installer.jar
jboss-eap-6.4.0-installer.jar
96FAD6B3B66BBA1ACFC5D41197FEE5F1
/JBossBRMS/.html
/JBossBRMS/jboss-eap-6.4.0-installer.jar
Copyright 2003- 桂ICP证B2-号5885人阅读
Others(44)
Introduction
In this tutorial, we will demonstrate how to download, install, start and stop a JBoss EAP 6.0.0 server on Red Hat 6.3. We use OpenJDK 6 for this tutorial. This is the same installation procedure for CentOS and Fedora. All steps in this tutorial must be performed
This tutorial consists of the following steps
Step 1: JDK installation and verification
Step 2: Download JBoss and the installation procedure
Step 3: Add the appropriate user
Step 4: Create the JBoss EAP 6.0.0 standalone service
Step 5: Activate the JBoss EAP 6.0.0 standalone service
Step 6: Start the JBoss EAP 6.0.0 standalone service
Step 7: Stop the JBoss EAP 6.0.0 standalone service
Step 8: Restart the JBoss EAP 6.0.0 standalone service
Step 1: JDK Installation and verification
The first step before installing JBoss EAP 6, is to install a JDK. Any JDK can be used, such as Sun JDK, OpenJDK, IBM JDK, or JRocket etc. We chose Open JDK 6 for this tutorial, because it is the new Java reference implementation starting with Java 7.
NOTE: JDK 7 and above can also be used with JBoss. A JRE is also sufficient to run JBoss EAP 6, however a JRE does not include some of the additional feature of a JDK.
Installing OpenJDK:
Issue the following command to install the JDK:
$ yum install java-1.6.0-openjdk-devel
Confirming the install:
Issue the following command to confirm that the proper version of the JDK is on your classpath:
$ java -version
Step 2: Download JBoss and the installation procedure
The next step is to download the appropriate version of JBoss EAP 6. We will download the .zip version of JBoss AS EAP 6.0.0, and install it using the unzip utility.
Downloading JBoss EAP 6.0.0:
jboss-eap-6.0.0.zip can also be downloaded with your favorite browser from the /jbossnetwork/restricted/listSoftware.html.
Installing JBoss EAP 6.0.0:
Next, we issue the following unzip command to finally install jboss-eap-6.0.0 in the /usr/share directory:
$ unzip jboss-eap-6.0.0.zip -d /usr/share
Alternatively, any directory can be chosen for the JBoss 6 installation.
Step 3: Add the appropriate user
Now that JBoss EAP 6 is installed, we need to make sure that we create a user with the appropriate privileges. It is never a good idea to run JBoss as root for various reasons.
Create the new user:
We create a new user called jboss by issuing the following command:
$ adduser jboss
Alternatively, any username can be used. However, the username must be specified in the jboss-as.conf file.
Change ownership of the installation directory:
We need to assign the appropriate ownership to the installation directory for the newly created jboss user by issuing the command:
$ chown -fR jboss.jboss /usr/share/jboss-eap-6.0/
Change directory to the jboss bin directory:
Now, lets change directories to the JBoss bin directory. This dorectory contains the necessary scripts to start, stop and manage your JBoss installation.
$ cd /usr/share/jboss-eap-6.0/bin
Add a jboss management user:
The final step before we install the service, is to add a management user. This is an internal JBoss management user, necessary to access the new JBoss management console.
$ ./add-user.sh
You should see the following message on the console after executing the command:
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
We select “a”, next you should see the following message:
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : jboss
Password :
Re-enter Password :
* hit enter for Realm to use default, then provide a username and password
We select the default value for the Realm (ManagementRealm), by hitting enter, and select “jboss” as our username. By default, we supply “jb0ss” as our password, of course, you can provide any password you prefer here.
Step 4: Create the JBoss EAP 6.0.0 standalone service:
Now that JBoss EAP 6 are configured with the admin user, we can proceed with creating the JBoss service.
Link the jboss-as-standalone.sh script to init.d:
We need create a symbolic into init.d. The name of the target is the name of the service, which in this example is jboss-as:
$ /bin/ln -s -T /usr/share/jboss-eap-6.0/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss-as
Link the jboss-as installation directory to /usr/share/jboss-as:
/bin/ln -s -T /usr/share/jboss-eap-6.0 /usr/share/jboss-as
Create the /etc/jboss-eap directory:
$ mkdir /etc/jboss-as
Change ownership of the /etc/jboss-as directory:
$ chown jboss:jboss /etc/jboss-as
Link the jboss-as.conf file to /etc/jboss-as:
There is also a jboss-as.conf file that is included with the JBoss EAP 6 Service script. this file is extremely useful in configuring the init.d service with the username, startup and shutdown wait time, and the location of the console log file.
$ /bin/ln -s -T /usr/share/jboss-eap-6.0/bin/init.d/jboss-as.conf /etc/jboss-as/jboss-as.conf
Add the “jboss” user to the jboss-as.conf file:
Edit the “jboss-as.conf” to update the “jboss” user we created:
$ vi /etc/jboss-as/jboss-as.conf
Change the default “jboss-as” user to the “jboss” user we created:
#JBOSS_USER=jboss-as
JBOSS_USER=jboss
Step 5: Setup the server to listen on all interfaces:
Once the appropriate JBoss service is created, we will configure the server to listen on all interfaces for the management and public interfaces.
More information on how to setup an interface of ipaddress is available in the following tutorials:
Edit the default standalone.xml file:
Edit the /usr/share/jboss-as/standalone/configuration/standalone.xml file in your favorite text editor.
Next, update the following section:
&interface name=”management”&
&inet-address value=”${jboss.bind.address:127.0.0.1″/&
&/interface&
&interface name=”public”&
&inet-address value=”${jboss.bind.address:127.0.0.1}”/&
&/interface&
&interface name=”management”&
&inet-address value=”${jboss.bind.address:0.0.0.0}”/&
&/interface&
&interface name=”public”&
&inet-address value=”${jboss.bind.address:0.0.0.0}”/&
&/interface&
NOTE: By default, JBoss EAP 6 will only bind to localhost. This does not allow any remote access to your jboss server. For our amazon aws installation, we define the jboss.bind.address property as 0.0.0.0 and jboss.bin.address.management property to 0.0.0.0
as well. This allows us to access the remote JBoss amazon instance over the internet. We could have also defined the hostname of the ami or the ip address. However, unless an elastic ip is used, this value can change. This is why we opted for 0.0.0.0.
Step 6: Activate the JBoss EAP 6.0.0 standalone service:
Now that we have the setup completed, and the appropriate links created, we can activate our JBoss EAP 6 service and register it.
Activate the JBoss EAP 6, standalone service:
In order to activate our service, the first step is to add the service to the system configuration by executing the following using the chkconfig command:
$ chkconfig –add jboss-as
Configure the JBoss EAP 6 service to automatically start and stop:
Next, we issue the following command to start the JBoss EAP 6 standalone service at boot time, and stop it gracefully when the server is shutdown or restarted using the chkconfig command:
$ chkconfig jboss-as on
Step 7: Start the JBoss EAP 6 standalone service:
Once the JBoss EAP 6 standalone service has been setup, we are now ready to start our new JBoss EAP 6 server. We can do this either by restarting our Operating System, or by starting the service manually for the first time. Subsequent Operating System restarts
will of course be handled trasparently by the service we added.
Manually startup the JBoss EAP 6 standalone service for the first time:
To manually startup your JBoss EAP 6 service, execute the following command:
$ /sbin/service jboss-as start
Test your JBoss EAP 6 installation:
A good indication of a successful startup is that you can login to the JBoss admin console. Type in the following in your browser window, where yourip should be replaced with the address of your amazon ami:
http://yourip::9990/
This should provide you access to the new admin console, which will be the topic of a future tutorial.
You can also easily check the startus by executing the status command:
$ /sbin/service jboss-as status
Step 8: Stop the JBoss EAP 6 standalone service:
After successfully starting up JBoss EAP 6, lets demonstrate how to shut your JBoss server down in this section.
Manually shutdown the JBoss EAP 6 standalone service:
To shutdown your JBoss EAP 6 service, execute the following command:
$ /sbin/service jboss-as stop
Step 9: Restart the JBoss EAP 6 standalone service:
Your JBoss EAP 6 service can also be easily restarted with one command. This is demonstrated in this section.
Restart the JBoss EAP 6 standalone service:
To shutdown your JBoss EAP 6 service, execute the following command:
$ /sbin/service jboss-as restart
Step 10: Disable the default firewall on Red Hat 6.3:
Our JBoss instance was not accessible over any HTTP port other than ssh on Amazon, even though the firewall through the amazon security group allowed these ports. This is because the default firewall on our Red Hat installation was enabled by default. To access
your JBoss server remotely, this firewall must be updated. For the purpose of this tutorial, we disabled the firewall all together.
Disable the Red Hat firewall:
To disable the Red Hat firewall, execute the following command:
$ yum install system-config-firewall
Using the system-config-firewall
$&&system-config-firewall
From the menu, the firewall can be disabled.
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:782827次
积分:6784
积分:6784
排名:第2480名
原创:134篇
转载:200篇
评论:122条
(1)(2)(2)(4)(4)(2)(2)(1)(2)(2)(5)(3)(2)(3)(2)(6)(3)(4)(5)(1)(3)(1)(6)(1)(5)(4)(1)(5)(2)(20)(7)(4)(7)(3)(15)(5)(18)(8)(6)(2)(9)(8)(2)(2)(2)(8)(10)(1)(2)(3)(7)(19)(3)(6)(3)(4)(1)(1)(2)(1)(1)(32)(24)(7)(2)(2)(2)

我要回帖

更多关于 jboss eap 6.4.0 的文章

 

随机推荐