first commit
This commit is contained in:
56
执行步骤.txt
Normal file
56
执行步骤.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
请按顺序执行以下命令来完全重新安装 Gerrit:
|
||||
|
||||
========================================
|
||||
步骤 1: 停止服务并清理
|
||||
========================================
|
||||
cd /home/renjianbo/gerrit_install/review_site
|
||||
bin/gerrit.sh stop
|
||||
cd /home/renjianbo/gerrit_install
|
||||
pkill -f "gerrit.war daemon"
|
||||
|
||||
========================================
|
||||
步骤 2: 删除旧安装
|
||||
========================================
|
||||
cd /home/renjianbo/gerrit_install
|
||||
rm -rf review_site
|
||||
|
||||
========================================
|
||||
步骤 3: 重新初始化
|
||||
========================================
|
||||
cd /home/renjianbo/gerrit_install
|
||||
export JAVA_HOME=/usr/local/java/jdk-17.0.12+7
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
java -jar gerrit-3.9.0.war init \
|
||||
-d review_site \
|
||||
--batch \
|
||||
--no-auto-start \
|
||||
-D gerrit.canonicalWebUrl=http://101.43.95.130:8080/ \
|
||||
--install-plugin=download-commands \
|
||||
--install-plugin=replication \
|
||||
--install-plugin=reviewnotes
|
||||
|
||||
========================================
|
||||
步骤 4: 配置启动脚本
|
||||
========================================
|
||||
cd /home/renjianbo/gerrit_install/review_site
|
||||
cp bin/gerrit.sh bin/gerrit.sh.bak
|
||||
sed -i "2i export JAVA_HOME=/usr/local/java/jdk-17.0.12+7\nexport PATH=\$JAVA_HOME/bin:\$PATH" bin/gerrit.sh
|
||||
|
||||
========================================
|
||||
步骤 5: 启动服务
|
||||
========================================
|
||||
cd /home/renjianbo/gerrit_install/review_site
|
||||
bin/gerrit.sh start
|
||||
|
||||
等待 5-10 秒后检查:
|
||||
bin/gerrit.sh status
|
||||
|
||||
========================================
|
||||
步骤 6: 验证
|
||||
========================================
|
||||
检查端口:
|
||||
netstat -tlnp | grep 8080
|
||||
|
||||
访问:http://101.43.95.130:8080
|
||||
|
||||
Reference in New Issue
Block a user