zoukankan      html  css  js  c++  java
  • Tomcat-MAC下添加Tomcat环境并运行

    MAC下添加Tomcat环境运行

    1. 首先,下载tomcat。http://tomcat.apache.org/index.html

    2. 然后解压。用终端进入到解压文件夹下的bin目录。 

    AlundeMacBook-Pro:bin alun$ pwd

    /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin

     

    3. 这时运行startup.bat文件会报权限不够的错。

    AlundeMacBook-Pro:bin alun$ ./startup.sh

    -bash: ./startup.sh: Permission denied

      我们这里要赋予权限。下面命令:

    sudo chmod 755 /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin/startup.sh

    权限赋给后,我们直接在终端输入./startup.sh就能运行程序了。

    AlundeMacBook-Pro:bin alun$ ./shutdown.sh

    Using CATALINA_BASE:   /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local

    Using CATALINA_HOME:   /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local

    Using CATALINA_TMPDIR: /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/temp

    Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

    Using CLASSPATH:       /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin/bootstrap.jar:/Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin/tomcat-juli.jar

    AlundeMacBook-Pro:bin alun$ pwd

    /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin

    AlundeMacBook-Pro:bin alun$ ./startup.sh

    Using CATALINA_BASE:   /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local

    Using CATALINA_HOME:   /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local

    Using CATALINA_TMPDIR: /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/temp

    Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

    Using CLASSPATH:       /Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin/bootstrap.jar:/Users/alun/资料/JAVA/apache-tomcat-8.0.32-Local/bin/tomcat-juli.jar

    Tomcat started.

     

    4. 最后浏览器上面输入http://localhost:8080/ 就能访问了。默认是8080端口

     

     

     

  • 相关阅读:
    清除 Windows 系统垃圾的 bat
    java通过System.getProperty获取系统属性
    【转】Angular之constructor和ngOnInit差异及适用场景
    p中不能包含div
    How to make PostgreSQL functions atomic?
    How to chain a command after sudo su?
    javascript柯里化
    如何在Angular优雅编写HTTP请求
    angular default project (angular.json的解读)
    error:crosses initialization of ...的解决办法
  • 原文地址:https://www.cnblogs.com/alunchen/p/5294159.html
Copyright © 2011-2022 走看看