修改xwiki启动的默认端口

时间:2024-03-22 22:27:41

把xwiki安装目录下的start_xwiki.sh,start_xwiki.bat,stop_xwiki.sh,stop_xwiki.bat,start_xwiki_debug.sh文件中8080全部修改你想要的端口号如8180,把其中的8079也全部修改你想要的端口号如8179。然后重启xwiki:./start_xwiki.shbash start_xwiki.sh

不修改配置文件,使用./start_xwiki.sh或`bash start_xwiki.sh启动xwiki使用的是默认端口号8080,请用查看8080端口号是否被其它应用占用,我们的服务器的8080端口号就是被占用了,所以启动不起来。这个默认端口8080太火热了,还是换个端口用吧!

[[email protected] xwiki]# netstat  -anp  |grep 8080
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      64199/unicorn worke
tcp        0      0 127.0.0.1:8080          127.0.0.1:42140         TIME_WAIT   -
tcp        0      0 127.0.0.1:8080          127.0.0.1:42136         TIME_WAIT   -
tcp        0      0 127.0.0.1:8080          127.0.0.1:42138         TIME_WAIT   -
tcp        0      0 127.0.0.1:8080          127.0.0.1:42134         TIME_WAIT   -

修改xwiki启动的默认端口

修改xwiki启动的默认端口

[[email protected] xwiki]# ./start_xwiki.sh
Starting Jetty on port 8180, please wait...
2018-12-13 16:24:34.228:INFO::main: Logging initialized @681ms
2018-12-13 16:24:34.675:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2018-12-13 16:24:34.704:INFO:oejs.AbstractNCSARequestLog:main: Opened /usr/local/xwiki/data/logs/2018_12_13.request.log
2018-12-13 16:24:34.707:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/usr/local/xwiki/jetty/contexts/] at interval 0
2018-12-13 16:24:35.084:INFO:oejsh.ContextHandler:main: Started [email protected]{/,file:/usr/local/xwiki/webapps/root/,AVAILABLE}{/root}
2018-12-13 16:24:36.078:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
2018-12-13 16:25:51,653 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Starting embedded Solr server...
2018-12-13 16:25:51,679 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [data/solr]
2018-12-13 16:25:54,466 [coreLoadExecutor-6-thread-1] WARN  o.a.s.c.SolrResourceLoader     - Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly.
2018-12-13 16:25:58,896 [main] INFO  o.x.s.s.i.EmbeddedSolrInstance - Started embedded Solr server.
2018-12-13 16:26:00.658:INFO:oejsh.ContextHandler:main: Started [email protected]{/xwiki,file:/usr/local/xwiki/webapps/xwiki/,AVAILABLE}{/xwiki}
2018-12-13 16:26:00.695:INFO:oejs.ServerConnector:main: Started [email protected]{HTTP/1.1}{0.0.0.0:8180}
2018-12-13 16:26:00.695:INFO:oejs.Server:main: Started @87149ms
2018-12-13 16:26:00.695:INFO:oxtjl.NotifyListener:main: ----------------------------------
2018-12-13 16:26:00.697:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://localhost:8180/ in your browser to access your wiki.
2018-12-13 16:26:00.697:INFO:oxtjl.NotifyListener:main: ----------------------------------

可以看到启动xwiki,不指定端口号就使用了设置的默认端口号8180.