Partitioning "Lamp" server
Jerry Feldman
gaf-mNDKBlG2WHs at public.gmane.org
Sat Oct 31 11:25:25 EDT 2009
I cannot be definitive, but most Linux applications can reside nearly
anywhere. When you talk about Apache and MySQL, there are components,
the config files are normally in /etc, the binaries are usually either
in /usr/bin or /usr/sbin. The data components can be just about anywhere
based on how you set up the config files:
For example in an older Apache config:
ServerRoot "/etc/httpd"
PidFile "/var/run/httpd.pid"
DocumentRoot "/var/www/html"
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
Essenttially, you can put most things where you want. However,
configuration files are generally under /etc on most Unix and Linux
systems (except possibly on optware systems). Pids are generally stored
under /var/run.
You can place your document root on /Data/foo/bar and your scripts in
/home/steve/scripts. But, I would otherwise respect standard
conventions. For instance, you might want to preserve the /var/www
convention, but set up www as a symlink to Data/foo/bar, or better
/Data/foo/www. Or, you can mount /Data/foo/bar under /var/www.
Following conventions is usually a good thing in a non-home environment
since there may be others who are working with you or may follow you and
expect things in certain places. I don't know the setup for mysql, but
I'm sure you can place the various databases anywhere you want to.
Again, keeping conventions in mind.
On 10/31/2009 09:26 AM, Stephen Goldman wrote:
> Hello Jerry,
> There is a total of six drives :
> With the raid card I was planning on creating two partitions-
> =20
> Raid one for the OS
> Raid five for the data & db
> =20
> The why -can be subjective-
> I was under the impression of performance gains and redundancy
> with RAID 5 on the db partition. may be wrong..
> =20
> Please confirm that Mysql can be configured to live on the
> /dev/sdb1
> =20
> Thanks,
> Stephen
> =20
> =20
> =20
> I have no issues with your partitioning scheme, but a few questions. Wh=
y
> have /dev/sda RAID 1 and /dev/sdb RAID 5? I thought that a single RAID
> volume required 2 separate physical volumes volumes.
> Secondly, I would probably want to use LVM to give you greater
> flexibility so you can resize and move things around.
> =20
> =20
> =20
> On 10/31/2009 07:01 AM, Stephen Goldman wrote:
> > Hello Blu,
> > Request insight on partitioning a new "LAMP" server with two
> partitions.
> > Seeking input from others more experienced than me.. thanks, =20
> > Are there any posted guidelines for best performance. Wish to
> provide best product
> > =20
> > The device is a brand new Dell server with:
> > /dev/sda raid one 160 G
> > /dev/sdb raid five 270G
> >
> > 32 G physical ram
> > RHEL 5.3
> >
> > My plan was to partition /dev/sda as follows:
> >
> > / 25 G
> > / 20 G swap
> > / var 25 G
> > /tmp 20 G
> > /home remainder
> >
> > /dev/sdb
> >
> > /data =3D 270 G
> >
> > I am provisioning the machine for others who will configure
> ,Apache and Mysql
> >
> >
> > I suggested they redirect the Apache root folders and Mysql db
> to run on /dev/sdb.
> > The researcher who is creating the site states he has only
> worked with both services when configured inside /var.
> > Limited experience.
> >
> > I know the Apache can be redirected .. but no sure of how the
> redirect Mysql to live on /dev/sdb --
> > =20
> > Questions:
> > Does the partitioning scheme make sense ..
> > Is there performance gains running the services on the partition
> /dev/sdb
> > Is it difficult to redirect the services on /dev/sdb ?
> > Is it easier to place /var on /dev/sdb size it to the whole
> partition?
> > =20
> > /home does not need to be 70 G .. but the space is there //
> >
--=20
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
More information about the Discuss
mailing list