I
I
Ilya Kharlamov2013-12-14 20:41:42
linux
Ilya Kharlamov, 2013-12-14 20:41:42

Separation of projects in CentOS

I have the following situation, we decided to order a server for the company's website, now CentOS 6.5 is installed on it. You need to run a site on 1C-Bitrix on this server. But besides that, I would like to keep a few projects there that are not related to the work of the site itself.
Here is the question: how can I do to set up the system so that the site is not associated with other projects? Well, let's say I set up a server for the site, install mysql server, it works and I want to install in addition a request processing application that will be under a different domain and will not be connected in any way with the operation of the site itself, but will use the same mysql server.
In the process of developing this application, I am afraid to "hurt" the site, for example, by not properly setting up mysql.
What is the best way to separate the work of the site from other projects (I'm not talking about excessive load), so that you can put 2, for example, mysql or ftp servers, which will not depend on each other in any way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Isakov, 2013-12-14
@coodix

Your task is solved with the help of virtualization tools: OpenVZ, LCX, XEN, etc. This will allow you to share the resources of one physical server, creating several independent environments (the degree of independence will already depend on the chosen virtualization tools).

V
Vlad Zhivotnev, 2013-12-14
@inkvizitor68sl

Chroot . There will be, of course, the likelihood that you will devour all the computing resources with inaccurate actions. You can solve this problem with cgroups, for example.
I wrote about debian, but centos has the same thing.
It goes without saying that inside the chroot it will not be possible to use the same ports as on the main server (i.e. the second mysql needs to be launched from skip-networking or hung on a non-standard port, all web servers should be run on different ports, nginx should be configured at 80m so that he "knows" about all your projects). The typical scheme that I use in this case is nginx in the base system at 80m + several Apaches (with different versions of php) in chroots. From the main system, there is access to the files of the chroots (respectively, with nginx, I can distribute statics from all the chroots).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question