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

さて、実作業編です。

今回も、まずはTerminalからSSH接続を実施します。

接続情報はVirtual Machinesのページに書いてあるとおりで、Azureの場合はAWSのように事前に証明書をダウンロードするような手順はありません。

初回ログイン時にAzure側からダウンロードする形になります。

もうひとつ、自分の証明書をアップロードしてよりセキュアにするという手段は残されていますが、少し煩雑です。

さておき、コマンドライン一色になりますが、下記の手順となります。

1.ROOTになります。

$ sudo su –

[sudo] password for tcserver:

Azureの場合はあらかじめ決めたユーザーパスワード=rootパスワードでした。

2.リポジトリに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

 実行結果はこんな感じです。

# rpm -Uvh  http://repo.vmware.com/pub/rhel6/vfabric/5.1/vfabric-5.1-repo-5.1-1.noarch.rpm
Retrieving http://repo.vmware.com/pub/rhel6/vfabric/5.1/vfabric-5.1-repo-5.1-1.noarch.rpm
warning: /var/tmp/rpm-tmp.9bZ05s: Header V4 RSA/SHA1 Signature, key ID 282a32ca: NOKEY
Preparing...                ########################################### [100%]
   1:vfabric-5.1-repo       ########################################### [100%]
 
 
 
# rpm -Uvh http://repo.vmware.com/pub/rhel6/vfabric-all/vfabric-all-repo-1-1.noarch.rpm
Retrieving http://repo.vmware.com/pub/rhel6/vfabric-all/vfabric-all-repo-1-1.noarch.rpm
warning: /var/tmp/rpm-tmp.6dkIVQ: Header V4 DSA/SHA1 Signature, key ID 1018279f: NOKEY
Preparing...                ########################################### [100%]
   1:vfabric-all-repo       ########################################### [100%]

You have new mail in /var/spool/mail/root

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

# yum search vfabric


コマンド実行イメージはこちら。

# yum search vfabric
Loaded plugins: fastestmirror, security
Determining fastest mirrors
 * base: centos.mirror.freedomvoice.com
 * extras: centos.mirror.freedomvoice.com
 * updates: mirror.flhsi.com
base                                                                                             | 3.7 kB     00:00    
base/primary_db                                                                                  | 4.5 MB     00:06    
extras                                                                                           | 3.0 kB     00:00    
extras/primary_db                                                                                | 6.3 kB     00:00    
updates                                                                                          | 3.5 kB     00:00    
updates/primary_db                                                                               | 1.8 MB     00:02    
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.

You have new mail in /var/spool/mail/root
4.いよいよインストール

#  yum install vfabric-tc-server-standard

インストールコマンド実行結果は下記になります。
#  yum install vfabric-tc-server-standard
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.freedomvoice.com
 * extras: centos.mirror.freedomvoice.com
 * updates: mirror.flhsi.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.rpm                                       |  19 MB     00:13    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   1.2 MB/s |  19 MB     00:16    
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
Warning: RPMDB altered outside of yum.
 
 
                       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 SouDo 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!
5.javaの環境変数を定義します。

Azureで提供されているCentOSには最初からjavaのパッケージが入っています。ですが、JAVA_HOMEをはじめとした環境変数へのパスが通っていない状態です。

/etc/profileの最終行以降に下記の記述を加えます。(記述はあくまで今日時点の環境のものです。)

export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tool.jar

追記したらsourceコマンドを打っておきましょう。


6.インスタンス作成
下記コマンドを実行しておきます

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

# 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
 
 
 
# 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/java-1.6.0-openjdk-1.6.0.0.x86_64/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 'rhoajuqnosylbxrvaxnmugnwureshtqglpmniiy':
    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 'mfebggudxowwyevwpfxiobvfptmfennxtriracoxadopthdmnyctlpefa':
      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 'mfebggudxowwyevwpfxiobvfptmfennxtriracoxadopthdmnyctlpefa':
      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: rhoajuqnosylbxrvaxnmugnwureshtqglpmniiy
  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: mfebggudxowwyevwpfxiobvfptmfennxtriracoxadopthdmnyctlpefa
  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: mfebggudxowwyevwpfxiobvfptmfennxtriracoxadopthdmnyctlpefa
  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/java-1.6.0-openjdk-1.6.0.0.x86_64/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=3136


7.いじょうです。

ほら、簡単でしょ?

広告

コメントを残す

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

WordPress.com ロゴ

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

Twitter 画像

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

Facebook の写真

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

Google+ フォト

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

%s と連携中