On 1 June 2017 15:33:46 BST, Christopher Schultz <ch...@christopherschultz.net> wrote: >Tobias, > >On 6/1/17 3:53 AM, Tobias Soloschenko wrote: >> a long time ago I tried out to install Apache Tomcat with HTTP/2 >> support on macOS. I finally got a short time window to complete a >> developer quickstart guide for that: > >Wouldn't this all be a lot easier if you used the NIO connector >instead of APR? No XCode/OpenSSL/tcnative necessary.
But then you wouldn't have HTTP/2 support. Well you could have HTTP/2 if you used 9.0 x on Java 9 but there were a few wrinkles running Tomcat on Java 9 the last time I checked. Mark > >> 1. Download XCode from the AppStore >> >> >> 2. Install Brew: http://brew.sh/ >> >> >> 3. Download Apache Tomcat binaries > 8.5 http://tomcat.apache.org/ >> >> >> 4. Install APR and OPENSSL with “brew install openssl” and “brew >> install apr” >> >> >> 5. Create pem files in “apache-tomcat-8.5.15/conf” folder - use >> “changeit” every time a password is going to be requested (The >> commands can be executed separately or within a shell script): >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl genrsa -des3 -out >> localhost-rsa-key 1024 >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl genrsa -out >> localhost-key 1024 >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl rsa -in >> localhost-rsa-key -out localhost-key >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl req -new -key >> localhost-key -out localhost-csr >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl x509 -req -days 365 >> -in localhost-csr -signkey localhost-key -out localhost-crt >> >> cat localhost-key localhost-crt > localhost-rsa-cert.pem >> >> cat localhost-rsa-cert.pem > localhost-rsa-chain.pem >> >> cat localhost-rsa-key > localhost-rsa-key-mod.pem >> >> /usr/local/Cellar/openssl/1.0.2l/bin/openssl rsa -in >> localhost-rsa-key-mod.pem -out localhost-rsa-key.pem >> >> >> 6. Uncomment the http/2 connector with protocol >> “org.apache.coyote.http11.Http11AprProtocol” in the >> "apache-tomcat-8.5.15/conf/server.xml" >> >> >> 7. Tomcat native installation >> >> Extract “apache-tomcat-8.5.15/bin/tomcat-native.tar.gz” >> >> Go into folder >> “apache-tomcat-8.5.15/bin/tomcat-native-1.2.12-src/native” >> >> Run “./configure --with-apr=/usr/local/Cellar/apr/1.5.2_3/ >> --with-ssl=/usr/local/Cellar/openssl/1.0.2l” >> >> Run “make” >> >> >> 8. Create a setenv.sh file within the <tomcat>/bin folder and add >> lines: >> >> >LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Cellar/apr/1.5.2_3/libexec >/lib:/Applications/apache-tomcat-8.5.15/bin/tomcat-native-1.2.12-src/nat >ive/.libs >> >> >> >JAVA_OPTS="-Djava.library.path=/usr/local/Cellar/apr/1.5.2_3/libexec/l >ib:/Applications/apache-tomcat-8.5.15/bin/tomcat-native-1.2.12-src/nativ >e/.libs" >> >> >> >> 9. Start Server >> >> >> * Note1: The paths might be adjusted according to the version of >> openssl / apr / tomcat-native / tomcat version >> >> >> Logs: >> >> 01-Jun-2017 09:32:46.551 INFO [main] >> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded >> APR based Apache Tomcat Native library [1.2.12] using APR version >> [1.5.2]. >> >> 01-Jun-2017 09:32:46.551 INFO [main] >> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR >> capabilities: IPv6 [true], sendfile [true], accept filters [false], >> random [true]. >> >> 01-Jun-2017 09:32:46.551 INFO [main] >> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent >> APR/OpenSSL configuration: useAprConnector [false], useOpenSSL >> [true] >> >> 01-Jun-2017 09:32:46.556 INFO [main] >> org.apache.catalina.core.AprLifecycleListener.initializeSSL >> OpenSSL successfully initialized [OpenSSL 1.0.2l 25 May 2017] >> >> >> My question regarding this guide: Is there anything which might be >> changed or is bad practice? > >Everything looks good to me. > >Whenever I try to build tcnative on my Mac, I find that XCode has >broken some kind of symlink somewhere that I need to correct in order >to use clang from the CLI. Some notes about how to work-around that >would be good. > >-chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org