Current time: 04-27-2024, 01:43 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] fedora 7 full install script
Author Message
graywolf Offline
Junior Member
*

Posts: 43
Joined: Sep 2007
Reputation: 1
Post: #1
[HowTo] fedora 7 full install script
i have tested this a few times (2 real machines 3+ VM)

Code:
#!/bin/bash

# Fedora Core 7 ISP Control Installer
# Version 1.1.0


ISPCP_TRUNK_FILE=ispcp-omega-trunk-20070912.tar.gz
ISPCP_DOWNLOAD_LOC=http://www.isp-control.net/downloads/snapshots/
ISPCP_TMP_PATH=/tmp/ispcp_install

echo \************************************
echo \* Fedora Core 7 ISP Control Installer
echo \* ${ISPCP_TRUNK_FILE}      
echo \* Version: 1.1.0            
echo \************************************
echo

######################################
echo Creating Folders and copying files

mkdir ${ISPCP_TMP_PATH}
mkdir ${ISPCP_TMP_PATH}/updates
cp -R ./* ${ISPCP_TMP_PATH}
cd ${ISPCP_TMP_PATH}


######################################
echo Extracting and configuring ISPCP

cd ${ISPCP_TMP_PATH}
wget -O ispcp-omega-1.0.0-trunk.tar.gz  ${ISPCP_DOWNLOAD_LOC}${ISPCP_TRUNK_FILE}
tar -xf ispcp-omega-1.0.0-trunk.tar.gz
mv ${ISPCP_TMP_PATH}/web/svn/nightly ${ISPCP_TMP_PATH}/ispcp-omega-1.0.0-trunk
rm -Rf web

cd ispcp-omega-1.0.0-trunk

#install Required updates
yum -y install `cat ./docs/Fedora/fedora-packages`

#install missing packages
yum -y install chkrootkit proftpd-mysql cpan2rpm system-config-bind caching-nameserver

cpan2rpm -i --no-sign http://search.cpan.org/CPAN/authors/id/P/PH/PHOENIX/Term-ReadPassword-0.07.tar.gz

wget -P ${ISPCP_TMP_PATH}/updates http://hany.sk/mirror/fedora/releases/7/Everything/i386/os/Fedora/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
rpm -i ${ISPCP_TMP_PATH}/updates/perl-Net-LibIDN-0.09-3.fc7.i386.rpm

clear
######################################
echo Installing Courier

yum -y install expect libtool-ltdl


wget -P ${ISPCP_TMP_PATH}/updates http://www.thatfleminggent.com/packages/fedora/7/i386/courier-authlib-0.59.3-1.fc7.mf.i386.rpm
wget -P ${ISPCP_TMP_PATH}/updates http://www.thatfleminggent.com/packages/fedora/7/i386/courier-authlib-userdb-0.59.3-1.fc7.mf.i386.rpm
wget -P ${ISPCP_TMP_PATH}/updates http://www.thatfleminggent.com/packages/fedora/7/i386/courier-imap-4.1.3-1.fc7.mf.i386.rpm

rpm -i ${ISPCP_TMP_PATH}/updates/courier-authlib-0.59.3-1.fc7.mf.i386.rpm
rpm -i ${ISPCP_TMP_PATH}/updates/courier-authlib-userdb-0.59.3-1.fc7.mf.i386.rpm
rpm -i ${ISPCP_TMP_PATH}/updates/courier-imap-4.1.3-1.fc7.mf.i386.rpm

# Create  group and user with 3000 UID so VHCS2 doesnt cause conflicts User  
groupadd courier -g 3000
useradd -u 3000 -c 'Courier Mail Server' -d /dev/null -g courier -s /bin/false courier


clear
######################################
echo Installing ISPCP

cd ${ISPCP_TMP_PATH}/ispcp-omega-1.0.0-trunk
make -f Makefile.fedora install

cp -RLf /tmp/ispcp-1.0.0/* /


clear
######################################
echo Performing General Fixes.....

# BIND setup
mv /var/named/data /var/named/data2
ln -s /var/named/chroot/var/named/data /var/named/data

# Fixing missed mkdir in make error
mkdir /var/www/scoreboards

# HTTPD
echo 'include vhosts/*.conf' >> /etc/httpd/conf/httpd.conf

# Courier User database
touch /etc/sasldb2
mkdir -p /var/spool/postfix/etc
cp /etc/sasldb2 /var/spool/postfix/etc/sasldb2
cp -f /etc/init.d/courier-authlib /etc/init.d/courier-authdaemon


# note permissions are changed in cleanup

######################################
echo DO Trunk fixes ........

cp -RLf ${ISPCP_TMP_PATH}/trunk_fixes/* /

cp -f /etc/init.d/courier-authlib /etc/init.d/courier-authdaemon
cp -f /etc/ispcp/bind/named.conf /var/named/chroot/etc/named-ispcp.conf
echo 'include "/etc/named-ispcp.conf";' >> /var/named/chroot/etc/named.conf



######################################
echo Starting mysql daemon

service mysqld restart


clear
######################################
echo Prep work done entering ISPCP setup
cd /var/www/ispcp/engine/setup
perl /var/www/ispcp/engine/setup/ispcp-setup

clear
######################################
echo Removing config files

rm -R ${ISPCP_TMP_PATH}

clear
######################################
echo fixing permissons

chmod 777 /var/www/ispcp/gui/phptmp
chown apache:apache /var/www/ispcp/gui/tools/webmail/data

######################################
echo Setting Startup services
chkconfig --add ispcp_daemon
chkconfig --add spamassassin
chkconfig --add posfix

chkconfig ispcp_daemon on
chkconfig spamassassin on
chkconfig postfix on
chkconfig httpd on
chkconfig mysqld on
chkconfig named on
chkconfig proftpd on

chkconfig sendmail off

######################################
echo re-starting required services
service httpd restart    
service ispcp_daemon restart
service named restart
service proftpd restart
service spamassassin restart
service sendmail stop
service postfix restart


######################################
echo removing tmp files
rm -R /tmp/ispcp-1.0.0

clear
######################################
echo \*************************
echo
echo Change:
echo myhostname = \<servername\>
echo mydomain = \<domain\>
echo
read -n 1 -p 'Press any key to continue ......'

vi /etc/postfix/main.cf
clear
######################################
echo \*************************
echo
echo Change: chroot to n
echo smtp inet n - n - - smtpd
echo smtp unix - - n - - smtp
echo
read -n 1 -p 'Press any key to continue ......'

vi /etc/postfix/master.cf

service postfix reload


Attached File(s)
.zip  ISPCP-Omega-Fedora-7-install.zip (Size: 9.3 KB / Downloads: 63)
(This post was last modified: 10-11-2007 03:30 AM by Breaki.)
09-15-2007 09:23 PM
Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #2
RE: fedora 7 full install script
im having issues, fresh install of fedora 7. (then again, i am not a linux guru)
10-10-2007 07:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
graywolf Offline
Junior Member
*

Posts: 43
Joined: Sep 2007
Reputation: 1
Post: #3
RE: [HowTo] fedora 7 full install script
whats the issues

this script should work on a clean install with no extras loaded
10-11-2007 01:50 PM
Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #4
RE: [HowTo] fedora 7 full install script
gonna run it in sections, so that i can find all the errors
10-12-2007 08:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #5
RE: [HowTo] fedora 7 full install script
here is some of the errors i am getting:

fixing permissons
chmod: cannot access `/var/www/ispcp/gui/phptmp': No such file or directory
chown: cannot access `/var/www/ispcp/gui/tools/webmail/data': No such file or directory
Setting Startup services
error reading information on service ispcp_daemon: No such file or directory
error reading information on service spamassassin: No such file or directory
error reading information on service posfix: No such file or directory
error reading information on service ispcp_daemon: No such file or directory
error reading information on service spamassassin: No such file or directory
error reading information on service postfix: No such file or directory
error reading information on service httpd: No such file or directory
error reading information on service mysqld: No such file or directory
error reading information on service named: No such file or directory
error reading information on service proftpd: No such file or directory
error reading information on service sendmail: No such file or directory
re-starting required services
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
httpd: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
ispcp_daemon: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
named: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
proftpd: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
spamassassin: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sendmail: unrecognized service
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
postfix: unrecognized service
removing tmp files
rm: cannot remove `/tmp/ispcp-1.0.0': No such file or directory

how would you suggest i install fedora (what packages/run from command line etc)
10-12-2007 09:26 AM
Visit this user's website Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #6
RE: [HowTo] fedora 7 full install script
there were some other errors (somethign about glibc.i686)
10-12-2007 09:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
graywolf Offline
Junior Member
*

Posts: 43
Joined: Sep 2007
Reputation: 1
Post: #7
RE: [HowTo] fedora 7 full install script
looks like there mya have been a issue with the building ispcp

did all the yum stuff install?
10-12-2007 01:48 PM
Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #8
RE: [HowTo] fedora 7 full install script
ill check tomorrow, can i just rerun the script, or do i need to reinstall fedora? (also, what is the best way to make sure that i only install what i need when installing fedora from the disc)


I am a NOOB at linux, so please forgive me if these questions are/sound stupid
10-12-2007 03:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #9
RE: [HowTo] fedora 7 full install script
is there a way to tell it to copy the output of the script to a file?
10-13-2007 02:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
wb6vpm Offline
Junior Member
*

Posts: 80
Joined: Oct 2007
Reputation: 0
Post: #10
RE: [HowTo] fedora 7 full install script
edit, NM, found it:

"script foo" where foo is the filename of the textfile of the output
10-13-2007 02:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)