gpt4 book ai didi

tomcat7 - 如何不以 root 身份启动 Tomcat7

转载 作者:行者123 更新时间:2023-12-02 09:37:42 25 4
gpt4 key购买 nike

我不想以 root 身份运行 tomcat7。

vagrant@dev$ /etc/init.d/tomcat7 stop
You need root privileges to run this script

请告诉我如何以我当前的用户 vagrant 身份运行 tomcat7。

注意 - 如果有很多丑陋的配置来实现这一点,我愿意 sudo apt-get remove tomcat7在 Ubuntu 中,然后从 .tar.gz 文件重新安装 tomcat7 到非根目录。

谢谢,凯文

最佳答案

Ubuntu 的 documentation on Apache Tomcat有一个关于 creating private instances for users 的部分。这是针对 Ubuntu 11.04,我更新了以下摘录以使用 tomcat7:

Installing private instance support

You can install everything necessary to run private instances by entering the following command in the terminal prompt:

sudo apt-get install tomcat7-user

Creating a private instance

You can create a private instance directory by entering the following command in the terminal prompt:

tomcat7-instance-create my-instance

This will create a new my-instance directory with all the necessary subdirectories and scripts. You can for example install your common libraries in the lib/ subdirectory and deploy your webapps in the webapps/ subdirectory. No webapps are deployed by default.

关于tomcat7 - 如何不以 root 身份启动 Tomcat7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12015231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com