0
0

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 1 year has passed since last update.

tomcat 設定1-1

Last updated at Posted at 2021-11-28

sudo su -



#CentOS のバージョン確認
cat /etc/redhat-release

#Apache Mavenを使う可能性もあるのでインストール
sudo yum install maven


#Java 8 (JDK) ランタイムのインストール
yum install java-1.8.0-openjdk

#java 8 (JDK) 開発環境のインストール
yum install -y java-1.8.0-openjdk-devel

#インストール確認
java -version

#apache確認
yum -y install httpd

#以下コマンドでサービスが起動していることを確認します。
systemctl start httpd.service

#ステータス確認コマンド
systemctl status httpd.service
systemctl enable httpd.service


□以下よりtomcat

#下記URLにアクセス
http://tomcat.apache.org/download-80.cgi

#zipにカーソルを合わせ、リンクのアドレスをコピーします。

#わかりやすく/usr/local/ファルダへ移動
cd /usr/local/

#wgetの後に(Binary DistributionsのCore)をコピーして下記のようにダウンロード
wget  https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.78/bin/apache-tomcat-8.5.78.tar.gz


#解凍コマンド→解凍後(apache-tomcat-8.5.72)
tar zxvf apache-tomcat-8.5.78.tar.gz


#tomcatへ名前を変更
mv apache-tomcat-8.5.73 tomcat


#Tomcat用ユーザー追加
useradd tomcat

#logディレクトリ作成
mkdir /var/log/tomcat

#tomcatの所有者を先に作成したtomcatユーザーに変更する。(opt/tomcatはディレクトリのことである。)
chown -R  tomcat:tomcat /usr/local/tomcat
chown -R  tomcat:tomcat /var/log/tomcat


#tomcatをsudouserユーザーに加えるのもありかも
usermod -aG wheel tomcat


#Tomcat用ユーザーログイン
su - tomcat

#version確認コマンド
/usr/local/tomcat/bin/version.sh

#起動コマンド
/usr/local/tomcat/bin/startup.sh

#停止コマンド
/usr/local/tomcat/bin/shutdown.sh


#起動しているかどうかの確認について
サーバーIP:8080
もしくは設定しているポートNo.
サーバーIP:portNo.

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?