-Install FC2 as server installation

Configure network time sync:
add to crontab (crontab -e):
12 2 * * * /usr/sbin/ntpdate 192.168.0.2
* * * * * /home/dchriste/pingMaryann.sh


**************************************
************* Optional ***************
**************************************

edit /etc/yum.conf as follows:
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.kernel.org/fedora/core/updates/$releasever/$basearch

edit /etc/sysconfig/rhn/sources as follows:
yum fedora-core-2 http://mirrors.kernel.org/fedora/core/1/i386/os
yum updates-released-fc2 http://mirrors.kernel.org/fedora/core/updates/1/i386

Update all current packages
#yum check-update
#yum update

************* End Optional ***********



/****************************
*  Create and clean up tables in MySQL
*****************************/

NOTE: need v. 4.1 or higher....
Install RPMs (server, client, and Libraries and headers) from MySQL.com

Add mysql-devel to support below compiled programs
#yum install mysql-devel

Configure MySQL:
#mysql_install_db

#cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
#chown root:sys /etc/my.cnf
#chmod 644 /etc/my.cnf

edit /etc/my.cnf and add:
skip-networking
to [msqld] section

#service mysql start

#mysqladmin -u root password new-password
#clear

enter mysql
#mysql -u root -p

> drop database test;
> use mysql;
> delete from user where User='';
> flush privileges;
>\q

/***************************
* Build mod_ssl
****************************

Download and verify source for mod_ssl
#wget http://www.modssl.org/source/mod_ssl-2.8.22-1.3.33.tar.gz
#wget http://www.modssl.org/source/mod_ssl-2.8.22-1.3.33.tar.gz.asc

import signature and verify
#wget http://www.engelschall.com/ho/rse/pgprse.asc
#gpg -import rse.key.pgp-rsa.pub.txt
#gpg --verify mod_ssl-2.8.22-1.3.33.tar.gz.asc

#tar -zxvf mod_ssl-2.8.22-1.3.33.tar.gz
#cd mod_ssl-2.8.22-1.3.33

Patch Apache with mod_ssl (Download and unpack apache before continuing)
#./configure --with-apache=../apache_1.3.33/

OUTPUT:
Configuring mod_ssl/2.8.22 for Apache/1.3.33
 + Apache location: ../apache_1.3.33/ (Version 1.3.33)
 + Auxiliary patch tool: ./etc/patch/patch (local)
 + Applying packages to Apache source tree:
   o Extended API (EAPI)
   o Distribution Documents
   o SSL Module Source
   o SSL Support
   o SSL Configuration Additions
   o SSL Module Documentation
   o Addons
Done: source extension and patches successfully applied.

Now proceed with the following commands (Bourne-Shell syntax):
 $ cd ../apache_1.3.33/
 $ SSL_BASE=/path/to/openssl ./configure ... --enable-module=ssl
 $ make
 $ make certificate
 $ make install





/***************************
*  Manual build of apache
****************************/

Download the latest apache build
#wget http://www.axint.net/apache/httpd/apache_1.3.33.tar.gz

Validate package using gpg
download the sigs and keys
#wget http://www.apache.org/dist/httpd/apache_1.3.33.tar.gz.asc
#wget http://www.apache.org/dist/httpd/KEYS

check
#gpg --import KEYS
#gpg --verify apache_1.3.33.tar.gz.asc
OUTPUT:
gpg: Signature made Wed 27 Oct 2004 09:53:02 AM PDT using DSA key ID 08C975E5
gpg: Good signature from "Jim Jagielski <jim@apache.org>"
gpg:                 aka "Jim Jagielski <jim@jaguNET.com>"
gpg:                 aka "Jim Jagielski <jim@jimjag.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 8B39 757B 1D8A 994D F243  3ED5 8B3A 601F 08C9 75E5


validate using md5
download the sig file
#wget http://www.apache.org/dist/httpd/apache_1.3.33.tar.gz.md5
#md5sum apache_1.3.33.tar.gz
#md5sum --check apache_1.3.33.tar.gz.md5
OUTPUT:
apache_1.3.33.tar.gz: OK

#tar -zxvf apache_1.3.33.tar.gz

configure and make apache
#cd apache_1.3.33
#SSL_BASE=SYSTEM \
./configure --prefix=/usr/local/apache \
 --enable-module=rewrite \
 --enable-module=so \
 --enable-module=ssl
#make
#make certificate TYPE=custom
#make install

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

add '/usr/local/apache/bin' to .bash_profile

Check it by visiting server from browser



/***********************************
*  Manual build of freetds
************************************/

download source tarball of freetds from freetds.org
#wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
#tar -zxvf freetds-stable.tgz
#cd freetds-0.62.4/
#./configure --prefix=/usr/local/freetds --enable-msdblib
#make
#make install

#echo "/usr/local/freetds/lib" >> /etc/ld.so.conf

add '/usr/local/freetds/bin' to .bash_profile
#ln -s /usr/local/freetds/etc/freetds.conf /etc/freetds.conf

test
Test the connection (simple)
(Of course substitute myserver, mydomain, fieldname, databasename, and tablename with
the actual names of your server, domains, etc.)
#tsql -H myserver.mydomain.com -p 1433 -U sa
1> select fieldname from databasename.dbo.tablename
2> go

To set up the connection more permenately, configure /etc/freetds.conf by adding something like:
#Connect to myserver
[myserver]
       host = myserver.mydomain.com
       port = 1433
       tds version = 8.0

then run
#tsql -S myserver -U sa
1> select fieldname from databasename.dbo.tablename
2> go


/***************************
* Manual build of mcrypt
****************************/

Download the tarball
#wget http://umn.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz

Unpack the targall
#tar -zxvf libmcrypt-2.5.7.tar.gz

#cd libmcrypt-2.5.7

#./configure
#make
#make install


/***************************
* Manual build of PHP 5
****************************/

Download the tarball
#wget http://us2.php.net/get/php-5.0.3.tar.gz/from/this/mirror

Validate file
#md5sum php-5.0.3.tar.gz
Compare checkSums (or if you are lazy like me:
#echo "MD5 (php-5.0.3.tar.gz) = bf89557056ce34d502e20e24071616c7" > php.md5
#md5sum --check php.md5

Unpack the tarball
#tar -zxvf php-5.0.3.tar.gz
#cd php-5.0.3
#./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-xml \
--with-gettext \
--with-xml \
--with-zlib-dir=/usr/lib \
--with-mcrypt=/usr/local/lib \
--disable-posix-threads \
--with-mssql=/usr/local/freetds \
--with-mysql \
--with-ldap=/usr
#make
#make install

edit httpd.conf
#vi /usr/local/apache/conf/httpd.conf
add the following lines to the <IfModule mod_mime.c> section:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

add index.php to the <IFModule mod_dir.c> section

Make some sense
#ln -s /usr/local/apache/logs /var/log/httpd
#ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf