#!/bin/sh

# do an FC3 install 
# deselect Office Productivity
# select Developement
# select Web Server
# disable selinux  (this is a MUST do)
# reboot
#
# wget http://www.dynx.net/ASTERISK/gnudialer/easy_setup/fc3_fresh_install.sh
# (that is this file)
#
# chmod 755 fc3_fresh_install.sh
#
# make sure you find CHANGE THIS in this file and change the 
# root password for mysql
#
# AND read the end of this file
#
# this install file is in no way complete
# 
# nor is it guaranteed in any way.  
# so if your system goes BOOM, thats your fault for running this.
#
#rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora

yum -y update
updatedb

yum -y install joe
yum -y install screen
yum -y install kernel-devel
yum -y install cdrecord
yum -y install mkisofs
yum -y install libidn
yum -y install libgcj
updatedb

service httpd start

cd /usr/src

yum -y install mysql
yum -y install mysql-server
yum -y install mysql-devel
yum -y install mysqlclient14
yum -y install mysqlclient14-devel

service mysqld start
wget http://www.dynx.net/ASTERISK/gnudialer/easy_setup/create_tables.sql
mysql -uroot < create_tables.sql

# CHANGE THIS
mysqladmin -uroot password '~somepassword'

http://internap.dl.sourceforge.net/sourceforge/webadmin/webmin-1.360-1.noarch.rpm
rpm -i webmin-1.360-1.noarch.rpm

cd /usr/src

rm -rf asterisk* libpri* zaptel* gnudialer-puff*

wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.2.24.tar.gz
tar zxfv asterisk-1.2.24.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.2.7.tar.gz
tar zxfv asterisk-addons-1.2.7.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.2.5.tar.gz
tar zxfv libpri-1.2.5.tar.gz
wget http://downloads.digium.com/pub/zaptel/releases/zaptel-1.2.20.tar.gz
tar zxfv zaptel-1.2.20.tar.gz

cd /usr/src/libpri-1.2.5
make clean
make
make install

cd /usr/src/zaptel-1.2.20
make clean
make
make install
make config

cd /usr/src/asterisk.1.2.24
make mpg123
make clean
make
make install
make samples
make config

service asterisk start

svn checkout http://dynx.net/svn/gnudialer-puff/trunk gnudialer-puff
cd gnudialer-puff
make clean
make
make install
make reload

cd /usr/src/gnudialer-puff/astcrm-1.1.6
wget http://www.dynx.net/ASTERISK/gnudialer/java/j2sdk-1_4_2_08-linux-i586.rpm
rpm -i j2sdk-1_4_2_08-linux-i586.rpm
export PATH=$PATH:/usr/java/j2sdk1.4.2_08/bin
export CLASSPATH=$CLASSPATH:.
make clean
make
make install

/sbin/chkconfig --level 345 httpd on
/sbin/chkconfig --level 345 mysqld on

# remember you need to still read all the /usr/src/gnudialer/README's and INSTALL 
# remember you need to still read all the /usr/src/gnudialer/astcrm-1.1.5/README's and INSTALL
# you need to do this because you MUST change the user/pass in various areas, 
# or use the defaults if you are UNSURE whats needs to change.




