User Tools

Site Tools


Sidebar


Tags Cloud
fast_debian

Быстрая установка Dedikit из готового джейла в Debian

#!/bin/bash

DOMAIN=""
JAIL_IP=""
CLIENT_DB=""

if [[ -z $CLIENT_DB ]]; then
  echo "Please fill ALL \$VARIABLES !!!";
  exit 1;
fi

echo "nameserver 8.8.8.8" > /etc/resolv.conf

apt-get update
apt-get install -y vim bzip2
wget http://kyxap.org.ua/rc/vimrc -O ~/.vimrc

update-rc.d -f exim4 disable
killall -9 exim4

modprobe ppp_mppe
modprobe iptable_nat

echo "modprobe ppp_mppe
modprobe iptable_nat
/opt/scripts/firewall.sh &" > /etc/rc.local

mkdir /home/jails
cd /home/jails
wget http://cgiproxy.hqhost.net/nph-proxy.cgi/000000A/http/dist.hqhost.net/kyxap/dedikit-default-i386.tar.bz2
tar xf dedikit-default-i386.tar.bz2
mv dedikit-default-i386 $CLIENT_DB

echo "/home/jails/$CLIENT_DB/initjail.sh &" >> /etc/rc.local

# NEED TO CONTINUE!
sed "s/mx1.hqhost-dedicated.net/$DOMAIN/g" -i /home/jails/$CLIENT_DB/start.sh


echo "you neet to tune manually:
1. host/jail ssh
2. set root jail password
3. set mysql jail password
4. set correct smmta owner instead wrong 100 uid:

smmta="/var/run/sendmail/mta
/var/spool/mqueue
/var/lib/sendmail
/etc/mail
/etc/mail/tls
/etc/mail/sasl
/etc/mail/sasl/Sendmail.conf.2
/etc/mail/m4
/etc/mail/smrsh
/etc/mail/default-auth-info
/etc/mail/access.db
/etc/mail/aliases.db
/etc/mail/virtusertable.db"
for i in "$smmta"; do
  chown smmta:smmsp $i;
done

5. rm -r /etc/awstats; ln -s /opt/dedikit/autogen/logprocessor_awstats/logprocessor_awstats /etc/awstats
6. set backup
7. set firewall
8. change registration email to client email

"
fast_debian.txt · Last modified: 2013/12/15 16:58 by kyxap