linux 查看nexus状态,在linux上搭建nexus私服(CentOS7)
1.下載nexus安裝包,下載地址
2.上傳/usr/local后解壓文件,目錄結(jié)構(gòu)如下:
偷懶,直接把解壓后的sonatype-work文件移動(dòng)nexus目錄下
3.添加nexus組和用戶
groupadd nexus
useradd -g nexus -m nexus
passwd nexus
密碼設(shè)置為nexus123
4.修改nexus目錄歸屬權(quán)限
chown -R nexus:nexus nexus
5.開放防火墻,默認(rèn)是8081端口
firewall-cmd --zone=public --permanent --add-port=8081/tcp
service firewalld restart
6.修改nexus配置(/usr/local/nexus/conf/nexus.properties),修改nexus的host和工作目錄
7.啟動(dòng)nexus
切換到nexus用戶,進(jìn)入目錄/usr/local/nexus/bin,執(zhí)行如下命令啟動(dòng)service:
./nexus start
8.查看啟動(dòng)日志
tail -f ../logs/wrapper.log
a.拷貝文件
$NEXUS_HOME/bin/nexus?to?/etc/init.d/nexus
b給文件賦執(zhí)行權(quán)限,并分配給root用戶
chmod?755?/etc/init.d/nexus
chown root /etc/init.d/nexus
c修改nexus文件(/etc/init.d/nexus)
修改NEXUS_HOME為絕對(duì)路徑:NEXUS_HOME="/usr/local/nexus"
修改RUN_AS_USER運(yùn)行用戶為nexus
d.添加nexus為啟動(dòng)服務(wù)
cd /etc/init.d
$ chkconfig--add nexus
$ chkconfig--levels 345nexus on
$ service nexus start
Starting Nexus Repository Manager Pro...
$ tail-f /usr/local/nexus/logs/wrapper.log
10.在瀏覽器中訪問私服管理界面:
總結(jié)
以上是生活随笔為你收集整理的linux 查看nexus状态,在linux上搭建nexus私服(CentOS7)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux 进程 setuid,Linu
- 下一篇: 鸟哥linux群,【鸟哥的linux私房