MAC 命令行启动tomcat的详细介绍

MAC 命令行启动tomcat

MAC 命令行启动tomcat的详细介绍

一、修改授权

进入tomcat的bin目录,修改授权

1

2

3

➜ bin pwd

/Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin

➜ bin sudo chmod 755 *.sh

  1. sudo为系统超级管理员权限.
  2. chmod 改变一个或多个文件的存取模式
  3. 755代表用户对该文件拥有读、写、执行的权限,同组的其他人员拥有执行和读的权限,没有写的权限,其它用户的权限和同组人员一样.
  4. 777代表,user,group ,others ,都有读写和可执行权限.
  5. chmod -R 777 folername,获取文件夹权限.

二、启动

执行启动命令sudo sh ./startup.sh:

1

2

3

4

5

6

7

➜ bin sudo sh ./startup.sh

Using CATALINA_BASE:  /Users/yp/Documents/workspace/apache-tomcat-7.0.68

Using CATALINA_HOME:  /Users/yp/Documents/workspace/apache-tomcat-7.0.68

Using CATALINA_TMPDIR: /Users/yp/Documents/workspace/apache-tomcat-7.0.68/temp

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

Using CLASSPATH:    /Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin/bootstrap.jar:/Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin/tomcat-juli.jar

Tomcat started.

bin sudo sh ./startup.sh

Using CATALINA_BASE:  /Users/yp/Documents/workspace/apache-tomcat-7.0.68

Using CATALINA_HOME:  /Users/yp/Documents/workspace/apache-tomcat-7.0.68

Using CATALINA_TMPDIR: /Users/yp/Documents/workspace/apache-tomcat-7.0.68/temp

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

Using CLASSPATH:    /Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin/bootstrap.jar:/Users/yp/Documents/workspace/apache-tomcat-7.0.68/bin/tomcat-juli.jar

Tomcat started.

访问http://localhost:8080/

你可能感兴趣的:(mac,tomcat)