Re: [xwiki-users] Detailed XWiki Install Info For RPM-Based Systems

2017-04-29 Thread Craig Wright
I basically (re)wrote the instructions for SSL+nginx a couple of weeks ago. 

See this instruction page: 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#Hhttps28secure29
 


Based on information gleaned from this bug: 
http://jira.xwiki.org/browse/XWIKI-13963 


Looks like you skipped this from your install:

First, you will need to add the following config to tomcat's server.xml 
(located at /etc/tomcat8/server.xml on Ubuntu 16.04). The first line should 
already be in the file, I include it to give you something to search for (that 
line is located on line 108 in the Ubuntu 16.04 tomcat8 package). This will 
help tomcat find your proxy headers.


  
I hope this helps,
Craig

> On Apr 28, 2017, at 9:09 PM, Douglas Landau  wrote:
> 
> John,
> 
> As far as I know it might be my own instructions.  :-)   They will get you a 
> successful install/running MySQL+XWiki-8.4.4(WAR)+Tomcat+NGINX on CentOS-7.   
> But my own XWiki is still under construction and there are at least a few 
> loose ends left to be addressed before I can announce it.  For example:
> 
> - I got LDAP auth working and yesterday I got, at length, 
> XWiki-group-sync-from-AD working.  So now when I log in using my AD 
> credentials, because I'm in the Admins AD group, I am a member of the 
> XWikiAdminGroup group.  I don't know if there is anything special built-in to 
> that group, or if it's just a name chosen as an example.  I see it has full 
> rights to some pages and not others and now don't remember if I granted the 
> ones that exist, or if it came that way.   In any case I made a lot of groups 
> yesterday and now cannot remove some.  Maybe all, not sure.  I can add them 
> but if I remove them and then refresh they come back, and I get this in the 
> logs:
> 
> 2017-04-28 12:31:41,492 
> [http://dwswiki10.westmarine.net:8080/xwiki/bin/admin/XWiki/XWikiPreferences?xpage=deleteuorg=XWiki.Application+Development_token=whLkhIQlmWnx4c7FHacGdA]
>  WARN  o.x.c.i.DefaultCSRFToken   - CSRFToken: Secret token verification 
> failed, token: "whLkhIQlmWnx4c7FHacGdA", stored token: 
> "mdkkxCCQAFB4fwoqoceMYw"
> 
> - I don't have usable startup and shutdown scripts working.  The files are 
> owned by the user xwiki and to run as the same user I've been starting and 
> stopping it with "cd /data/tomcat;  sudo -u xwiki bin/startup.sh" and "sudo 
> -u xwiki bin/shutdown.sh".   The Tomcat docs say to use jsvc but their 
> example doesn't pick up bin/setenv.sh, and blah blah blah.  I guess I need to 
> merge that script into the suggested jsvc usage, and then use the option that 
> switches who it's running as, even tho I don't need to do this stuff to make 
> it run on port 80, I just want it to run as xwiki.  I guess I'll just let 
> NGINX run as root, not sure yet.
> 
> - The HTTP -> HTTPS redirection doesn't seem to work as I expected/would like 
> and I'm not sure I'm doing it right.  I have this in my xwiki.cfg:   
> xwiki.url.protocol=https  ...but I'm not sure that's the right way to go 
> about it.  I see the bit on the XWiki InstallationTomcat page about Let's 
> Encrypt but glanced at that page and it seemed like it was about creating 
> certs and didn't understand how it relates.
> Today my NGINX is not working; not sure why.  It -was-.  Last week I stuck 
> this in there:  return 301 https://$host$request_uri;
> ... but now it's commented out.  Think I got it from 
> https://www.bjornjohansen.no/redirect-to-https-with-nginx  which makes it 
> sound great but I then commented it out and don't remember why.
> Seems to me that the best place for the redirection to happen would be at the 
> NGINX layer.
> 
> - There is a "server" section for port 80 and another for 443 in 
> conf/nginx.conf.  As per the InstallationTomcat page I added the dir conf.d 
> and inside it tomcat.conf, with similar sections.  I dunno if I should go and 
> comment out the server sections in conf/nginx.conf.
> 
> 
> - I get this error in catalina.out, and dunno why or what I'm going to do:
> 27-Apr-2017 19:00:57.513 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
> -XX:MaxPermSize=192m
> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support 
> was removed in 8.0
> 
> ... if I remember correctly, wherever it was I saw that, that place said it 
> was important!  Oh yeah, it too was on this page:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat
> 
> 
> - I get this message in the logs and dunno what to do about it:
> 
> 27-Apr-2017 14:56:48.633 SEVERE [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks 
> The web application [xwiki] created a ThreadLocal with key of type 
> [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@38058fb1]) and a 

Re: [xwiki-users] Detailed XWiki Install Info For RPM-Based Systems

2017-04-28 Thread Douglas Landau
John,

As far as I know it might be my own instructions.  :-)   They will get you a 
successful install/running MySQL+XWiki-8.4.4(WAR)+Tomcat+NGINX on CentOS-7.   
But my own XWiki is still under construction and there are at least a few loose 
ends left to be addressed before I can announce it.  For example:

- I got LDAP auth working and yesterday I got, at length, 
XWiki-group-sync-from-AD working.  So now when I log in using my AD 
credentials, because I'm in the Admins AD group, I am a member of the 
XWikiAdminGroup group.  I don't know if there is anything special built-in to 
that group, or if it's just a name chosen as an example.  I see it has full 
rights to some pages and not others and now don't remember if I granted the 
ones that exist, or if it came that way.   In any case I made a lot of groups 
yesterday and now cannot remove some.  Maybe all, not sure.  I can add them but 
if I remove them and then refresh they come back, and I get this in the logs:

2017-04-28 12:31:41,492 
[http://dwswiki10.westmarine.net:8080/xwiki/bin/admin/XWiki/XWikiPreferences?xpage=deleteuorg=XWiki.Application+Development_token=whLkhIQlmWnx4c7FHacGdA]
 WARN  o.x.c.i.DefaultCSRFToken   - CSRFToken: Secret token verification 
failed, token: "whLkhIQlmWnx4c7FHacGdA", stored token: "mdkkxCCQAFB4fwoqoceMYw"

- I don't have usable startup and shutdown scripts working.  The files are 
owned by the user xwiki and to run as the same user I've been starting and 
stopping it with "cd /data/tomcat;  sudo -u xwiki bin/startup.sh" and "sudo -u 
xwiki bin/shutdown.sh".   The Tomcat docs say to use jsvc but their example 
doesn't pick up bin/setenv.sh, and blah blah blah.  I guess I need to merge 
that script into the suggested jsvc usage, and then use the option that 
switches who it's running as, even tho I don't need to do this stuff to make it 
run on port 80, I just want it to run as xwiki.  I guess I'll just let NGINX 
run as root, not sure yet.

- The HTTP -> HTTPS redirection doesn't seem to work as I expected/would like 
and I'm not sure I'm doing it right.  I have this in my xwiki.cfg:   
xwiki.url.protocol=https  ...but I'm not sure that's the right way to go about 
it.  I see the bit on the XWiki InstallationTomcat page about Let's Encrypt but 
glanced at that page and it seemed like it was about creating certs and didn't 
understand how it relates.
Today my NGINX is not working; not sure why.  It -was-.  Last week I stuck this 
in there:  return 301 https://$host$request_uri;
... but now it's commented out.  Think I got it from 
https://www.bjornjohansen.no/redirect-to-https-with-nginx  which makes it sound 
great but I then commented it out and don't remember why.
Seems to me that the best place for the redirection to happen would be at the 
NGINX layer.

- There is a "server" section for port 80 and another for 443 in 
conf/nginx.conf.  As per the InstallationTomcat page I added the dir conf.d and 
inside it tomcat.conf, with similar sections.  I dunno if I should go and 
comment out the server sections in conf/nginx.conf.


- I get this error in catalina.out, and dunno why or what I'm going to do:
27-Apr-2017 19:00:57.513 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-XX:MaxPermSize=192m
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was 
removed in 8.0

... if I remember correctly, wherever it was I saw that, that place said it was 
important!  Oh yeah, it too was on this page:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat


- I get this message in the logs and dunno what to do about it:

27-Apr-2017 14:56:48.633 SEVERE [localhost-startStop-2] 
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks 
The web application [xwiki] created a ThreadLocal with key of type 
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@38058fb1]) and a value of 
type [java.util.Stack] (value [[org.xwiki.context.ExecutionContext@c0f4827]]) 
but failed to remove it when the web application was stopped. Threads are going 
to be renewed over time to try and avoid a probable memory leak.

I get these in my logs and dunno what to do about it:
27-Apr-2017 22:02:09.501 INFO [localhost-startStop-1] 
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for 
TLDs yet contained no TLDs. Enable debug logging for this logger for a complete 
list of JARs that were scanned but no TLDs were found in them. Skipping 
unneeded JARs during scanning can improve startup time and JSP compilation time.


- I get this in my logs and don't understand it... I dunno what 
java.library.path is, all I know is this:

27-Apr-2017 14:43:24.720 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based 
Apache Tomcat Native library which allows optimal performance in production 
environments was not found on the java.library.path: 

Re: [xwiki-users] Detailed XWiki Install Info For RPM-Based Systems

2017-04-27 Thread Thomas Mortagne
You have Docker images, makes things a bit easier but it's not really
less technically than Tomcat. See https://hub.docker.com/_/xwiki/.

If you really don't want to deal with system administration at all you
can look at professional hosting, see
https://www.xwiki.org/xwiki/bin/view/Hosted/.

On Thu, Apr 27, 2017 at 7:35 PM, JMorris  wrote:
> Hi Folks,
>
> After LOTS of research, we have decided to seriously explore XWiki; one
> feature in particular (among many) that stands out is the support for
> *annotation*. We like the idea of a "*second generation Wiki*" (especially
> after some extensive experience with MediaWiki and Confluence).
>
> Right now the biggest *hurdle is getting a successful install*. We have
> ready a large number of documents, but have now run out of insights.
>
> *TARGET SYSTEM*: VPS running 42.1 OpenSUSE Linux (RPM-based). Latest MySQL
> (actually MariaDB), Java, Apache etc. Currently a CRM system (PHP-based) and
> an accounting system (PostBooks) running.
>
> *CHALLENGE*: Tomcat and the WAR file.
>
> *SPECIFIC QUESTION: What is the best documentation that would enable us to
> very systematically install and configure XWiki? *
>
> /Especially in a non-deb environment. And with details concerning e.g.
> "ports". Widespread adoption will be encouraged when technically savvy
> individuals and small teams can try XWiki without having a sysadmin as a
> permanent team member.
> /
> We have voted for a *Bitnami *XWiki stack package. But we don't want to
> wait!
>
> Thanks for any pointers!
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Detailed-XWiki-Install-Info-For-RPM-Based-Systems-tp7603669.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.



-- 
Thomas Mortagne


[xwiki-users] Detailed XWiki Install Info For RPM-Based Systems

2017-04-27 Thread JMorris
Hi Folks,

After LOTS of research, we have decided to seriously explore XWiki; one
feature in particular (among many) that stands out is the support for
*annotation*. We like the idea of a "*second generation Wiki*" (especially
after some extensive experience with MediaWiki and Confluence).

Right now the biggest *hurdle is getting a successful install*. We have
ready a large number of documents, but have now run out of insights.

*TARGET SYSTEM*: VPS running 42.1 OpenSUSE Linux (RPM-based). Latest MySQL
(actually MariaDB), Java, Apache etc. Currently a CRM system (PHP-based) and
an accounting system (PostBooks) running.

*CHALLENGE*: Tomcat and the WAR file. 

*SPECIFIC QUESTION: What is the best documentation that would enable us to
very systematically install and configure XWiki? *

/Especially in a non-deb environment. And with details concerning e.g.
"ports". Widespread adoption will be encouraged when technically savvy
individuals and small teams can try XWiki without having a sysadmin as a
permanent team member.
/
We have voted for a *Bitnami *XWiki stack package. But we don't want to
wait!

Thanks for any pointers!



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Detailed-XWiki-Install-Info-For-RPM-Based-Systems-tp7603669.html
Sent from the XWiki- Users mailing list archive at Nabble.com.