2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Tomcat に SpringBootで作成したwarファイルをデプロイする

Last updated at Posted at 2021-09-03

Tomcatのルートディレクトリへ移動

cd opt/tomcat/latest

tomcatのインストール方法

Tomcatのルートディレクトリ確認

ls

|ディレクトリ|説明|
|----|----|----|
|bin|実行ファイル||
|conf|設定ファイル||
|lib|APIファイル(TomatのデフォルトAPI)||
|logs|ログファイル||
|temp|一時ファイル||
|webapps|プログラムファイル(ここにファイルを作成)||
|work|作業ファイル||

RLoginでwarファイルの転送

【重要ポイント】
webappsフォルダ直下にwarファイルを転送する。
・ ファイル転送後、tomcatが自動でwarファイルを展開し、ファイルと同名のプロジェクトディレクトリを生成してくれる。
・ 転送プロトコル:SFTP(portは22番なので、追加設定は必要ない)

プロトコル ポート 備考
FTP FileTransferProtocol 20 : FTPデータ転送ポート
21 : FTP制御ポート
キュリティ的な不具合が多い。
FTPS File Transfer Protocol over SSL/TLS 989 : FTPデータ転送ポート
990 : FTP制御ポート
FTPの通信をSSL/TLSで暗号化 → FTPの拡張
SFTP SSH File Transfer Protocol 22 SSHの通信を使って、FTPを行う → SSHで動作する
参考
https://qiita.com/kasei-san/items/bf766e6c2ececa4c3905

image.png

右クリック>ファイルのアップロード もしくは ドラッグ&ドロップ操作が可能
image.png

アクセスエラー Set Remote Cwd Error

「attr」(attribute)を確認して、その他ユーザーの権限がない場合発生する。

パーミッション確認

ll

パーミッション変更

chmod 777 対象

再帰的に変更する場合はRオプションをつけること。

【検索用】
権限

参考

warファイル転送後

tomcatが自動でwarファイルを展開し、ファイルと同名のプロジェクトディレクトリを生成してくれる。

https://blog.cosnomi.com/posts/1395/
https://qiita.com/NagaokaKenichi/items/3f191aeb6f161101d5f6
https://searchman.info/java_eclipse/1030.html

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?