# LAMP Server

## robind

I'm sure there's a good howto about this somewhere, but I need to figure out how to setup a LAMP server. I've already got everything (I think) emerged, and I know how to use Linux, MySQL and PHP...but not how to make them all interface with Apache. Any help would be _really_ appreciated.

----------

## bma

set your use flags per package in /etc/portage/package.use as follows:

```
net-www/apache mysql php

dev-php/php mysql

dev-php/mod_php mysql

```

then you should be able to get away with 

```
 emerge apache
```

 to get all three installed.  after that, configure each service, and away you go!

----------

## robind

I've already got everything installed with (I'm sure of it) proper use flags, I just don't know how to do the actual configuration of the servers...

 :Embarassed: 

----------

## hanj

Hello

Apache config:

```
/etc/apache2/conf/*
```

MySQL:

```
/etc/mysql/my.cnf
```

PHP:

```
/etc/php/apache2-php4/php.ini
```

Location of web files;

```
/var/www/localhost/htdocs/
```

HTH

hanji

----------

## robind

No, I knew all that. I just don't know how to configure them!

----------

## DarkStorm_Inc

each site has a large array of documentation to read through. Ive spent hours reading everything on php.net mysql.com and apache.org (i think thats right). If you want to take the easy way out then tell use your ip so someone can ssh into your computer and config it.. if not, try the man pages or the sites listed above. Most of these have an extensive man page for the config files.

If your having specific problems though ask away if you run across something you dont understand.. but it kinda sounds like you want someone else to do the work for you

----------

## robind

Alright, thanks. It hadn't even occured to me to look on those sites...

----------

## insano

Have you seen this thread:

https://forums.gentoo.org/viewtopic.php?t=39805&highlight=apache+howto

----------

## BennyP

here's a link to a redhat based tutorial.

http://www.hut.fi/~tkarvine/lamp-linux-apache-mysql-php.html

----------

## robind

Alright you guys...thanks a whole lot. I think I'll be able to figure it out from that. I'll post on my progress periodically. I'm gonna be interning at www.gamespot.com this summer, and I already was pretty familiar with PHP and MySQL but not with how to make them talk to Apache, so I'm having to teach myself this stuff.

Thanks again  :Very Happy:   :Very Happy: 

----------

## BennyP

I have all the parts installed, but cannot get my website to run this script.

Perhaps I must re-emerge apache (having added apache2 mysql and php to USE flags)

----------

## DarkStorm_Inc

bennyp, your problem looks more like a config problem than you needing to emerge apache again. check your apache conf and make sure you have it set to run php as well as having it call mod_php or the php binary. Your apache server works, but the php config is borked somewhere in your config settings. Recheck your apache conf files and visit the apache site or php site for more info on how it should look in both the conf and ini (does php use the ini on linux?)

----------

## insano

Here are some more links to setting up a generic gentoo LAMP system:

http://gentoo-wiki.com/HOWTO_Apache2_with_PHP_MySQL

http://gentoo-wiki.com/HOWTO_Apache2

----------

## easy_coder

http://gentoo-wiki.com/HOWTO_Apache2_with_PHP_MySQL

Is this tutorial to date?  What would be most helpfull is an install guide for lamp for newbies that would get everything working after following the Gentoo istall guide.  Just with a focus on lamp in a server environment.

----------

## easy_coder

What use flags should I use if I want gd along with php?

----------

