Installation

Configuration

Where <name> is the name of the host and <port> is the port you want Apache to listen on.
If Apache is hosted locally, you can usually use localhost for name. Port will usually be 80 for webserving.
You should now have a basic, functional Apache server.

Starting the server

CODE :

# /etc/init.d/apache2 start

Optional: (start on boot-up)
CODE :

# rc-update add apache2 default

Installing PHP

USE flags

Please check this page
Add as you feel required. (don't forget mysql and apache2 !)
I suggest you read trough those carefully. Otherwise you need to re-compile php with the USE flags you've forgotten to add.

Installing MySQL

USE flags

Installation

Configuration

CODE :

# emerge --config dev-db/mysql

Starting it

CODE :

# /etc/init.d/mysql start

Automatically launch the server upon startup:
CODE :

# rc-update add mysql default

Securing

(The "mysql_setpermission" script requires DBI and DBD-mysql to be installed. This is not called out in the install instructions/dependencies above.)
you HAVE to use the same password for root that you used when you ran emerge --config dev-db/mysql !!
CODE :

mysql_setpermission

An alternative method is to do it manually via the mysql console:
CODE :

mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('betchawontguessit');

good effort, here are some hardening tips
1). include mod_securiry (it's free)
2). jail the Apache and/or secure the Apache user and installation
3). harden the php.ini
5). remove all default content
6). read about every mod you are using .

get a good book

HackThisSite is is the collective work of the HackThisSite staff, licensed under a CC BY-NC license.
We ask that you inform us upon sharing or distributing.