Centos8 stream 安装nexus3
注意这个是真实可以运行的。
一、创建仓库的外挂目录
注意:这个建议用root来操作。
[root@yumcs8 /]
[root@yumcs8 /]
二、拉取镜像和启动
注意:这里有个需要注意的地方,就是nexus3 改root启动真心不好用(网上的那个方法就不要参考了)
1.拉取
需要说明的部分: 1 ) 需要开放端口:建议多几个这样当你用创建仓库的时候好用, 2 )建议使用-u 指定用户:nexus 3)给真实参数:–privileged=true
podman run -itd --name nexus3 -p 8081-8089:8081-8089 --restart always -v /data/nexus-data:/nexus-data -u nexus --privileged=true sonatype/nexus3
成功启动后的日志结果如下:看到相同的日志,恭喜你启动没问题
[root@yumcs8 /]
2022-05-23 13:52:51,755+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.pax.logging.NexusLogActivator - start
2022-05-23 13:52:51,812+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=jmx.acl)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/jmx.acl.cfg
2022-05-23 13:52:51,814+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.log)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.log.cfg
2022-05-23 13:52:51,816+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.features)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.features.cfg
2022-05-23 13:52:51,818+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.pax.url.mvn)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.ops4j.pax.url.mvn.cfg
2022-05-23 13:52:51,820+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.felix.fileinstall~deploy)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.felix.fileinstall-deploy.cfg
2022-05-23 13:52:51,825+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=profile)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/profile.cfg
2022-05-23 13:52:51,825+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.kar)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.kar.cfg
2022-05-23 13:52:51,827+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.shell)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.shell.cfg
2022-05-23 13:52:51,829+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.service.acl.command)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.service.acl.command.cfg
2022-05-23 13:52:51,830+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.management)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.management.cfg
2022-05-23 13:52:51,832+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.jaas)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.jaas.cfg
2022-05-23 13:52:51,833+0000 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.pax.logging)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.ops4j.pax.logging.cfg
2022-05-23 13:52:51,976+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.features.internal.FeaturesWrapper - Fast FeaturesService starting
2022-05-23 13:52:52,671+0000 INFO [FelixStartLevel] *SYSTEM ROOT - bundle org.apache.felix.scr:2.1.30 (55) Starting with globalExtender setting: false
2022-05-23 13:52:52,674+0000 INFO [FelixStartLevel] *SYSTEM ROOT - bundle org.apache.felix.scr:2.1.30 (55) Version = 2.1.30
2022-05-23 13:52:52,874+0000 WARN [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4JInitialiser - Your logging framework class org.ops4j.pax.logging.slf4j.Slf4jLogger is not known - if it needs access to the standard println methods on the console you will need to register it by calling registerLoggingSystemPackage
2022-05-23 13:52:52,875+0000 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Package org.ops4j.pax.logging.slf4j registered; all classes within it or subpackages of it will be allowed to print to System.out and System.err
2022-05-23 13:52:52,878+0000 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Replaced standard System.out and System.err PrintStreams with SLF4JPrintStreams
2022-05-23 13:52:52,879+0000 INFO [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J - Redirected System.out and System.err to SLF4J for this context
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - Properties:
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-host='0.0.0.0'
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - application-port='8081'
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - fabric.etc='/opt/sonatype/nexus/etc/fabric'
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - jetty.etc='/opt/sonatype/nexus/etc/jetty'
2022-05-23 13:52:52,883+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.base='/opt/sonatype/nexus'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.data='/nexus-data'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.etc='/opt/sonatype/nexus/etc/karaf'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.home='/opt/sonatype/nexus'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - karaf.instances='/nexus-data/instances'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - logback.etc='/opt/sonatype/nexus/etc/logback'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-args='/opt/sonatype/nexus/etc/jetty/jetty.xml,/opt/sonatype/nexus/etc/jetty/jetty-http.xml,/opt/sonatype/nexus/etc/jetty/jetty-requestlog.xml'
2022-05-23 13:52:52,884+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-context-path='/'
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-edition='nexus-pro-edition'
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus-features='nexus-pro-feature'
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - nexus.clustered='false'
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.ConfigurationBuilder - ssl.etc='/opt/sonatype/nexus/etc/ssl'
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - Java: 1.8.0_332, OpenJDK 64-Bit Server VM, Red Hat, Inc., 25.332-b09
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - OS: Linux, 4.18.0-365.el8.x86_64, amd64
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - User: nexus, en, /opt/sonatype/nexus
2022-05-23 13:52:52,885+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - CWD: /opt/sonatype/nexus
2022-05-23 13:52:52,886+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.Launcher - TMP: /nexus-data/tmp
2022-05-23 13:52:52,888+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Starting
2022-05-23 13:52:52,892+0000 INFO [FelixStartLevel] *SYSTEM org.eclipse.jetty.util.log - Logging initialized @2218ms to org.eclipse.jetty.util.log.Slf4jLog
2022-05-23 13:52:52,898+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/opt/sonatype/nexus/etc/jetty/jetty.xml
2022-05-23 13:52:52,995+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/opt/sonatype/nexus/etc/jetty/jetty-http.xml
2022-05-23 13:52:53,017+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Applying configuration: file:/opt/sonatype/nexus/etc/jetty/jetty-requestlog.xml
2022-05-23 13:52:53,027+0000 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Starting: Server@4d2ba4c2{STOPPED}[9.4.43.v20210629]
2022-05-23 13:52:53,030+0000 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - jetty-9.4.43.v20210629; built: 2021-06-30T11:07:22.254Z; git: 526006ecfa3af7f1a27ef3a288e2bef7ea9dd7e8; jvm 1.8.0_332-b09
2022-05-23 13:52:53,075+0000 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.session - DefaultSessionIdManager workerName=node0
2022-05-23 13:52:53,075+0000 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.session - No SessionScavenger set, using defaults
2022-05-23 13:52:53,076+0000 INFO [jetty-main-1] *SYSTEM org.eclipse.jetty.server.session - node0 Scavenging every 600000ms
2022-05-23 13:52:53,083+0000 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.osgi.BootstrapListener - Initializing
2022-05-23 13:52:53,084+0000 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.osgi.BootstrapListener - Loading OSS Edition
2022-05-23 13:52:53,085+0000 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.osgi.BootstrapListener - Installing: nexus-oss-edition/3.39.0.01 (nexus-orient/3.39.0.01)
查看刚才挂入系统的目录,出现如下的内容就证明系统起来了。
[root@yumcs8 data]
[root@yumcs8 nexus-data]
cache etc generated-bundles instances javaprefs karaf.pid lock log port tmp
[root@yumcs8 nexus-data]
admin.password blobs cache db elasticsearch etc generated-bundles instances javaprefs karaf.pid keystores lock log orient port restore-from-backup tmp
3、登录系统
1 ) 使用如下的url连接:http://172.29.99.90:8081/ ,注意端口是8081 这个是默认的,可以改的
看到下面的这个,恭喜已经可以用了 ###2 )输入admin的密码来登入系统, 注意密码文件的位置:
启动完成
4、使用和创建仓库
1)创建:
点Repositories —》Createrepository
2)本地的仓库,需要选择hosted
3) 需要修改的地方:
1)name : 给个名字 2) HTTP:这里要给个对外服务的端口 3) Allow anonymous docker pull:许可匿名用户上传,省的麻烦,反正是内网运行 4) Enable DOcker V1 API: 5 ) Bolob store: 使用默认 6)Deploymentpollcy:Allow redeploy 放行所有 出了这个就是配置好了。
总结:podman 就可以了。 没必要用docker了。centos8 后docker已经不好用了。 下一章将完成从远程上传和下载的。然后再来一个go源和yum源的测试章。
|