what are the Steps to setup nginx-clojure on windows 8

老子叫甜甜 提交于 2019-12-25 06:58:49

问题


Steps followed to setup nginx-clojure.0.4.0 in Windows-8 64 bit

  1. Downloaded the nginx-clojure.0.4.0.tar

  2. Unzipped the tar file and named it as nginx

  3. Modified the following properties in conf file

     nginx.conf :
         pid        logs/nginx.pid;  
         jvm_path "C:/Program Files (x86)/Java/jdk1.7.0_17/jre/bin/server/jvm.dll";
         jvm_var my_other_jars 'D:/Learning/clojure-1.7.0/clojure-1.7.0.jar';
         jvm_options "-Djava.class.path=jars/nginx-clojure-0.4.0.jar:#{my_other_jars}";
         jvm_options "-Xms1024m";
         jvm_options "-Xmx1024m";
    
  4. Started the server using command "nginx-win64.exe".Server start up is failing with following error

    • can not initialize jvm for load dynamic lib, maybe wrong jvm_path!

    • The system cannot find the file specified(logs/nginx.pid).

Please let me know if i need to modify any other parameters. I tried nginx-clojure.0.4.0 in mac book also to setup but failed.I tried nginx-clojure.0.3.0 also in windows 8 i failed


回答1:


The issue is you use a 32-bit JDK with a 64-bit Nginx-Clojure. On 64-bit Windows-8 32-bit program will be installed to "C:/Program Files (x86)/". So please try either of

  1. install 64-bit JDK OR
  2. use nginx-win32.exe with 32-bit JDK

BTW if you want to use Nginx-Clojure on Macosx please try Nginx-Clojure 0.4.1 which can auto detect jvm path. e.g.

in nginx.conf

jvm_path auto;

UPDATE:

Your classpath is also wrong. On windows classpath seperator is ;, not : . So Your classpath should be

jvm_options "-Djava.class.path=jars/nginx-clojure-0.4.0.jar;#{my_other_jars}";


来源:https://stackoverflow.com/questions/31993670/what-are-the-steps-to-setup-nginx-clojure-on-windows-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!