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.

Ubuntu 22.04へApache Axis2をインストール

Last updated at Posted at 2023-11-05

少し躓いたのでインストールした手順を記載しておきます。

参考:

JDKのインストール

sudo apt install openjdk-11-jdk

JAVA_HOMEの設定

こちらを参照しました。ありがとうございます。

Apache Antのインストール

sudo apt install ant

Apache Mavenのインストール

sudo apt install maven

Apache Axis2のインストール

バイナリファイルのダウンロードとインストール。

sudo curl -O http://www.apache.org/dyn/closer.lua/axis/axis2/java/core/1.8.2/axis2-1.8.2-bin.zip
sudo unzip axis2-1.8.2-bin.zip
sudo mkdir /usr/local/bin/axis2
sudo mv axis2-1.8.2/* /usr/local/bin/axis2
sudo rmdir axis2-1.8.2

ごちゃごちゃしててすみません。もっとシンプルにやれるはずです。
環境がさくらのVPSだったので事前にunzipのインストールなども必要でした。

環境変数の設定

/etc/profile.d/axis2_home.sh
export AXIS2_HOME=/usr/local/bin/axis2

axis2server.shの修正

Axis2のインストール手順を読む限り、このままで起動できるはずですが、JDKのバージョンが異なるためJAVAクラスの移動があり、修正が必要です。

/usr/local/bin/axis2/bin/axis2server.sh
java $JAVA_OPTS -classpath "$AXIS2_CLASSPATH" \
    org.apache.axis2.transport.SimpleAxis2Server \
    -repo "$AXIS2_HOME"/repository -conf "$AXIS2_HOME"/conf/axis2.xml $*

このorg.apache.axis2.transport.SimpleAxis2Server
org.apache.axis2.kernel.SimpleAxis2Serverに変更します。

参考:

Axis2 Serverを起動

ログファイルを出力するためのパーミッションを付与

sudo mkdir /var/log/axis2
sudo chown <user> /var/log/axis2
sudo chown <user> /var/log/axis2/axis2server.log

バックグラウンド起動

nohup $AXIS2_HOME/bin/axis2server.sh > /var/log/axis2/axis2server.log 2>&1 &
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?