ispCP - Board - Support
ISPCP Debian Lenny Autoinstaller - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Enhancements (/forum-43.html)
+--- Thread: ISPCP Debian Lenny Autoinstaller (/thread-11759.html)



ISPCP Debian Lenny Autoinstaller - alecksievici - 09-27-2010 10:48 PM

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


RE: ISPCP Debian Lenny Autoinstaller - RatS - 09-28-2010 01:11 AM

Thank you Alex.

I hope, that some people try the script and give feedback. We could add it as contrib in Release 1.0.7 if it is tested.

PS: I moved the post to Enhancements.


RE: ISPCP Debian Lenny Autoinstaller - alecksievici - 11-26-2010 06:00 PM

I've updated the script to work with ISPCP 1.0.7
Code:
wget http://ispcp.greenbit.ro/ispcp-debian.sh
chmod +x ispcp-debian.sh
./ispcp-debian.sh

Enjoy and good luck.


RE: ISPCP Debian Lenny Autoinstaller - RatS - 11-26-2010 06:44 PM

great, do you want to help us improving the installation and upgrade process to reduce manual steps?


RE: ISPCP Debian Lenny Autoinstaller - Jillian - 11-26-2010 11:25 PM

Few suggestion to script.
Get closest mirrors to sources.list. Check this.
One other this is if ispCP team can make package ispcp-omega-latest.tar.bz2, you dont have to make modifications to script, when new release is out.


RE: ISPCP Debian Lenny Autoinstaller - giotjuh - 12-31-2011 01:53 AM

Awesome mate! Maybe one for the 1.1.0 beta release to test it out Big Grin