LinuxGuruz
Toll Free Numbers
Custom Search
MAIN MENU
Main Page
IT Jobs
IPTABLES
Linux Forum
HTML Forum
PHP Forum
MySQL Forum
Linux FAQ
Linux Articles
About Us
Privacy Policy

ADD TO FAVORITES


MARC

Mailing list ARChives
- Search by -
 Subjects
 Authors
 Bodies





FOLDOC

Computing Dictionary






Cheap UK Web Hosting Provider

Cheap Dedicated Servers UK

Cheap Linux VPS Hosting UK

Cheap Hyper-V VPS Hosting UK



Icons
Icons


free brochure template
Free Brochure Template

Web Hosting

Domain Names

Web Design

Reseller Hosting

Registro de Dominios

Reseller Hosting


Toll Free Number for $2.00/Month!!!

Toll Free Number for $2.00/Month!!!
Apache/PHP/MySQL with SSL Installation

Title:       Apache/PHP/MySQL with SSL Installation
Contributor: Randall Goguen (aka Ranman)
Last Update: Monday February 9 14:26 EST 2004

# Move to /usr/local
cd /usr/local
# Get the following source:
ftp://ftp.openssl.org/source/openssl-0.9.7c.tar.gz
http://www.ibiblio.org/pub/mirrors/apache/httpd/httpd-2.0.48.tar.gz
http://www.linuxguruz.org/downloads/php-4.3.4.tar.gz
http://mysql.secsup.org/Downloads/MySQL-4.0/mysql-4.0.17.tar.gz


# Decompress the sources:
tar -xvzf openssl-0.9.7c.tar.gz
tar -xvzf httpd-2.0.48.tar.gz
tar -xvzf php-4.3.4.tar.gz
tar -xvzf mysql-4.0.17.tar.gz

cd ../mysql-4.0.17
./configure
make
make install
scripts/mysql_install_db

adduser mysql
# In the file /etc/login.access add this line:
-:mysql:ALL
# So the user mysql never actualy logs in

# For Slackware:
chown -R mysql.users /usr/local/var
# For Redhat:
chown -R mysql.mysql /usr/local/var

mysqld_safe --user=mysql &

# Hit <Enter>
mysqladmin -u root password 'yourpasswordhere'

cd ../openssl-0.9.7c
sh config -fPIC
make
# If you get a "Not enough room for program headers" error here,
# install the LATEST version of binutils.

cd ../httpd-2.0.48
SSL_BASE=../openssl-0.9.7c \
./configure --prefix=/usr/local/apache --enable-module=all \
--enable-ssl --enable-so
make

# Note: There is a Redhat bug that complains about mod_auth_dbm.so
# during the Apache `make` proccess. Adding the configuration
# switch --disable-module=auth_dbm to the end of the ./configure line
# will fix it.

# If you presently have a libphp4.so module you should make a backup:
cp /usr/local/apache/modules/libphp4.so /usr/local/apache/modules/libphp4.so.was

# If you have a file called /usr/local/apache/conf/httpd.conf already you
# should make a backup:
mv /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.was

# This way you'll get a fresh httpd.conf with all your Apache modules listed
# and 100% loadable.

# Don't worry if your web server is presently running. The httpd.conf file
# is only read by the httpd binary when starting the web server.

make install

# Now to create a "test certificate".
cd /usr/local/apache/conf/
openssl genrsa -des3 -out ca.key 1024
# Note: In order to go live, the "Common Name" has to match the server's
# host adress.
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
openssl genrsa -des3 -out server.key 1024
openssl req -new -days 365 -key server.key -out server.crt

wget http://www.linuxguruz.com/downloads/sign.sh
chmod +x sign.sh
./sign.sh server.crt
chmod -x sign.sh
mkdir ssl.crt ssl.key
cp server.crt ssl.crt
cp server.key ssl.key

# 
cd ../php-4.3.4
./configure \
 --with-apxs2=/usr/local/apache/bin/apxs \
 --with-config-file-path=/usr/local/apache/conf \
 --enable-versioning \
 --with-mysql=/usr/local \
 --enable-ftp \
 --enable-bcmath \
 --disable-debug \
 --enable-memory-limit=yes \
 --enable-track-vars
make
make install

# Make sure you have, Uncomment (remove the #'s), Change or Create
# the following lines in the file /usr/local/apache/conf/httpd.conf

LoadModule php4_module        libexec/libphp4.so

<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.php3 index.phtml
</IfModule>
    # And for PHP 4.x, use:
    #
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps

cp /usr/local/php-4.3.4/php.ini-dist /usr/local/apache/conf/php.ini

# Start Apache:
/usr/local/apache/bin/apachectl startssl

# Create a file in /usr/local/apache/htdocs called index.php
<html>
<head><title>PHP Test Page</title></head>
<body>
<? phpinfo(); ?>
</body>
</html>

# Point your Web Browser at:
http://localhost/index.php

	Anyone who wishes to make additions or changes to this 
PHP Tutorial email them to webmaster@linuxguruz.com

	Copyright (c) 1999, 2000, 2001, 2002, 2003 and 2004 by LinuxGuruz

Return to the LinuxGuruz PHP Tutorials Page
Return to the LinuxGuruz Main Page


www.PHP.net Search Engine


Restrict the search to:
Copyright © 1999, 2000 The PHP Development Team.
Submit a PHP Tutorial

Title:

Contributor:

IRC NICK: (optional)

E-Mail Address: (optional)

Tutorial:

Return to the LinuxGuruz PHP Tutorials Page
Return to the LinuxGuruz Main Page

RESOURCE LINKS
Linux
Apache
HTML
PHP
MySQL
PostgreSQL
Oracle
CGI
Perl
Java
C/C++
Bash
Tcl
Networking
Security
ISP
IRC
Xwindow
Laptop
Graphics
Hardware
Reference
Misc

Broadband


toner

  • Buy Batteries, Adapters, Chargers
  • Notebooks
  • Laser Printer Toner

  • XP Style Icons
    XP Style Icons


    Network Certification


    Network Security


    Wireless Networking


    Canadian
    Web Hosting in Canada


    Drummer Portal


    Mending Media

    The Path Of
    Most Resistance


    Toll Free Number for $2.00/Month!!!

    Toll Free Number for $2.00/Month!!!


    Linux

    The Distributions





    Linux

    The Software





    Linux

    The News




    webmaster@linuxguruz.com
    Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 and 2009 by LinuxGuruz