是否可以为每个用户(目录)单独使用不同的主管(配置)?

Is it possible to use distinct supervisor (config) for each user (directory) individually?

是否可以为服务器上的每个帐户使用不同的主管配置。这样每个用户都可以在他的帐户上使用不同规格的主管。我的意思是不是在服务器上使用所有相同的配置文件,而是使用 conf 文件的本地副本和 运行 分开?

好的,我在 medium 中看到了 Peter Ojo 的一篇文章,它以某种方式回答了我的问题。它实际上是关于在共享主机上安装主管,但我想它会做到。

What you need to do is use the — install-dir flag to install supervisor in a custom location to which your user has full access. You can use the bin directory in your subfolder, i.e. /home/yoursiteuser/bin, or create it if it doesn’t already exist. Add this directory to the PYTHONPATH environmental variable by running the following command;

export PYTHONPATH=$PYTHONPATH:/home/yoursiteuser/bin

Now you can verify that you have your custom bin directory in the PYTHONPATH environmental variable by typing

echo $PYTHONPATH

ACTUALLY INSTALLING SUPERVISOR

Now you can install Supervisor using the easy_install command like so

> easy_install — install-dir=/home/yoursiteuser/bin supervisor This should successfully install Supervisor on your server. Yaay!

USING SUPERVISOR

To use supervisor, you first need to create a configuration file with the sample configuration. You can do this by running the following command:

echo_supervisord_conf > supervisord.conf This will create the configuration file named supervisord.conf in the current directory. Now you can run supervisor like so;

supervisord –c supervisord.conf The -c flag tells supervisor where to find the configuration file, in this case it’s right there in the same current directory.