yk
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Ubuntu環境構築 ## SSH転送設定 vd(-ubuntu)サーバはプライベートサブネットに配置されている。 このため、踏み台サーバのSSH転送を利用するための設定を行う(本環境への接続のたびに必要) 1. teratermを開く 2. 以下情報を入力してSSHログイン - ホスト:52.199.52.107 - TCPポート:22 - ユーザ名:ssh - Authentication mathods:「RSA/DSA/ECDSA/ED25519鍵を使う」 - 秘密鍵:devstep-manage 3. ログイン状態のteratermの「設定」>「SSH転送」を選択する 4. 「追加」を選択して以下2つのSSHポート転送設定を追加する - SSH用設定 - ローカルのポート:222 - リモート側ホスト:[vd-ubuntuサーバのIPアドレス] - ポート:22 - GUIログイン用設定 - ローカルのポート:23389 - リモート側ホスト:[vd-ubuntuサーバのIPアドレス] - ポート:3389 5. 以降、各ログイン時は以下の方法でログインする - SSHログインの場合 「teraterm」を用いて、以下情報にてログインする。 - ホスト:localhost - TCPポート:222 - ユーザ名:ssh - Authentication mathods:「RSA/DSA/ECDSA/ED25519鍵を使う」 - 秘密鍵:devstep-vd-management - SSHログインの場合 「リモートデスクトップ接続」を用いて、以下情報にてログインする - コンピュータ:localhost:23389 - ユーザ名:tts_admin - パスワード:P@ssw0rd(変更していない場合) ## Ubuntu GUIの有効化 ※ 以下AMIは本作業を実施した状態。EC2作成時に指定することで下記手順を省略可能。  ・ubuntu1804_after_install_and_setting_desktop - ami-0fffb0e63dc504971 1. EC2作成後、以下URLに従って作業を実施。 https://qiita.com/osugizmo/items/21578272ae2db05ab001 - user_name:tts_admin - password:P@ssw0rd ## 初期設定 ### 初期password変更 |コマンド|内容| | ----| ----- | |passwd|自分のパスワードを変更する。現在使用しているパスワードの入力が求められるほか、新しいパスワードを2回入力する必要がある| ### JIS配列の有効化 #### JIS配列の有効化(今セッションのみ有効) ターミナルにて、以下コマンドを実行することでJIS配列を有効にできる。 ```bash setxkbmap jp ``` ただし、上記コマンドを実行してもEC2が再起動するとUS配列に戻ってしまう。 このため、以下手順によって起動時に上記コマンドが自動実行されるよう設定する。 #### 起動時にJIS配列を有効にする設定 ターミナルにて、以下コマンドを実行。 ```bash gnome-session-properties ``` 「Starup Applications Preferences」画面が開くので、「Add」を選択する。 「Edit Startup Program」画面が開くので、以下を入力して「Save」を選択する。 - Name:何でも良い - Command:setxkbmap jp ![](https://i.imgur.com/wdFTTBb.png) ### 表示言語の日本語化(実績なし) https://www.server-world.info/query?os=Ubuntu_12.04&p=japanese ### 日本語入力の有効化 Ubuntu 18.04 LTSの場合:(実績あり) https://www.ubuntulinux.jp/japanese ```bash wget -q https://www.ubuntulinux.jp/ubuntu-ja-archive-keyring.gpg -O- | sudo apt-key add - wget -q https://www.ubuntulinux.jp/ubuntu-jp-ppa-keyring.gpg -O- | sudo apt-key add - sudo wget https://www.ubuntulinux.jp/sources.list.d/bionic.list -O /etc/apt/sources.list.d/ubuntu-ja.list sudo apt update ``` ```bash packages can be upgraded. Run 'apt list --upgradable' to see them. ``` 以下のコマンドを実行し、パッケージをアップグレードします。 ```bash sudo apt-get upgrade -y Need to get 1485 kB of archives. After this operation, 3162 kB of additional disk space will be used. Do you want to continue? [Y/n] Y ``` 画面右上の「電源」アイコン→[システムの設定]アイコン 1. Region&Languageを選択 1. Manage Installed Languagesを押下 1. Install/Remove Languages...を押下 1. 好きな言語をチェックし、Applyを押下 1. Drag&Dropで優先言語を選択 1. 日本語入力の有効化 https://linuxfan.info/ubuntu-18-04-japanese-input ## ビルドに必要なアプリケーション類のインストール ### javaのインストール 1. ターミナルにて以下コマンドを実行 ```bash sudo apt install -y openjdk-8-jdk ``` 2. 正しくインストールできたことを確認 ```bash java -version ``` 以下が表示される。 ```bash openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode) ``` ### dockerのインストール 1. [公式ドキュメント](https://docs.docker.com/install/linux/docker-ce/ubuntu/ )に従ってインストール (みなくてもよい) 1. インストールに必要なアプリケーションのインストール ```bash sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common ``` 2. リポジトリの追加およびFingerPrintの確認 ```bash curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 ``` 以下が表示されることを確認。表示されない場合はDockerリポジトリが汚染されている可能性があるので要確認。 ```bash pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid [ unknown] Docker Release (CE deb) <docker@docker.com> sub rsa4096 2017-02-22 [S] ``` 3. dockerのインストール ```bash sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get -y install docker-ce docker-ce-cli containerd.io ``` 2. 正しくインストールできたことを確認 ```bash sudo docker run hello-world ``` Hello from Docker!が表示されれば成功 ### docker-composeのインストール 1. [公式ドキュメント](https://docs.docker.com/compose/install/)に従ってインストール(みなくてよい) ```bash sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose ``` 2. 正しくインストールできたことを確認 ```bash docker-compose --version ``` docker-compose version 1.25.4, build 8d51620a と出ればOK ## ソースコードのクローンとビルド ### GitLabからのクローン 1. ターミナルにて、以下コマンドを実行 ```bash cd ~/ mkdir gitlab_tbdc_jp_info cd gitlab_tbdc_jp_info git clone -b feature/CLIntegration http://3.114.48.225/tbdc_jp_info/tbdc-jp_can.git ``` ### localstackの起動確認 localstackという、AWSリソースの挙動を模倣するツールを用いてテストを行う。 以下にlocalstackの起動手順を記す。 1. localstackの起動 ```bash sudo systemctl start docker cd ~/gitlab_tbdc_jp_info/tbdc-jp_can/apps sudo docker-compose -f ./localstack/docker-compose.yml up -d ``` 2. localstackの起動確認 ```bash curl http://localhost:8080/health ``` 実行した結果、以下が表示されれば起動できている ```json {"status":"OK"} ``` ### AWS Credentialの設定 AWSリソースを利用したテストを行うために、AWSクレデンシャル情報を入力する。 (localstack前提の場合は、値はダミーで良い) 1. AWS CLIのインストール ```bash sudo apt install -y awscli ``` 2. クレデンシャル情報の入力 ```bash aws configure ``` 以下の通り入力(localstack前提の場合) ``` AWS Access Key ID [None]: dummy AWS Secret Access Key [None]: dummy Default region name [None]: Default output format [None]: ``` ### プロジェクトのビルド 1. 共通ライブラリ類のビルド(必ずこれを最初に実行する) ```bash cd ~/gitlab_tbdc_jp_info/tbdc-jp_can/other-repositry1 ./gradlew clean build uploadArchives -x test ``` 2. 以下のいずれかのコマンドを実行する - apps全体のビルドを行う場合 ```bash cd ~/gitlab_tbdc_jp_info/tbdc-jp_can/apps ./gradlew build -x test ``` - 修正対象ディレクトリのみのビルドを行う場合 ```bash cd ~/gitlab_tbdc_jp_info/tbdc-jp_can/apps ./gradlew :プロジェクト名:build -x test ``` ## Eclipse利用環境の構築 ### インストーラーのダウンロードとインストール 1. 以下URLからインストーラー(Linux 64bit)をダウンロード(ファイルを保存) https://www.eclipse.org/downloads/packages/release/2018-09/r ![](https://i.imgur.com/SaBash9.png) 2. ファイルエクスプローラの右クリックメニューから解凍(extract here)する ![](https://i.imgur.com/UFQJr4z.png) 3. 解凍したフォルダ内eclipse-installer/eclipse-instを実行する ![](https://i.imgur.com/1UT9f6K.png) 4. Eclipse IDE for Java Developerを選択 ![](https://i.imgur.com/qK6sHQm.png) 5. 画面にしたがってインストールを実施する ### Eclipseの設定 #### Gradle用プラグインのインストール 1. ファイルマネージャーからEclipseを起動する デフォルト設定の場合、「Home/eclipse/java-2018-09/eclipse」を実行 2. workspaceは任意の場所を設定する #### Gradle用プラグインのインストール 1. 上部メニュー内「Help」>「Eclipse Marketplace」を選択する ![](https://i.imgur.com/2ilPYUy.png) 2. 検索画面が表示されるので、検索欄に「gradle」と入力して検索する 3. 「Gradle IDE Pack 3.8.x+1.0.x+2.2.x」が表示されるので、画面に従ってインストールする ![](https://i.imgur.com/o8crmbL.png) #### プロジェクトのインポート 1. 上部メニュー内「File」>「Import」を選択する 2. 「Gradle」>「Existing Gradle Project」を選択 ![](https://i.imgur.com/XDEs8Qm.png) 3. 下図の画面が表示されるので、プロジェクトのルートディレクトリを指定する (上記手順通りに実施している場合は/home/tts_admin/gitlab_tbdc_jp_info/tbdc-jp_can/apps) ![](https://i.imgur.com/rsjxkIl.png) 4. 「Gradle distribution」>「Specific Gradle Version」にチェックを入れ、Gradleバージョンを指定して、「Next」を選択する ![](https://i.imgur.com/p84F4ID.png) 5. インポートされるGradleプロジェクト一覧が表示されるので「Finish」を選択 ![](https://i.imgur.com/wLVYDT0.png) ### プロジェクトのビルド 1. 上部メニュー「Window」>「New Window」を選択 ![](https://i.imgur.com/fEVhMWl.png) 2. 下図のようなパッケージエクスプローラが表示される。 ![](https://i.imgur.com/msxcjVa.png) 3. 「Window」>「Show View」>「Other」を選択 ![](https://i.imgur.com/OgbXRvm.png) 4. 「Show View」画面が表示されるので「Gradle」>「Gradle Tasks」を選択して「Open」を選択 ![](https://i.imgur.com/c3xLlHk.png) 5. 画面下部に「Gradle Tasks」のウィンドウが開く ![](https://i.imgur.com/1tD1uvG.png) 6. 実行したいGradleジョブを選択すると、実行可能(Gradle Executionsタブに結果が出力される) ![](https://i.imgur.com/sCWvAG9.png) #### 補足:開発途中などで、ビルド時のテストをスキップしたい場合 1. Gradleジョブを右クリック ![](https://i.imgur.com/3Xn91d2.png) 2. 「Open Gradle Run Configuration」を選択 3. 「Edit Configuration」画面が表示されるので、「Arguments」タブ内「Program Arguments」に`-x test`と入力して「OK」を選択 ![](https://i.imgur.com/SWCRrwH.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully