VPS侦探论坛

 找回密码
 注册
查看: 6642|回复: 0

debian 6 VPS ISPConfig 3安装教程

[复制链接]
发表于 2011-4-21 11:08:40 | 显示全部楼层 |阅读模式

首先设置主机名为ispconfig3.d6

echo ispconfig3.d6 > /etc/hostname
/etc/init.d/hostname.sh start

然后运行hostname命令可以验证一下是否生效,如果没有,就运行reboot试试,重启后应该就生效了吧。
然后要保证ispconfig3.d6指向本地地址127.0.0.1

echo 127.0.0.1 ispconfig3.d6 localhost localhost.localdomain > /etc/hosts

然后在VPS上运行ping ispconfig3.d6就可以看到ping的是127.0.0.1了。如果不是127.0.0.1,那就重新再来一遍吧。
运行如下命令改变默认的shell为bash,选择NO,不要选YES

dpkg-reconfigure dash

保证Debian VPS的软件源文件/etc/apt/sources.list内容如下,不管你用什么编辑器,达到目的即可:

deb http://ftp.us.debian.org/debian squeeze main
deb http://ftp.us.debian.org/debian squeeze-updates main
deb http://security.debian.org/ squeeze/updates main

运行如下命令安装必要的软件:

apt-get update
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop getmail4 rkhunter binutils sudo
apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby
apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

以上命令在安装软件的过程中会问几个问题,其中几个问题解释如下:
New password for the MySQL "root" user: <-- mysql的root密码
Create directories for web-based administration? <-- No
General type of mail configuration: <-- Internet Site
System mail name: <-- ispconfig3.d6
#Web server to reconfigure automatically: <-- apache2
#Configure database for phpmyadmin with dbconfig-common? <-- No
配置一下apache

a2enmod suexec rewrite ssl actions include
a2enmod dav_fs dav auth_digest
/etc/init.d/apache2 restart

编辑mysql的配置文件/etc/mysql/my.cnf,在如下行前面加#字符注释掉:

bind-address = 127.0.0.1

注释之后的样子是:

#bind-address = 127.0.0.1

然后运行如下命令重启mysql

/etc/init.d/mysql restart

运行如下命令配置一下pop3和imap服务:

cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem
sed -i 's/CN=localhost/CN=ispconfig3.d6/' /etc/courier/imapd.cnf
sed -i 's/CN=localhost/CN=ispconfig3.d6/' /etc/courier/pop3d.cnf
mkimapdcert
mkpop3dcert
/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop-ssl restart

配置一下PureFTPd

sed -i 's/VIRTUALCHROOT=false/VIRTUALCHROOT=true/' /etc/default/pure-ftpd-common
echo 1 > /etc/pure-ftpd/conf/TLS
mkdir -p /etc/ssl/private/
openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
chmod 600 /etc/ssl/private/pure-ftpd.pem
/etc/init.d/pure-ftpd-mysql restart
sed -i 's/defaults,errors=remount-ro/errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0/' /etc/fstab
mount -o remount /
quotacheck -avugm
quotaon -avug

#安装BIND DNS Server

apt-get install bind9 dnsutils

#安装 Vlogger, Webalizer, AWstats

apt-get install vlogger webalizer awstats

#安装 Jailkit

apt-get install build-essential autoconf automake1.9 libtool flex bison debhelper
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.13.tar.gz
tar xvfz jailkit-2.13.tar.gz
cd jailkit-2.13
./debian/rules binary
cd ..
dpkg -i jailkit_2.13-1_*.deb
rm -rf jailkit-2.13*

#安装 fail2ban

apt-get install fail2ban
cd /etc/fail2ban/
rm -rf jail.local
wget http://dl.rashost.com/ispconfig3/fail2ban/jail.local
cd /etc/fail2ban/filter.d/
rm -rf courierimap.conf
rm -rf courierimaps.conf
rm -rf courierpop3.conf
rm -rf courierpop3s.conf
rm -rf pureftpd.conf
wget http://dl.rashost.com/ispconfig3/fail2ban/filter.d/courierimap.conf
wget http://dl.rashost.com/ispconfig3/fail2ban/filter.d/courierimaps.conf
wget http://dl.rashost.com/ispconfig3/fail2ban/filter.d/courierpop3.conf
wget http://dl.rashost.com/ispconfig3/fail2ban/filter.d/courierpop3s.conf
wget http://dl.rashost.com/ispconfig3/fail2ban/filter.d/pureftpd.conf
/etc/init.d/fail2ban restart

#安装 SquirrelMail

apt-get install squirrelmail
ln -s /usr/share/squirrelmail/ /var/www/webmail
squirrelmail-configure

#配置 SquirrelMail 使用 Courier-IMAP/-POP3
现在您可以通过 http://your_ip/webmail/ 来访问SquirrelMail
#安装 ISPConfig 3

cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
php -q install.php

到这里ISPconfig3就算安装好了,您可以使用http://your_ip:8080/ 来访问ISPconfig3
帐号admin密码admin
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-23 10:24 , Processed in 0.029423 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表