在Centos7上安装Apache Archiva
在安装Apache Archiva时,我在CentOS7上记录了以下内容。
最新版本为2.2.5,仅限中文。
安装
wget https://ftp.jaist.ac.jp/pub/apache/archiva/2.2.5/binaries/apache-archiva-2.2.5-bin.tar.gz
tar -xvzpf apache-archiva-2.2.5-bin.tar.gz
mkdir -p /opt/archiva/2.2.5
mv apache-archiva-2.2.5/* /opt/archiva/2.2.5/
ln -s /opt/archiva/2.2.5/ /opt/archiva/current
更改端口
由于8080端口已被其他服务占用,需要将其更改为8082端口。
vi /opt/archiva/2.2.5/conf/jetty.xml
一个片段
<!-- =========================================================== -->
<!-- Set connectors -->
<!-- =========================================================== -->
<!-- One of each type! -->
<!-- =========================================================== -->
<!-- Use this connector for many frequently idle connections
and for threadless continuations.
-->
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host"><SystemProperty name="jetty.host"/></Set>
# <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
<Set name="port"><SystemProperty name="jetty.port" default="8082"/></Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">5000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>
通行此路。
vi ~/.bash_profile
在最后一行上添加
#### ARCHIVA ADD #########################
export ARCHIVA_HOME=/opt/archiva/current
export PATH=$PATH:$ARCHIVA_HOME/bin
#### ARCHIVA ADD #########################
重新加载个人资料
source ~/.bash_profile
启动
archiva start
只要成功显示ApacheArchiva页面访问8082端口就可以了!
作为服务启动。
创建/etc/systemd/system/ApacheArchiva.service。
vi /etc/systemd/system/ApacheArchiva.service
[Unit]
Description = Apache Archiva
[Service]
ExecStart = /opt/archiva/current/bin/archiva start
ExecStop = /opt/archiva/current/bin/archiva stop
RemainAfterExit=yes
Type = oneshot
[Install]
WantedBy = multi-user.target
确认是否被视为服务
sudo systemctl list-unit-files --type=service | grep Apache
ApacheArchiva.service disabled
激活服务。
sudo systemctl enable ApacheArchiva
#サービス開始
sudo systemctl start ApacheArchiva
#状態確認
sudo systemctl status ApacheArchiva
● ApacheArchiva.service - Apache Archiva
Loaded: loaded (/etc/systemd/system/ApacheArchiva.service; enabled; vendor preset: disabled)
Active: active (exited) since 木 2020-08-06 09:32:33 JST; 2min 41s ago
Process: 759 ExecStart=/opt/archiva/current/bin/archiva start (code=exited, status=0/SUCCESS)
Main PID: 759 (code=exited, status=0/SUCCESS)
Tasks: 78
Memory: 511.6M
CGroup: /system.slice/ApacheArchiva.service
tq920 /opt/archiva/2.2.5/bin/./wrapper-linux-x86-64 /opt/archiva/current/conf/wrapper.conf wrapper.syslog.ident=archiva wrapper.pidfile=/opt/archiva/current/logs/archiva.pid wrapper.daemonize=TRUE wrapper.lockfile=/var/lock...
mq954 java -Dappserver.home=. -Dappserver.base=. -Djetty.logs=./logs -Djava.io.tmpdir=./temp -DAsyncLoggerConfig.WaitStrategy=Block -Darchiva.repositorySessionFactory.id=jcr -Darchiva.cassandra.configuration.file=./conf/arc...
请参考以下的网站 yǐ xià de
请提供至少一个需要的选项进行语言翻译。
Option 1:
http://www.ujp.jp/modules/tech_regist2/?Apache%2FArchiva%2F2.2.1%2F01%2Finstall
https://qiita.com/DQNEO/items/0b5d0bc5d3cf407cb7ff
https://qiita.com/cmwig65/items/3386a061aeb3d2f81b81
选项 1:
http://www.ujp.jp/modules/tech_regist2/?Apache%2FArchiva%2F2.2.1%2F01%2Finstall
https://qiita.com/DQNEO/items/0b5d0bc5d3cf407cb7ff
https://qiita.com/cmwig65/items/3386a061aeb3d2f81b81