Current time: 12-24-2024, 11:32 PM Hello There, Guest! (LoginRegister)


Post Reply 
fedora 7 setup - trunk build
Author Message
graywolf Offline
Junior Member
*

Posts: 43
Joined: Sep 2007
Reputation: 1
Post: #1
fedora 7 setup - trunk build
I have been messing around with ispcp omega (i have vhcs2 server) on a VM and have come up with a script to config the server

This script requires a few downloads and edited files

I have included fixes for the trunk.
- Fedora dosent support start-stop-daemon so the ispcp_daemon and ispcp_network from the RC2 needs to be used
- The /etc/ispcp/bind/parts/cfg_entry.tpl for fedora is wrong
- The named.conf gets renames and recreated
- There are also a few mis-configured vars in the ispcp.conf which i have listed
- Missing Packages in proftpd-mysql and Term-ReadPassword
- Courier dosent install from yum

Code:
#!/bin/bash

echo \************************************
echo \* Fedora Core 7 ISP Control Config \*
echo \* ISPCP  OMEGA  1.0.0 Trunk        \*
echo \* Version: 1.0 RC 9                \*
echo \************************************
echo

echo Creating Folders and copying files
######################################
mkdir /tmp/core
cp -R ./* /tmp/core
cd /tmp/core
######################################



echo Installing Courier
######################################
./courier-install
######################################


echo Extracting and configuring ISPCP
######################################
cd /tmp/core
tar -xf ispcp-omega-1.0.0-trunk.tar
cd ispcp-omega-1.0.0-trunk

yum -y install `cat ./docs/Fedora/fedora-packages`
yum -y install chkrootkit proftpd-mysql cpan2rpm system-config-bind
cpan2rpm -i http://search.cpan.org/CPAN/authors/id/P/PH/PHOENIX/Term-ReadPassword-0.07.tar.gz

rpm -i /tmp/core/perl-Net-LibIDN-0.09-3.fc7.i386.rpm


make -f Makefile.fedora install
cp -RLf /tmp/ispcp-1.0.0/* /
######################################


clear
echo DO General Fixes.....
######################################


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

mkdir /var/www/scoreboards
touch /etc/sasldb2

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

mkdir -p /var/spool/postfix/etc
cp /etc/sasldb2 /var/spool/postfix/etc/sasldb2


chown apache:apache /var/www/ispcp/gui/tools/webmail/data

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

# NAMED conf

mv /etc/ispcp/bind/named.conf /etc/ispcp/bind/named.conf.old

# create named.conf
echo '' >> /etc/ispcp/bind/named.conf
echo '// bind Data BEGIN.' >> /etc/ispcp/bind/named.conf
echo '' >> /etc/ispcp/bind/named.conf
echo '// dmn [{DMN_NAME}] cfg entry BEGIN.' >> /etc/ispcp/bind/named.conf
echo '// dmn [{DMN_NAME}] cfg entry END.' >> /etc/ispcp/bind/named.conf
echo '' >> /etc/ispcp/bind/named.conf
echo '// bind Data END.' >> /etc/ispcp/bind/named.conf
echo '' >> /etc/ispcp/bind/named.conf
chmod 655 /etc/ispcp/bind/named.conf

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


cp -f /tmp/core/ispcp_daemon /etc/init.d/ispcp_daemon
cp -f /tmp/core/ispcp_network /etc/init.d/ispcp_network

cp -f /etc/init.d/courier-authlib /etc/init.d/courier-authdaemon

cp -f /tmp/core/cfg_entry.tpl /etc/ispcp/bind/parts/cfg_entry.tpl
######################################

echo Starting mysql daemon
######################################
service mysqld restart
######################################


clear
######################################
echo \*********************
echo Edit the Config file
echo
echo Please look at
echo
echo
echo AWSTATS_DIR = no
echo SECONDARY_DNS =
echo TOUCH = /bin/touch
echo APACHE_CMD = /usr/sbin/apachectl
echo
echo
read -n 1 -p 'Press any key to continue ......'

vi /etc/ispcp/ispcp.conf
######################################


clear
######################################
echo \********************
echo Prep work done!
echo now run:
echo perl /var/www/ispcp/engine/setup/ispcp-setup
######################################

courier-install
Code:
echo Courier Installer
echo Version: BETA1

yum -y install expect libtool-ltdl
cp -f ./courier*.rpm /usr/local/

cd /usr/local/

rpm -i courier-authlib-0.59.3-1.fc7.mf.i386.rpm
rpm -i courier-authlib-userdb-0.59.3-1.fc7.mf.i386.rpm
rpm -i 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

cfg_entry.tpl
Code:
zone "{DMN_NAME}" {
    type    master;
    file    "/var/named/data/{DMN_NAME}.db";
    notify    YES;
};

these are my first attempts at scripting in linux so if i have missed something or total botched let me know

Anyways do with it what you will
09-11-2007 07:54 AM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #2
RE: fedora 7 setup - trunk build
Why don't you modify the files under config/dists/fedora to get them working and submit the modifications as a patch? that way you would really help the users
09-11-2007 09:11 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: fedora 7 setup - trunk build
raphael Wrote:Why don't you modify the files under config/dists/fedora to get them working and submit the modifications as a patch? that way you would really help the users


i have no idea how to sumbit a patch...

anyways here the updates


Attached File(s)
.zip  ispcp-omega-trunk-20070911.zip (Size: 16.3 KB / Downloads: 7)
09-12-2007 11:18 AM
Find all posts by this user Quote this message in a reply
graywolf Offline
Junior Member
*

Posts: 43
Joined: Sep 2007
Reputation: 1
Post: #4
RE: fedora 7 setup - trunk build
Updated installer which downloads the files

Code:
echo Courier Installer
echo Version: BETA1

yum -y install expect libtool-ltdl
cp -f ./courier*.rpm /usr/local/

cd /usr/local/
wget http://www.thatfleminggent.com/packages/fedora/7/i386/courier-authlib-0.59.3-1.fc7.mf.i386.rpm
wget http://www.thatfleminggent.com/packages/fedora/7/i386/courier-authlib-userdb-0.59.3-1.fc7.mf.i386.rpm
wget http://www.thatfleminggent.com/packages/fedora/7/i386/courier-imap-4.1.3-1.fc7.mf.i386.rpm

rpm -i courier-authlib-0.59.3-1.fc7.mf.i386.rpm
rpm -i courier-authlib-userdb-0.59.3-1.fc7.mf.i386.rpm
rpm -i 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

and add
Code:
wget -P /tmp/core http://hany.sk/mirror/fedora/releases/7/Everything/i386/os/Fedora/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
before
rpm -i /tmp/core/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
(This post was last modified: 09-12-2007 11:38 AM by graywolf.)
09-12-2007 11:25 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: fedora 7 setup - trunk build
Cool Thanks!
I´m no fedora user but this could help many out there.

Maybe we could fix this with the script here -> http://www.isp-control.net/ispcp/ticket/626

Greez BeNe
09-12-2007 07:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RatS Offline
Project Leader
******

Posts: 1,854
Joined: Oct 2006
Reputation: 17
Post: #6
RE: fedora 7 setup - trunk build
graywolf Wrote:anyways here the updates

You're zip file is not deflateable. Please repack, so I'll check it.
09-12-2007 11:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: fedora 7 setup - trunk build
Confirm!
Tested with WinZip & WinRar.

Greez BeNe
09-12-2007 11:55 PM
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: #8
RE: fedora 7 setup - trunk build
strange

anyways here another copy

when the updates are in the trunk ill write a full un attended install script which includes setting all the services to start etc


Attached File(s)
.zip  ispcp-omega-trunk-20070911.zip (Size: 15.46 KB / Downloads: 13)
(This post was last modified: 09-13-2007 09:20 AM by graywolf.)
09-13-2007 09:11 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: fedora 7 setup - trunk build
This Zip works now! Thanks...
Now RatS can take a look at it.

Greez BeNe
09-13-2007 03:33 PM
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: #10
RE: fedora 7 setup - trunk build
found a problem with post fix

it was /etc/postfix main.cf and master.cf that was incorrect and send mail causing issues

its works 100% now

Im about to do a final test of a install script (with my trunk fixes included)

heres what it did
Code:
Updated: /docs/Fedora/fedora packages
  + proftpd-mysql
  + cpanrpm

Updated: /configs/dist/fedora/ispcp.conf
  * CMD_HTTPD = /usr/sbin/httpd
  * CMD_TOUCH = /bin/touch

Updated: /config/dist/fedora/bind/parts/cfg_entry.tpl
  * file     "/var/named/data/{DMN_NAME}.db";

Updated: /config/dist/fedora/bind/named.conf
  - view localhost_resolver {
  -      match-clients      { localhost; };
  -      match-destinations { localhost; };
  -      recursion yes;
  -      include "/etc/named.rfc1912.zones";
  -      include "/etc/named-ispcp.conf";
  - };

Updated: /config/dist/fedora/bind/working/named.conf
  - view localhost_resolver {
  -      match-clients      { localhost; };
  -      match-destinations { localhost; };
  -      recursion yes;
  -      include "/etc/named.rfc1912.zones";
  -      include "/etc/named-ispcp.conf";
  - };

Updated: /config.dist/fedora/postfix/master.cf
  * smtp      inet  n       -       n       -       -       smtpd
  * smtp      unix  -       -       n       -       -       smtp
(This post was last modified: 09-14-2007 11:40 AM by graywolf.)
09-14-2007 09:57 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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