[英]AWS EC2 and Tomcat startup.sh
I installed Tomcat8 on my EC2 instance used following command:我使用以下命令在我的 EC2 实例上安装了 Tomcat8:
sudo yum install tomcat8
I want to update startup.sh
file but I can't find it.我想更新
startup.sh
文件,但我找不到它。 /bin
folder looks like showed on image: /bin
文件夹看起来像图像上显示的那样:
How can I update startup.sh
or reinstall tomcat with startup.sh
and shutdown.sh
files in bin folder?如何更新
startup.sh
或使用 bin 文件夹中的startup.sh
和shutdown.sh
文件重新安装 tomcat? I don't have apt-get
only yum
我没有
apt-get
只有yum
If you want to review the list of the files installed from the tomcat8
package, you can run如果你想查看从
tomcat8
包安装的文件列表,你可以运行
$ repoquery --list 'tomcat8'
You'll see that there's no startup.sh
file, there are many blog and doc posts that will go through the installation, if you want better control on your installed tomcat and want to use the startup/shutdown
script, it will be better to run a manual installation.你会看到没有
startup.sh
文件,安装过程中有很多博客和文档帖子,如果你想更好地控制你安装的 tomcat 并想使用startup/shutdown
脚本,最好是运行手动安装。
It's detailed here for example例如这里有详细说明
Create a user called "tomcat" to own the Tomcat installation.创建一个名为“tomcat”的用户来拥有 Tomcat 安装。
# useradd tomcat
Install the JDK from the tarball under the tomcat user.在 tomcat 用户下从 tarball 安装 JDK。
# su - tomcat
$ tar xzf /tmp/jdk-8u77-linux-x64.gz
Install Tomcat from the tarball under the home directory of the "tomcat" user.从“tomcat”用户主目录下的压缩包安装 Tomcat。
$ tar xzf /tmp/apache-tomcat-8.0.32.tar.gz
Set the following environment variables and append them to the /home/tomcat/.bash_profile
so they are set for subsequent logins.设置以下环境变量并将它们附加到
/home/tomcat/.bash_profile
以便为后续登录设置它们。
export JAVA_HOME=/home/tomcat/jdk1.8.0_77
export CATALINA_HOME=/home/tomcat/apache-tomcat-8.0.32
export CATALINA_BASE=$CATALINA_HOME
Start and stop Tomcat using the following scripts.使用以下脚本启动和停止 Tomcat。
$ $CATALINA_HOME/bin/startup.sh
$ $CATALINA_HOME/bin/shutdown.sh
The Tomcat logs are written to the $CATALINA_HOME/logs/
directory by default. Tomcat 日志默认写入
$CATALINA_HOME/logs/
目录。
Try at /usr/libexec/tomcat/server
on AWS Linux 2在 AWS Linux 2 上尝试
/usr/libexec/tomcat/server
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.