Archive

Posts Tagged ‘debian vhcs2 install’

Install vhcs2 panel under debian(shell scripts)

September 15th, 2010 No comments

vhcs2_debian.sh,chmod +x ./vhcs2_debian.sh,./vhcs2_debian.sh.In the process,you must type in the main ip of your server.And,set the parameters during the installation(for example,mysql password etc.)

Here it goes:
#!/bin/bash
#by doxer.org
read -p ‘enter the main ip of the server:’ mainip #main ip of the server
read -p ‘input your hostname:’ your_hostname
echo -e “127.0.0.1 $your_hostname $your_hostname\n$mainip $your_hostname $your_hostname” >/etc/hosts
echo $your_hostname >/etc/hostname
/etc/init.d/hostname.sh start
echo -e “deb http://ftp.debian.org/debian/ lenny main contrib non-free\ndeb http://security.debian.org/ lenny/updates main contrib non-free” >>/etc/apt/sources.list
apt-get update
apt-get -y install gcc
apt-get install ssh openssh-server
apt-get install tar bzip2 wget lsb-release
wget http://server5.moll-newmedia.de/vhcs-2.4.8.tar.bz2
tar -xjvf vhcs-2.4.8.tar.bz2
echo -e “gcc
apache2
apache2.2-common
apache2-mpm-prefork
bind9
bzip2
courier-authdaemon
courier-base
courier-imap
courier-maildrop
courier-pop
diff
dnsutils
gzip
iptables
libapache2-mod-php5
libberkeleydb-perl
libc6-dev
libcrypt-blowfish-perl
libcrypt-cbc-perl
libcrypt-passwdmd5-perl
libdate-calc-perl
libdate-manip-perl
libdbd-mysql-perl
libdbi-perl
libio-stringy-perl
libmail-sendmail-perl
libmailtools-perl
libmcrypt4
libmd5-perl
libmime-perl
libnet-dns-perl
libnet-netmask-perl
libnet-smtp-server-perl
libperl5.10
libsasl2-2
libsasl2-modules
libsnmp-session-perl
libterm-readkey-perl
libterm-readpassword-perl
libtimedate-perl
make
mysql-client
mysql-common
mysql-server
original-awk
patch
perl
perl-base
perl-modules
php5
php5-gd
php5-mcrypt
php5-mysql
php-pear
postfix
postfix-tls
procmail
proftpd
sasl2-bin
ssh
tar
wget” >/root/debian5-packages.txt

apt-get -y install `cat /root/debian5-packages.txt` #some options:Internet Site;standalone;
sed -i ‘s/START=no/START=yes/’ /etc/default/saslauthd
cd /root/vhcs-2.4.8
make -f Makefile install
cp -R /tmp/vhcs-2.4.8/* /
/var/www/vhcs2/engine/setup/vhcs2-setup
sed -i ‘s/#Include \/etc\/proftpd\/modules.conf/Include \/etc\/proftpd\/modules.conf/’ /etc/proftpd/proftpd.conf
sed -i ‘s/DisplayFirstChdir/DisplayChdir/’ /etc/proftpd/proftpd.conf
sed -i ‘s/#LoadModule mod_sql.c/LoadModule mod_sql.c/’ /etc/proftpd/modules.conf
sed -i ‘s/#LoadModule mod_sql_mysql.c/LoadModule mod_sql_mysql.c/’ /etc/proftpd/modules.conf
apt-get install php5-curl
sed -i ‘s/display_errors = On/display_errors = Off/’ /etc/php5/apache2/php.ini
cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
cp /etc/apache2/mods-available/ssl.* /etc/apache2/mods-enabled/
sed -i ‘s/^AllowOverride.*$/AllowOverride All/’ /etc/vhcs2/apache/parts/dmn_entry.tpl
sed -i ‘s/^MaxClients.*$/MaxClients 100/’ /etc/apache2/apache2.conf
/etc/init.d/proftpd start
/etc/init.d/apache2 restart
#set password for root:set password for ‘root’@’localhost’ = password(‘yourpassword’);
echo “Please visit http://$mainip/vhcs2 to see whether it’s working now.Bye.”