linux发布nexus

1.下载包

 nexus-2.12.0-01-bundle

2.上传 通过SFT上传

3.解压

安装解压zip包 

yum install -y unzip zip  

解压:

unzip nexus-2.12.0-01-bundle.zip 

4.启动服务

   改为root启动

# NOTE - This will set the user which is used to run the Wrapper as well as
#  the JVM and is not useful in situations where a privileged resource or
#  port needs to be allocated prior to the user being changed.
RUN_AS_USER=root

5.进入bin目录启动

[root@localhost bin]# ./nexus start

6.查看进程

ps -ef |grep  nexus
root      10587      1  0 10:01 ?        00:00:00 /usr/local/common/nexus/nexus-2.12.0-01/bin/../bin/jsw/linux-x86-64/wrapper /usr/local/common/nexus/nexus-2.12.0-01/bin/../bin/jsw/conf/wrapper.conf wrapper.syslog.ident=nexus wrapper.pidfile=/usr/local/common/nexus/nexus-2.12.0-01/bin/../bin/jsw/linux-x86-64/nexus.pid wrapper.daemonize=TRUE wrapper.lockfile=/var/lock/subsys/nexus
root      10589  10587 15 10:01 ?        00:00:22 java -XX:MaxPermSize=192m -Djava.io.tmpdir=./tmp -Djava.net.preferIPv4Stack=true -Dcom.sun.jndi.ldap.connect.pool.protocol=plain ssl -Xms256m -Xmx768m -Djava.library.path=bin/jsw/lib -classpath bin/jsw/lib/wrapper-3.2.3.jar:./lib/jetty-io-8.1.16.v20140903.jar:./lib/slf4j-api-1.7.6.jar:./lib/jul-to-slf4j-1.7.6.jar:./lib/metrics-logback-2.2.0.jar:./lib/logback-classic-1.1.2.jar:./lib/jetty-rewrite-8.1.16.v20140903.jar:./lib/jetty-util-8.1.16.v20140903.jar:./lib/jetty-webapp-8.1.16.v20140903.jar:./lib/logback-access-1.1.2.jar:./lib/jetty-xml-8.1.16.v20140903.jar:./lib/javax.servlet-3.0.0.v201112011016.jar:./lib/jetty-continuation-8.1.16.v20140903.jar:./lib/jetty-http-8.1.16.v20140903.jar:./lib/nexus-bootstrap-2.12.0-01.jar:./lib/logback-core-1.1.2.jar:./lib/plexus-interpolation-1.16.jar:./lib/jetty-jmx-8.1.16.v20140903.jar:./lib/jetty-client-8.1.16.v20140903.jar:./lib/metrics-core-2.2.0.jar:./lib/jetty-servlet-8.1.16.v20140903.jar:./lib/jetty-deploy-8.1.16.v20140903.jar:./lib/metrics-jetty-2.2.0.jar:./lib/jetty-security-8.1.16.v20140903.jar:./lib/jetty-server-8.1.16.v20140903.jar:./conf/ -Dwrapper.key=P5_8FiIrQtOV0Pnv -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=10587 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 org.sonatype.nexus.bootstrap.jsw.JswLauncher ./conf/jetty.xml ./conf/jetty-requestlog.xml
root      10652  10425  0 10:03 pts/0    00:00:00 grep --color=auto nexus

7.暂停nexus服务

[root@localhost bin]# ./nexus stop
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Stopping Nexus OSS...
Stopped Nexus OSS.

8.修改访问端口

[root@localhost nexus-2.12.0-01]# vi conf/nexus.properties 

#
# Sonatype Nexus (TM) Open Source Version
# Copyright (c) 2008-present Sonatype, Inc.
# All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
#
# This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
# which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
#
# Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
# of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
# Eclipse Foundation. All other trademarks are the property of their respective owners.
#

# Sonatype Nexus
# ==============
# This is the most basic configuration of Nexus.

# Jetty section
application-port=8090//改成8090端口去跑
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus

1.安装jdk 

  1.上传jdk jdk-7u71-linux-i586.tar

  2.解压
  

tar -zxvf jdk
make 
make install

3.配置文件

cd /etc/profile

JAVA_HOME=/usr/java/jdk1.7.0_71
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME CLASSPATH

4.更新脚本

  

[root@localhost ~]# source  /etc/profile

5.查看是否安装成功

[root@localhost ~]# java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode)

猜你喜欢

转载自blog.csdn.net/qq_32363305/article/details/82120289