Can one server install two Kong?

I have installed Kong in one server (Red Hat) and it is running successfully. Can I install other Kong on this server? If can, how can I do it? Are there any documents? Thank you!

Yes, as long as each Kong runs on its own prefix directory and has its own ports configured. The various kong CLI commands (kong migrations, kong start, etc.) accept a -c flag where you can point to a different kong.conf file. The default one is at /etc/kong/kong.conf, but you can have another one containing different values for prefix, proxy_listen, admin_listen, etc. At the very least you need to have different values for prefix and all the *_listen settings. If you’re running Kong with a database, you also need to have it point to a different data store (it can be the same Postgres database with a different schema, for example).

Thank you for your answer. I understand your reply in general but I still have a question about how to install the kong on its prefix path? For example, I used the ‘sudo yum install kong-xxxx’ on my server and the path is decided by kong instead of me.

Do we need to install kong twice with yum command? I don’t think so.
As @hisham said, we can start various kong instances with different kong.conf files (using -c flag) which define values for kong’s configurations and different prefix directory (using -p flag).

kong.conf.default says:

I’m also wondering how to do if you really want to install kong twice, for example, 2 different versions. Maybe we need other tools to assist this kind of task.

You do not need to install Kong twice for this to work.

As pointed by @tyree731, you don’t need to install Kong twice to use two different prefixes. But if you really want to have two different versions of Kong installed, that’s not easily achieved using yum. Your best bet is using building the sources, but be aware that you might face dependency problems, like needing two different OpenResty installations.