pantz.org banner
Install of Apache, PHP, SSL, MySQL in linux
Posted on 07-25-2001 00:13:00 UTC | Updated on 07-25-2001 00:13:00 UTC
Section: /software/apache/ | Permanent Link

The following steps will show you how to install the Apache web server on GNU/Linux. This install also includes installing mod_ssl, MySQL and PHP4.You may encounter problems compiling any one of these tarballs.It is up to you to fix the problems. This install assumes that you have everything you need to do all of the compiles. The x's in each file name stands for what ever the version number is at the time you download it.

Download and extract all the source tarballs.

The following are links to the sites you will need to download the source files. Go to each sites download section and download the latest version of each piece of software. After you have downloaded them all to the same directory we are going to unzip and untar them.

Apache.org
Openssl.org
ModSSL.org
Php.net
MySQL.com (Download the Linux binary version)

tar -xvzf apache_1.3.xx.tar.gz
tar -xvzf openssl-0.9.Xx
tar -xvzf mod_ssl-2.X.xx-1.3.xx
tar -xvzf php-4.X.x.tar.gz

Install MySQL (binary version)

groupadd mysql
useradd -g mysql mysql
cd /usr/local
gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
scripts/mysql_install_db
chown -R root .
chown -R mysql data
chgrp -R mysql .
bin/safe_mysqld --user=mysql &

or

bin/mysqld_safe --user=mysql &
## if you are running MySQL 4.x

Build OpenSSL

cd openssl-0.9.Xx
./config
make
make test
make install
cd ..

Patch Apache with mod_ssl

cd mod_ssl-2.X.xx-1.3.xx
./configure --with-apache=../apache_1.3.xx
cd ..

Preconfigure Apache for PHP

cd apache_1.3.xx
./configure --prefix=/usr/local/apache
cd ..

Configure PHP and compile it for Apache

cd php-4.x.x
CFLAGS='-O2 -I../openssl-0.9.Xx'
./configure \
--with-apache=../apache_1.3.xx \
--with-mysql
make
make install
cd ..

or

You can configure and compile a ton of other things into PHP. I usually compile in the following: GD,JPEG,PNG,libcrypt,MySQL,Freetype,and zlib. Make sure if you compile these other things in that you scan back thru the configure output to make sure all of the things you tried to compile in were found. If you install the libjpeg,freetype,libpng,and zlib on RedHat you just need to put /usr in for the directory.Other paths refer to the areas the library's were installed and compiled. Type: ./configure --help to see all of the things you can configure PHP with. My config line looks like this:

./configure \
--with-gd=/usr \
--with-mysql \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-ttf=/tmp/freetype-2.0.5/ \
--with-freetype-dir=/tmp/freetype-2.0.x \
--with-jpeg-dir=/usr \
--with-mcrypt=/tmp/libmcrypt \
--with-apache=../apache_1.3.xx
make
make install
cd ..

Build Apache with mod_ssl and PHP

cd apache_1.3.xx
SSL_BASE=../openssl-0.9.Xx \
./configure \
--prefix=/usr/local/apache \
--enable-module=ssl \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4

make
make certificate   <--Optional step.
make install
cd ..

Configure Apache's Preferences File

vi /usr/local/apache/conf/httpd.conf

See the Apache documentation on how to configure your Apache httpd.conf.

Start your Apache server

/usr/local/apache/bin/apachectl startssl

That's it, enjoy!

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib