Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running Apache/Mysql inside chroot??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
TheLexx
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2005
Posts: 111
Location: Austin Tx

PostPosted: Sun Jun 04, 2017 12:30 am    Post subject: Running Apache/Mysql inside chroot?? Reply with quote

Subject: running Apache/Mysql inside chroot??

I am experimenting around with Apache server. I plan on getting a Linnode server in the future, but until then I have a separate HD partition on one of my computers. The server partition does not have X Windows on it. With the shorter dependency tree (no X), it seems It should be easier/faster to update packages. In the current configuration, I can either boot into the server partition or just chroot the partition.

I am now wondering if I can chroot a shell window and simply start Apache and Mysql without having to reboot the computer. I suppose I could setup a virtual machine, but I thought it might be easier to use chroot. I understand that services generally use tcp/ip to connect and both the chroot-ed and non-chroot-ed services will use the same IP. I will have to inform the chroot-ed shell not to start services that are all ready running.

Am I crazy, because it would be simpler to run a virtual machine. Or, are the just a few simple changes I can do to make chroot work?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7048
Location: almost Mile High in the USA

PostPosted: Sun Jun 04, 2017 4:20 pm    Post subject: Reply with quote

If it's protection you seek, chroot is not much security. VM is one way to solve it.

As a quick check, yes you can run it in a chroot like that. However the init system on that chroot will get confused as things may already running on your machine.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
TheLexx
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2005
Posts: 111
Location: Austin Tx

PostPosted: Sun Jun 04, 2017 7:55 pm    Post subject: Reply with quote

eccerr0r wrote:
If it's protection you seek, chroot is not much security. VM is one way to solve it.


No not really. I am not looking for security on the machine that I am testing out the machine that I am using to test out Apache on. This computer is not constantly connected to the Net. When I run I setup Linode (a virtual private server) I will update Gentoo regularly. What I am looking for is a local simulation of a remote server to act as a testbed.

I seem to have cut-out the part of my message before I posted where I talked about attempting to run openrc inside a chroot. I suppose my question should be, "What is the best way to start Mysql and Apache without using a init system?".

So for the closeted approximation of running on Linode, I can boot into the server partition and startup using openrc. But If I want to do a quick test I can simply chroot into server partition.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum