/usr/lcoal/nexus/init.sh
#!/bin/bash if [ `grep -c nexus /etc/passwd` -eq 0 ];then useradd nexus; passwd nexus; echo "nexus create successfully!"; fi chown -R nexus:nexus ../nexus; rm -rf /etc/init.d/nexus; cp -a nexus-2.12.0-01/bin/nexus /etc/init.d/; chmod 755 /etc/init.d/nexus; if [ `chkconfig --list nexus|wc -l` -eq 0 ];then cd /etc/init.d; chkconfig --add nexus; chkconfig --level 345 nexus on; fiservice nexus start|stop /sbin/iptables -I INPUT -p tcp --dport 8081 -j ACCEPT /etc/rc.d/init.d/iptables save /etc/rc.d/init.d/iptables restart|status\stop http://192.168.x.x:8081/nexu/ admin admin123 登录就可以 原文链接:https://www.f2er.com/centos/381607.html