AWSでtcServerを動かしてみた(実作業編)

さて、やっと下準備ができたのでSSHでリモートからtcServerをたてましょう。

1.Terminalから下記コマンドを実行します。

#ssh -i xxxxx.pem ec2-user@ec2-xxxxxxxxxx.us-west-2.compute.amazonaws.com

2.root権限でインストール作業を実施します。

#sudo su –

※デフォルトでAWSのrootのパスワードはなしです。

3.リポジトリにtcServerを加えます。

# rpm -Uvh  http://repo.vmware.com/pub/rhel6/vfabric/5.1/vfabric-5.1-repo-5.1-1.noarch.rpm

# rpm -Uvh http://repo.vmware.com/pub/rhel6/vfabric-all/vfabric-all-repo-1-1.noarch.rpm

4.加えた後で、確認のコマンドを実行します。

# yum search vfabric

実行結果はこんな感じになります。

Loaded plugins: fastestmirror, priorities, security, update-motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-west-2.amazonaws.com
 * amzn-updates: packages.us-west-2.amazonaws.com
amzn-main | 2.1 kB 00:00 
amzn-updates | 2.3 kB 00:00 
vfabric-5.1 | 2.6 kB 00:00 
vfabric-5.1/primary_db | 36 kB 00:00 
vfabric-all | 2.6 kB 00:00 
vfabric-all/primary_db | 16 kB 00:00 
============================= N/S Matched: vfabric =============================
vfabric-5.1-repo.noarch : vFabric 5.1 repository configuration
vfabric-administration-server.noarch : VMware vFabric Administration Server
vfabric-all-repo.noarch : vFabric All Repository Configuration
vfabric-eula.noarch : VMware vFabric 5.1 End User License Agreement
vfabric-gemfire.noarch : VMware vFabric GemFire
vfabric-hyperic-agent.noarch : VMware vFabric Hyperic Agent
vfabric-hyperic-server.x86_64 : VMware vFabric Hyperic Server
vfabric-insight-agent.noarch : com.springsource.insight.dist.vfabric:agent-rpm
vfabric-insight-dashboard.noarch : com.springsource.insight.dist.vfabric:dashboard-rpm
vfabric-sqlfire.noarch : VMware vFabric SQLFire
vfabric-tc-server-standard.noarch : VMware vFabric tc Server Standard
vfabric-tools-eula.noarch : VMware vFabric 5.1 Tools End User License Agreement
vfabric-web-server.x86_64 : VMware vFabric Web Server
vfabric-web-server-debuginfo.x86_64 : VMware vFabric Web Server Debugging
 : Symbols
vfabric-web-server-devel.x86_64 : VMware vFabric Web Server Libraries and
 : Headers
vfabric-rabbitmq-java-client-bin.noarch : The RabbitMQ Java Client Library
vfabric-rabbitmq-server.x86_64 : The RabbitMQ server
Name and summary matches only, use "search all" for everything.

5.インストール用の呪文をかけます。

# yum install vfabric-tc-server-standard

実行したら、オンプレ同様にEULAの確認画面が出てきます(Qキーでスキップ)こちらにyesと回答したらインストール実行です。

実際のコマンドラインはこんな感じになります。

Loaded plugins: fastestmirror, priorities, security, update-motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.us-west-2.amazonaws.com
 * amzn-updates: packages.us-west-2.amazonaws.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vfabric-tc-server-standard.noarch 0:2.7.1-RELEASE will be installed
--> Processing Dependency: vfabric-eula >= 5.1 for package: vfabric-tc-server-standard-2.7.1-RELEASE.noarch
--> Running transaction check
---> Package vfabric-eula.noarch 0:5.1.0-5 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 vfabric-tc-server-standard noarch 2.7.1-RELEASE vfabric-5.1 19 M
Installing for dependencies:
 vfabric-eula noarch 5.1.0-5 vfabric-5.1 48 k
Transaction Summary
================================================================================
Install 2 Package(s)
Total download size: 19 M
Installed size: 22 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): vfabric-eula-5.1.0-5.noarch.rpm | 48 kB 00:00 
(2/2): vfabric-tc-server-standard-2.7.1-RELEASE.noarch.r | 19 MB 00:03 
--------------------------------------------------------------------------------
Total 5.1 MB/s | 19 MB 00:03 
warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 282a32ca: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-VFABRIC-5.1-EL6
Importing GPG key 0x282A32CA:
 Userid : vFabric (5.1) <support@vmware.com>
 Package: vfabric-5.1-repo-5.1-1.noarch (installed)
 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-VFABRIC-5.1-EL6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction

 VMWARE END USER LICENSE AGREEMENT
PLEASE NOTE THAT THE TERMS OF THIS END USER LICENSE AGREEMENT SHALL GOVERN YOUR USE OF THE SOFTWARE, REGARDLESS OF ANY TERMS THAT MAY APPEAR DURING THE INSTALLATION OF THE SOFTWARE.
IMPORTANT-READ CAREFULLY: BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU (THE INDIVIDUAL OR LEGAL ENTITY) AGREE TO BE BOUND BY THE TERMS OF THIS END USER LICENSE AGREEMENT ("EULA"). IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, YOU MUST NOT DOWNLOAD, INSTALL, OR USE THE SOFTWARE, AND YOU MUST DELETE OR RETURN THE UNUSED SOFTWARE TO THE VENDOR FROM WHICH YOU ACQUIRED IT WITHIN THIRTY (30) DAYS AND REQUEST A REFUND OF THE LICENSE FEE, IF ANY, THAT YOU PAID FOR THE SOFTWARE.
EVALUATION LICENSE. If You are licensing the Software for evaluation purposes, Your use of the Software is only permitted in a non-production environment and for the period limited by the License Key. Notwithstanding any other provision in this EULA, an Evaluation License of the Software is provided "AS-IS" without indemnification, support or warranty of any kind, expressed or implied.
1. DEFINITIONS.

 + "Affiliate" means, with respect to a party, an entity that is directly or indirectly controlled by or is under common control with such party, where "control" means an ownership, voting or similar interest representing fifty percent (50%) or more of the total interests then outstanding of the relevant entity (but only as long as such person or entity meets these requirements).
1.2 "Documentation" means that documentation that is generally provided to You by VMware with the Software, as revised by VMware from time to time, and which may include end user manuals, operation instructions, installation guides, release notes, and on-line help files regarding the use of the Software.
1.3 "Guest Operating Systems" means instances of third-party operating systems licensed by You, installed in a Virtual Machine and run using the Software.
1.4 "Intellectual Property Rights" means all worldwide intellectual property rights, including without limitation, copyrights, trademarks, service marks, trade secrets, know how, inventions, patents, patent applications, moral rights and all other proprietary rights, whether registered or unregistered.
1.5 "License" means a license granted under Section 2.1.
1.6 "License Key" means a serial number that enables You to activate and use the Software.
* 
 + 
 + "License Term" means the duration of a License as specified in the Order.
1.8 "License Type" means the type of License applicable to the Software, as more fully described in the Order.
+ "Open Source Software" or "OSS" means software components that are licensed under a license approved by the Open Source Initiative ("OSI") or similar open source or freeware license and are embedded in the delivered Software.
Do you accept the VMware license terms [yes/no] yes
 Installing : vfabric-eula-5.1.0-5.noarch 1/2 
 Installing : vfabric-tc-server-standard-2.7.1-RELEASE.noarch 2/2
Installed:
 vfabric-tc-server-standard.noarch 0:2.7.1-RELEASE
Dependency Installed:
 vfabric-eula.noarch 0:5.1.0-5
Complete!

6.Complete!を確認できたら、インスタンス作成します。

私はこんな感じで実行しました。

# cd /opt/vmware/vfabric-tc-server-standard/

# ./tcruntime-instance.sh create node1 -i /var/opt/vmware/vfabric-tc-server-standard/ -t nio -t nio-ssl

実行結果はこんな感じになります。

Creating instance 'node1' ...
 Using separate layout
 Creating bin/setenv.sh
 Applying template 'base'
 Copying template's contents
 Applying fragment 'context-fragment.xml' to 'conf/context.xml'
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'web-fragment.xml' to 'conf/web.xml'
 Applying fragment 'tomcat-users-fragment.xml' to 'conf/tomcat-users.xml'
 Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Applying template 'base-tomcat-7'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'web-fragment.xml' to 'conf/web.xml'
 Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Applying template 'nio'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying template 'nio-ssl'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Creating SSL artifacts
 Generating SSL certificate and private key
 Creating conf/tc-server-nio-ssl.keystore
 Configuring instance 'node1' to use Tomcat version 7.0.29.A.RELEASE
 Setting permissions
Instance created
Connector summary
 Port: 8080 Type: Non-Blocking IO Secure: false
 Port: 8443 Type: Non-Blocking IO Secure: true

7.つづいてサンプルのインスタンス作成スクリプトの実行。

私はこんな感じで実行しました。

# cd quickstart/

# ./createInstance.sh 

実行結果はこんな感じ。

** This script will guide you through the creation and configuration of a tcServer instance with a bio and bio-ssl connector **
JAVA_HOME is set to: /usr/lib/jvm/jre
Please specify the directory to install the instance [default: /var/opt/vmware/vfabric-tc-server-standard]:
Please enter a name for the instance [default: EXAMPLE-INSTANCE]:
Would you like to start instance 'EXAMPLE-INSTANCE' (Y/N)? [default: N]:
Y
Creating instance with common templates bio and bio-ssl with the command:
 /opt/vmware/vfabric-tc-server-standard/tcruntime-instance.sh create --interactive --instance-directory /var/opt/vmware/vfabric-tc-server-standard -t bio -t bio-ssl EXAMPLE-INSTANCE
Creating instance 'EXAMPLE-INSTANCE' ...
 Using separate layout
 Creating bin/setenv.sh
 Applying template 'base'
 Copying template's contents
 Please enter the user account that should start the instance when using the 'bin/init.d.sh' script. Default 'tcserver': 
 Please enter a value for 'base.jmxremote.password'. Default 'byahgwgdipudvxjhdlevjdigfmqyctmdhpmgyrcigjvblgojkn': 
 Applying fragment 'context-fragment.xml' to 'conf/context.xml'
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'web-fragment.xml' to 'conf/web.xml'
 Applying fragment 'tomcat-users-fragment.xml' to 'conf/tomcat-users.xml'
 Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Applying template 'base-tomcat-7'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'web-fragment.xml' to 'conf/web.xml'
Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Applying template 'bio'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying template 'bio-ssl'
 Copying template's contents
 Applying fragment 'server-fragment.xml' to 'conf/server.xml'
 Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
 Creating SSL artifacts
 Please enter the path that the SSL keystore should be read from. To create a new keystore, leave blank: Please enter the size in bits that the SSL private key should be. Default '2048': 
 Please enter the distinguised name the SSL certificate should use (i.e. cn=MyCompany,dc=mycompany,dc=com). To be prompted for name components leave blank: 
 Please enter the first and last name the SSL certificate should use. Default 'Unknown': 
 Please enter the organizational unit the SSL certificate should use. Default 'Unknown': 
 Please enter the organization the SSL certificate should use. Default 'Unknown': 
 Please enter the city or locality the SSL certificate should use. Default 'Unknown': 
 Please enter the state or province the SSL certificate should use. Default 'Unknown': 
 Please enter the two-letter country code the SSL certificate should use. Default 'Unknown': 
 Generating SSL certificate and private key
 Please enter the alias that the keystore should refer to the SSL private key as. Default 'tc-server-bio-ssl': 
 Please enter the password that keystore should protect the SSL private key with. Default 'tmjqwtxvcwaarnahbdncmgisredreqglqlmhyqqmbhdomgdwpomghhswhtvah': 
 Please enter the path that the SSL keystore should be stored to. Default 'conf/tc-server-bio-ssl.keystore': 
 Please enter the password that the SSL keystore should protect itself with. Default 'tmjqwtxvcwaarnahbdncmgisredreqglqlmhyqqmbhdomgdwpomghhswhtvah': 
 Creating conf/tc-server-bio-ssl.keystore
 Please enter the port that Tomcat Shutdown should listen on. Default '-1': 
 Please enter the port that the JMX socket listener should listen on. Default '6969': 
 Please enter the port that the BIO connector should listen for HTTP requests on. Default '8080': 
 Please enter the port that the BIO connector should redirect HTTPS requests to. Default '8443': 
 Please enter the port that the BIO connector should listen for HTTPS requests on. Default '8443': 
 Configuring instance 'EXAMPLE-INSTANCE' to use Tomcat version 7.0.29.A.RELEASE
 Setting permissions
Instance created
Property summary
 Name: base.jmx.port Value: 6969
 Name: base.jmxremote.password Value: byahgwgdipudvxjhdlevjdigfmqyctmdhpmgyrcigjvblgojkn
 Name: base.runtime.user Value: tcserver
 Name: base.shutdown.port Value: -1
 Name: bio-ssl.https.port Value: 8443
 Name: bio-ssl.ssl.certificate.dname Value: GENERATE
 Name: bio-ssl.ssl.certificate.dname.C Value: Unknown
 Name: bio-ssl.ssl.certificate.dname.CN Value: Unknown
 Name: bio-ssl.ssl.certificate.dname.L Value: Unknown
 Name: bio-ssl.ssl.certificate.dname.O Value: Unknown
 Name: bio-ssl.ssl.certificate.dname.OU Value: Unknown
 Name: bio-ssl.ssl.certificate.dname.ST Value: Unknown
 Name: bio-ssl.ssl.key.alias Value: tc-server-bio-ssl
 Name: bio-ssl.ssl.key.password Value: tmjqwtxvcwaarnahbdncmgisredreqglqlmhyqqmbhdomgdwpomghhswhtvah
 Name: bio-ssl.ssl.key.size Value: 2048
 Name: bio-ssl.ssl.keystore.location Value: conf/tc-server-bio-ssl.keystore
 Name: bio-ssl.ssl.keystore.location.input Value: GENERATE
 Name: bio-ssl.ssl.keystore.password Value: tmjqwtxvcwaarnahbdncmgisredreqglqlmhyqqmbhdomgdwpomghhswhtvah
 Name: bio.http.port Value: 8080
 Name: bio.https.port Value: 8443
 Name: os.family Value: unix
 Name: runtime.directory Value: /opt/vmware/vfabric-tc-server-standard
 Name: vm.arch Value: x64
 Name: vm.name Value: unknown
Connector summary
 Port: 8080 Type: Blocking IO Secure: false
 Port: 8443 Type: Blocking IO Secure: true
Starting EXAMPLE-INSTANCE with command:
 /opt/vmware/vfabric-tc-server-standard/tcruntime-ctl.sh -n /var/opt/vmware/vfabric-tc-server-standard EXAMPLE-INSTANCE start
Using CATALINA_BASE: /var/opt/vmware/vfabric-tc-server-standard/EXAMPLE-INSTANCE
Using CATALINA_HOME: /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.29.A.RELEASE
Using CATALINA_TMPDIR: /var/opt/vmware/vfabric-tc-server-standard/EXAMPLE-INSTANCE/temp
Using JRE_HOME: /usr/lib/jvm/jre
Using CLASSPATH: /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.29.A.RELEASE/bin/bootstrap.jar:/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.29.A.RELEASE/bin/tomcat-juli.jar
Using CATALINA_PID: /var/opt/vmware/vfabric-tc-server-standard/EXAMPLE-INSTANCE/logs/tcserver.pid
Status: RUNNING as PID=1783

以上で作業は終わりです。

ブラウザからポート指定でアクセスすると。。。。

じょうずにできました。

広告

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中