Building a Homemade Web Server [FREE]

This is an update of Build Documentation used to securely build LAMP servers for production. Original post here.

LAMP Servers for EveryoneFirst obtain a network install image to boot the computer you plan to build as a server. You may download the file Fedora-12-i386-netinst.iso and burn this to a CD or other boot media.

Boot the machine from the CD or other boot media to begin the installation process. CAUTION: these instructions will remove all pre-existing data from the hard drive. Do not proceed on a machine where you wish to maintain the stored information.

At the GRUB screen press the <esc> key on your keyboard and type linux install text askmethod then press enter.

Language: english [ok]

Keyboard: us [ok]

Installation Method: URL [ok]

Enable IPv4 [ok]

Enter URL: http://linux.gmu.edu/pub/12/Fedora/i386/os/ [ok]

Use text mode

Reinitialize drive

Timezone select (America/New York) or appropriate timezone

Password (enter twice)

Use Entire Drive [ok]

Write changes to disk

Reboot

Login as root

Password (see above) [press enter]

Type the following:

/etc/init.d/network start [press enter] *(see Network Settings below)

chkconfig network on [press enter]

yum install install -y httpd mysql-server php php-mysql openssh-server [press enter]

/etc/init.d/mysqld start [press enter]

chkconfig mysqld on [press enter]

/etc/init.d/sshd start [press enter]

chkconfig sshd on [press enter]

/usr/bin/mysql_secure_installation [press enter]

follow prompts to create password disable remote login and remove tables

type system-config-firewall-tui

customize

* www (http) move down the list [press enter]

Forward

close

service iptables restart [press enter]

/etc/init.d/httpd start [press enter]

chkconfig httpd on [press enter]

reboot [press enter]

You should now secure SSH using the instructions located here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s