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


Post Reply 
ISPCP Debian Lenny Autoinstaller
Author Message
alecksievici Offline
Junior Member
*
Beta Team

Posts: 112
Joined: May 2008
Reputation: 0
Post: #1
ISPCP Debian Lenny Autoinstaller
I've created a bash script that simplifies the install process of ISPCP in Debian Lenny. The only step you have to take before using the script si to set a valid FQDN.

Code:
#!/bin/bash
#
# +----------------------------------------------------------------------------+
# | ISPCP 1.0.6 - Debian Lenny Install Script v0.1a                            |
# | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
# | Usage: chmod +x ispcp-debian.sh ; ./ispcp-debian.sh                        |
# +----------------------------------------------------------------------------+
#

# Clear the screen
clear

# Set colors & stuff
red='\E[31m'
white='\E[37m'
bold='\033[1m'
resetcolors=`tput sgr0`

# Install function for automatization
function install_ispcp {

# Modify sources.list according to ISPCP requirements
cp -f /etc/apt/sources.list /etc/apt/sources.list.old

echo "deb http://ftp.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main
deb http://volatile.debian.org/debian-volatile lenny/volatile main" > /etc/apt/sources.list

# Update, install aptitude and some required packages for install
apt-get update
apt-get -y install aptitude
aptitude update
aptitude -y install tar bzip2 wget lsb-release perl

# Make ispcp src dir & enter it
mkdir -p /usr/local/src/ispcp
cd /usr/local/src/ispcp

# Download ISPCP 1.0.6
wget="$(which wget)"
tar="$(which tar)"

$wget --output-document=ispcp-omega-1.0.6.tar.bz2 http://sourceforge.net/projects/ispcp/files/ispCP%20Omega/ispCP%20Omega%201.0.6/ispcp-omega-1.0.6.tar.bz2/download
$tar -xf ispcp-omega-1.0.6.tar.bz2

cd ispcp-omega-1.0.6/

# Installing required packages for ISPCP
aptitude -y install $(cat ./docs/Debian/debian-packages-`lsb_release -cs`)

# Make install ISPCP
make install

# Copy files
cp -R /tmp/ispcp/* /

# Setting MySQL
mysql_secure_installation

# Enter ISPCP setup
perl="$(which perl)"
cd /var/www/ispcp/engine/setup
$perl ./ispcp-setup

# Removing unedeed files
rm -fR /tmp/ispcp
rm -fR /usr/local/src/ispcp

# You're done!
}

echo -e $bold$red"You should use this script only on a freshly installed Debian Lenny!"$resetcolors
echo -e $bold"Before installing please set up a correct FQDN: "$resetcolors"http://isp-control.net/documentation/howto:hostname"
echo -e $bold"Download the latest version: "$resetcolors"http://ispcp.greenbit.ro/ispcp-debian.sh"
echo ""
echo -e "When you get to the courier screen select "$bold"no"$resetcolors" to web directories."
echo -e "When you get to the postfix screen select "$bold"internet site"$resetcolors". If your debian setup is correct your domain should already be displayed on the screen. If not, enter the domain without the 'www.' portion (i.e. yourdomain.com)."
echo -e "Select "$bold"no"$resetcolors" when you are asked if you would like to create directories for web-based administration"
echo -e "When you get to the proftpd screen, select "$bold"standalone"$resetcolors"."
echo ""

read -p "Continue (y/n)? " choice
   case "$choice" in
      y|Y ) install_ispcp;;
      n|N ) exit 1;;
      * ) exit 1;;
esac

If you see any bugs let me know. This script was tested and it works.

Cheers,
Alex
09-27-2010 10:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
ISPCP Debian Lenny Autoinstaller - alecksievici - 09-27-2010 10:48 PM

Forum Jump:


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