debian6 安装ispconfig3

今天自己在以前购买的美国vps上测试了下这个管理面板!安装记录记录下来。以备后用!

首先设置主机名为ispconfig3

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

 

然后运行hostname命令可以验证一下是否生效,如果没有,就运行reboot试试,重启后应该就生效了吧。

然后要保证ispconfig3指向本地地址127.0.0.1

 

echo 127.0.0.1 ispconfig3 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

 

源文件/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: Create directories for web-based administration? General type of mail configuration: System mail name: (这里你可以添加自己的域名或者其他)

#Web server to reconfigure automatically: (这里是yes我选择的是)

#Configure database for phpmyadmin with dbconfig-common? (yes)

配置一下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  #变成这样
/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 Vlogger, Webalizer, AWstats

apt-get install bind9 dnsutils 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_amd64.deb   #我的是64位,如果你的是32位那不是这个
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 Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>  D


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server
    gmail       = IMAP access to Google mail (Gmail) accounts

    quit        = Do not change anything
Command >>   dovecot

Command >> S 

## 最后S保存退出就行了 
## 现在您可以通过 http://your_ip/webmail/ 来访问SquirrelMail

#安装 ISPConfig 3

wget http://jaist.dl.sourceforge.net/project/ispconfig/ISPConfig%203/ISPConfig-3.0.5/ISPConfig-3.0.5.tar.gz
tar xfz ISPConfig-3.0.5.tar.gz
cd ispconfig3_install/install/
php -q install.php

## 下面会出来一个安装配置的东西。大家按照提示就行了。很简单的提示!
## 提示安装完成之后 就可以进入管理了 
http://IP:8080 
admin /   admin  

已有 2 条评论
  1. ルイヴィトン コピー 通販

    指標とデジタルスケールを表示するために2つの同一のテーブルディスク層スーパーLumiNova強い発光コーティング、間に挟まれた”サンドイッチ型”のダイヤル構造 ロレックス時計。次に、この”サンドイッチ型”のダイヤルは、時計の明瞭性を向上させると、暗い水中環境ではなく、ダイヤル目盛を読むことが明確かつ容易に確保するために設計されています。

  2. シャネル 時計 j12

    リシュモン傘下英倫贅沢な紳士服や皮具ブランドダンヒル(Alfred近日Dunhill)を任命したと発表しEraldo Polettoを最高経営責任者は、2012年11月5日から発効する ヴィトン モノグラム ビニール コピー。

    シャネル 時計 j12 回复
发表新评论