linux 服务器配置资料二

Posted 11 months, 1 week ago at 11:32 am. 0 comments

as4+postfix+cyrus-sasl+mysql+postfixadmin+courier-imap+courier-maildrop+squirrelmail+clamav+spamassassin+amavisd-new

转载请注明出处
最后更新日期:2006年8月3日
2004年10左右成稿

1.mysql

2.apache

3.php

4.cyrus-sasl

5.postfix

6.postfixadmin

7.courier-authlib

8.courier-imap

9.courier-maildrop

10.测试

11.webmail
11.1.squirrelmail

12.clamav

13.amavisd-new

14.spamassassin

15.附:启动脚本

本文用到的软件

MySQL 5.0.15
网站:http://www.mysql.com
下载
APACHE 2.0.55
网站:http://www.apache.org
下载
PHP 4.4.1
网站:http://www.php.net
下载
Cyrus-SASL 2.1.21
网站:http://asg.web.cmu.edu/sasl
下载
Postfix 2.2.5
网站:http://www.postfix.org
下载
PostfixAdmin 2.1.0
网站:http://www.postfixadmin.com
下载
Courier-authlib 0.57
网站:http://www.courier-mta.org/authlib
下载
Courier-IMAP 4.0.6
网站:http://www.courier-mta.org/imap
下载
Courier-maildrop 2.0.1
网站:http://www.courier-mta.org/maildrop
下载
SquirrelMail 1.4.5
网站:http://www.squirrelmail.org
下载
Extmail 0.20
网站:http://www.extmail.org
下载
clamav 0.87
网站:http://www.clamav.net
下载
amavisd-new 2.3.3
网站:http://www.ijs.si/software/amavisd
下载
Spamassassin 3.1.0
网站:http://spamassassin.apache.org
下载
我以前那篇文章中密码加密有问题(密码一加密,smtp认证就通不过),所以下定决心更新一下。这次sasl密码验证机制改为authdaemond(感谢网友606),并把测试部分单独列出来。很多人问起我的安装环境,我安装linux的时候,只选了开发工具,其他的都没选,还有,这些软件包安装的时候都没有依赖性问题,有的话,我也提出来了。

1.安装 mysql 5.0.15
# wget http://dev.mysql.com/get/Downloads/MySQL-5…ysql.new21.com/
# tar zxvf mysql-5.0.15.tar.gz
# cd cd mysql-5.0.15
# groupadd mysql
# useradd -g mysql mysql
# CFLAGS=”-O3″ CXX=gcc CXXFLAGS=”-O3 -felide-constructors -fno-exceptions -fno-rtti” \
./configure –prefix=/usr/local/mysql \
–enable-assembler –with-mysqld-ldflags=-all-static –with-charset=gbk
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf

设置自启动
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig –add mysqld

安装完以后要初始化数据库
# cd /usr/local/mysql
# /usr/local/mysql/bin/mysql_install_db –user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .

好了,至此mysql安装完毕,你可以这样起动你的mysql服务
# service mysqld start

为了能让系统找到mysql,请运行如下命令
# PATH=$PATH:/usr/local/mysql/bin
# export PATH
# echo “/usr/local/mysql/lib/mysql” >> /etc/ld.so.conf
# ldconfig

Go to top.

2.安装 apache 2.0.55
# wget http://apache.freelamp.com/httpd/httpd-2.0.55.tar.bz2
# tar jxvf httpd-2.0.55.tar.bz2
# cd httpd-2.0.55
# ./configure –prefix=/usr/local/apache
# make
# make install

设置自启动
# cp support/apachectl /etc/init.d/httpd

修改/etc/init.d/httpd
# vi /etc/init.d/httpd(前面几行改成如下样子)
#!/bin/sh
#
# Startup script for the Apache Web Server
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/log/httpd.pid
# config: /usr/local/apache/conf/httpd.conf

# chkconfig –add httpd
# chmod 755 /etc/init.d/httpd
# chkconfig httpd on

创建网页根目录
# mkdir /var/www

修改apache配置文件
# vi /usr/local/apache/conf/httpd.conf
//存放网页的目录,原来为DocumentRoot “”,改成:
DocumentRoot “/var/www”
//这句应该和DocumentRoot 的目录保持一致,原来为,改成:

//Indexes:当在目录中找不到DirectoryIndex列表中指定的文件就生成当前目录的文件列表
//FollowSymlinks:允许符号链接跟随,访问不在本目录下的文件
Options Indexes FollowSymLinks
//禁止读取.htaccess配置文件的内容
AllowOverride None
//指定先执行Allow(允许)访问规则,再执行Deny(拒绝)访问规则
Order allow,deny
//设置Allow(允许)访问规则,允许所有连接
Allow from all

启动服务
# service httpd start

Go to top.

3.安装php 4.4.1
# wget http://cn.php.net/get/php-4.4.1.tar.bz2/fr…rom/this/mirror
# tar jxvf php-4.4.1.tar.bz2
# cd php-4.4.1
# ./configure \
–prefix=/usr/local/php \
–with-mysql=/usr/local/mysql \
–with-apxs2=/usr/local/apache/bin/apxs
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini

# vi /usr/local/php/lib/php.ini
;default_charset = “iso-8859-1″
在这行下面加一行
default_charset = “gbk”

# vi /usr/local/apache/conf/httpd.conf
找到#AddType application/x-tar .tgz 这行,在下面加两行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php
DirectoryIndex index.html index.html.var index.php
注意:改变了http.conf后,要重启apache服务

Go to top.

4.安装 cyrus-sasl 2.1.21
先关闭as4默认安装的sasl
# mv /usr/lib/sasl /usr/lib/sasl.OFF
# mv /usr/lib/sasl2 /usr/lib/sasl2.OFF

编译安装cyrus-sasl2.1.21
# wget http://ftp.andrew.cmu.edu/pub/cyrus-mail/c…l-2.1.21.tar.gz
# tar zxvf cyrus-sasl-2.1.21.tar.gz
# cd cyrus-sasl-2.1.21
# ./configure \
–disable-anon -enable-plain –enable-login \
–enable-sql –with-mysql=/usr/local/mysql \
–with-mysql-includes=/usr/local/mysql/include/mysql \
–with-mysql-libs=/usr/local/mysql/lib/mysql \
–with-authdaemond
# make
# make install

更新lib库
# echo “/usr/local/lib” >> /etc/ld.so.conf
# ldconfig

重要
# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2

Go to top.

5.安装postfix 2.2.5
如果你的系统上原来有sendmail,先将其停止并将其文件改名
# /etc/init.d/sendmail stop
# chkconfig –level 0123456 sendmail off
# mv /usr/bin/newaliases /usr/bin/newaliases.orig
# mv /usr/bin/mailq /usr/bin/mailq.orig
# mv /usr/sbin/sendmail /usr/sbin/sendmail.orig

开始安装
# groupadd -g 12345 postfix
# useradd -u 12345 -g 12345 -c postfix -d/dev/null -s/sbin/nologin postfix
# groupadd -g 54321 postdrop
# wget ftp://postfix.cn99.com/postfix/official/p…ix-2.2.5.tar.gz
# tar zxvf postfix-2.2.5.tar.gz
# cd postfix-2.2.5
(Building Postfix with SASL authentication and mysql support)
# make -f Makefile.init makefiles \
‘CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl’ \
‘AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2′
# make install

注意:
本例中Mysql安装在/usr/lcoal/mysql,sasl2安装在/usr/lib/sasl2。如果安装路径不同,请自行修改编译时CCARGS和AUXLIBS选项。
在执行make install的时候可能会得到如下的提示:
/usr/libexec/ld-elf.so.1: Shared object “libmysqlclient.so.12″ not found
这是因为mysql不是安装在默认目录中的,所以需要告诉postfix应该到哪里去找libmysqlclient.so.12,使用ldconfig就可以达到这个目的
# echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
# ldconfig

Go to top.

6.安装postfixadmin 2.1.0
建立apache和maildrop的用户和组
# groupadd vmail -g 1001
# useradd vmail -u 1001 -g 1001 -s/sbin/nologin -d/dev/null

# vi /usr/local/apache/conf/httpd.conf

User nobody
Group #-1
改为
User vmail
Group vmail

# wget http://high5.net/postfixadmin/download.php…admin-2.1.0.tgz
# tar -zxvf postfixadmin-2.1.0.tgz
# mv postfixadmin-2.1.0 /var/www/postfixadmin
更改权限,假定运行apache的用户和组为vmail
# chown -R vmail:vmail /var/www/postfixadmin
# cd /var/www/postfixadmin
# chmod 640 *.php *.css
# cd /var/www/postfixadmin/admin/
# chmod 640 *.php .ht*
# cd /var/www/postfixadmin/images/
# chmod *.png
# cd /var/www/postfixadmin/languages/
# chmod 640 *.lang
# cd /var/www/postfixadmin/templates/
# chmod 640 *.tpl
# cd /var/www/postfixadmin/users/
# chmod 640 *.php

建立mysql表
# cd /var/www/postfixadmin
# mysql -u root < DATABASE_MYSQL.TXT
# cp config.inc.php.sample config.inc.php
# vi config.inc.php
本例中的配置如下:
$CONF['default_language'] = 'cn';
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'postfixadmin';
$CONF['database_name'] = 'postfix';
$CONF['encrypt'] = 'md5crypt';
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['quota'] = 'YES';
$CONF['quota_multiplier'] = '1024000';

邮箱的存储格式使用domain.ltd/username的形式,所以设置:
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';

然后打开浏览器,进入postfixadmin的欢迎界面,点击网页上的setup,看看检查是否通过,记得要删除setup.php文件。然后进入http://www.yourdomain.com/postfixadmin/admin/index.php,就可以新建域名、管理员以及邮箱了。

Go to top.

# vi /etc/postfix/main.cf
#=====================BASE=========================
myhostname = www.test.com
mydomain = test.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomain
mynetworks = 127.0.0.0/8
inet_interfaces = all

#=====================Vritual Mailbox settings=========================
virtual_mailbox_base = /var/mailbox
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1

#====================QUOTA========================
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes

#====================SASL========================
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
reject_unauth_destination,
permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"

Go to top.

建立/var/mailbox并设置权限
# mkdir /var/mailbox
# chown -R vmail:vmail /var/mailbox
# chmod -R ug+rwx,o-rwx /var/mailbox

建立/etc/postfix/mysql文件夹和MySQL查询配置文件
# mkdir /etc/postfix/mysql
1、vi /etc/postfix/mysql/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address

2、vi /etc/postfix/mysql/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'

3、vi /etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'

4、vi /etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'

Go to top.

配置 /usr/local/lib/sasl2/smtpd.conf
sasl密码验证机制为authdaemond
# vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method:authdaemond
log_level:3
srp_mda:md5
password_format:crypt
mech_list:PLAIN LOGIN
authdaemond_path: /usr/local/var/spool/authdaemon/socket

Go to top.

7.安装Courier-authlib 0.57
新版本的imap不再包含authentication library,必须先安装 Courier authentication library
# wget http://www.courier-mta.org/beta/courier-au...0051004.tar.bz2
# tar jxvf courier-authlib-0.57.20051004.tar.bz2
# cd courier-authlib-0.57.20051004
# ./configure \
--with-redhat \
--with-authmysql=yes \
--with-mailuser=vmail --with-mailgroup=vmail \
--with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql/
# make
# make install
# make install-configure

重要
# chmod +x /usr/local/var/spool/authdaemon/

# vi /usr/local/etc/authlib/authdaemonrc
authmodulelist="authmysql"

# vi /usr/local/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE postfix
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_USER_TABLE mailbox
MYSQL_LOGIN_FIELD username
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '1001'
MYSQL_GID_FIELD '1001'
MYSQL_HOME_FIELD '/var/mailbox/'
MYSQL_MAILDIR_FIELD maildir
MYSQL_NAME_FIELD name
MYSQL_QUOTA_FIELD concat(quota,'S')
MYSQL_WHERE_CLAUSE active='1'
DEFAULT_DOMAIN test.com
注意:确认在这个文件中不能用空格键(包括行尾),只能用tab键。
确认只使用单引号,比如:'/var/mailbox/','UID','GID'(本文为'1001')
localhost不能用单引号
确认你的/etc/hosts文件中有localhost
编译时如果支持Ipv6可能导致错误
MYSQL_GID_FIELD 和MYSQL_UID_FIELD是maildrop的UID和GID,而不是MySQL的

启动服务
自启动:
# cp courier-authlib.sysvinit /etc/rc.d/init.d/courier-authlib
# chmod 755 /etc/rc.d/init.d/courier-authlib
# chkconfig --level 0123456 courier-authlib on
手动启动服务:
# authdaemond start

Go to top.

8.安装Courier-imap 4.0.6
# wget http://www.courier-mta.org/beta/imap/couri...0051004.tar.bz2
# tar jxvf courier-imap-4.0.6.20051004.tar.bz2
# cd courier-imap-4.0.6.20051004
# ./configure \
--prefix=/usr/local/imap \
--with-redhat \
--disable-root-check \
--enable-unicode=utf-8,iso-8859-1,gb2312,gbk,gb18030 \
--with-trashquota \
--with-dirsync
# make
# make install-strip (先install-strip,如果失败,再make install)
# make install-configure

# vi /usr/local/imap/etc/pop3d
POP3DSTART=YES

# vi /usr/local/imap/etc/imapd
IMAPDSTART=YES

让imap自启动:
# cp courier-imap.sysvinit /etc/rc.d/init.d/courier-imap
# chmod 755 /etc/rc.d/init.d/courier-imap
# chkconfig --level 0123456 courier-imap on

Go to top.

9.安装Courier-maildrop 2.0.1
先装pcre
# wget http://optusnet.dl.sourceforge.net/sourcef...cre-6.3.tar.bz2
# tar jxvf pcre-6.3.tar.bz2
# cd pcre-6.3
# ./configure
# make
# make install

# wget http://optusnet.dl.sourceforge.net/sourcef...p-2.0.1.tar.bz2
# tar jxvf maildrop-2.0.1.tar.bz2
# cd maildrop-2.0.1
# ./configure \
--prefix=/usr/local/maildrop \
--enable-sendmail=/usr/sbin/sendmail \
--enable-trusted-users='root vmail' \
--enable-syslog=1 \
--enable-maildirquota \
--enable-maildrop-uid=1001 \
--enable-maildrop-gid=1001 \
--with-trashquota \
--with-dirsync
# make
# make install
# cp /usr/local/maildrop/bin/maildrop /usr/bin
# chmod a+rx /usr/bin/maildrop

运行maildrop -v应该有如下提示信息:
maildrop 2.0.0 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.

新建/etc/maildroprc文件
# vi /etc/maildroprc
logfile "/var/mailbox/maildrop.log"
to "$HOME/$DEFAULT"

# chmod a+r /etc/maildroprc

配置Postfix
# vi /etc/postfix/master.cf
maildrop unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/maildrop/bin/maildrop -w 90 -d ${recipient}

由于maildrop没有建立及删除maildir的功能,因此由脚本实现(是否有什么安全隐患?)
# vi /etc/sudoers
vmail ALL = NOPASSWD: /usr/sbin/maildirmake.sh , /usr/sbin/maildirdel.sh

新建/usr/sbin/maildirmake.sh文件
# vi /usr/sbin/maildirmake.sh
#!/bin/bash
set -e
if [ ! -d /var/mailbox/$1 ]
then
mkdir /var/mailbox/$1
fi
chown -R vmail:vmail /var/mailbox/$1
cd "/var/mailbox/$1"
/usr/local/imap/bin/maildirmake $2
chown -R vmail:vmail /var/mailbox/$1/$2

新建/usr/sbin/maildirdel.sh文件
# vi /usr/sbin/maildirmake.sh
#!/bin/bash
rm -rf /var/mailbox/$1/$2

# chmod 755 /usr/sbin/maildirmake.sh
# chmod 755 /usr/sbin/maildirdel.sh

更改postfixadmin目录及postfixadmin/admin目录下的create-mailbox.php文件
在这两个文件的$tQuota = $CONF['maxquota'];行后加一行(postfixadmin/admin目录下的大概在200行,postfixadmin目录下的大概在?行):
# vi /var/www/postfixadmin/admin/create-mailbox.php (vi /var/www/postfixadmin/create-mailbox.php)
system("sudo /usr/sbin/maildirmake.sh $fDomain ".$_POST['fUsername']);

更改postfixadmin目录及postfixadmin/admin目录下的delete.php文件
在这两个文件的$result = db_query ("SELECT * FROM mailbox WHERE username='$fDelete' AND domain='$fDomain'");行后加几行:
# vi /var/www/postfixadmin/admin/delete.php (vi /var/www/postfixadmin/delete.php)
$userarray=explode("@",$fDelete);
$user=$userarray[0];
$domain=$userarray[1];
system("sudo /usr/sbin/maildirdel.sh $domain $user");

10.测试
启动所有服务
# service httpd start
# service mysqld start
# postfix start
# service courier-authlib start
# service courier-imap start

# netstat -ant | grep "LISTEN"
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 :::110 :::* LISTEN
tcp 0 0 :::143 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN

在postfixadmin中建立一测试帐户test@test.com

测试smtp
# perl -MMIME::Base64 -e 'print encode_base64("test\@test.com");'
dGVzdEB0ZXN0LmNvbQ==
# perl -MMIME::Base64 -e 'print encode_base64("test");'
dGVzdA==

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 www.test.com ESMTP "Version not Available"
ehlo www.test.com
250-www.test.com
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
auth login
334 VXNlcm5hbWU6
dGVzdEB0ZXN0LmNvbQ==
334 UGFzc3dvcmQ6
dGVzdA==
235 Authentication successful

测试POP3和IMAP
# telnet localhost 110
+OK Hello there
user test@test.com
+OK Password required.
pass test
+OK Logged in.
quit
+OK bye-bye

测试maildrop
# maildrop -V 9 -d test@test.com
maildrop: authlib: groupid=1001
maildrop: authlib: userid=1001
maildrop: authlib: logname=test@test.com, home=/var/mailbox/, mail=test.com/test/
maildrop: Changing to /var/mailbox/

ctrl+c退出

Go to top.

11.webmail

11.1.安装squirrelmail 1.4.5
下载squirrelmail及中文包
# wget http://keihanna.dl.sourceforge.net/sourcef...l-1.4.5.tar.bz2
# wget http://optusnet.dl.sourceforge.net/sourcef...0050904.tar.bz2
把squirreelmail解压到/var/www目录下。
# tar jxvf squirrelmail-1.4.5.tar.bz2 -C /var/www/
# mv /var/www/squirrelmail-1.4.5/ /var/www/squirrelmail
解压中文包
# tar jxvf zh_CN-1.4.5-20050904.tar.bz2 -C /var/www/squirrelmail/

在配置squirrelmail之前先下载三个插件:
Quota Usage Version 1.3
# wget http://www.squirrelmail.org/countdl.php?fi....3-1.2.7.tar.gz
Compatibility Version 2.0.2
# wget http://www.squirrelmail.org/countdl.php?fi...ty-2.0.2.tar.gz
Change MySQL Password Version 3.2
# wget http://www.squirrelmail.org/countdl.php?fi....2-1.2.8.tar.gz

把这三个插件解压到squirrelmail的plugin目录下
# tar zxvf quota_usage-1.3-1.2.7.tar.gz -C /var/www/squirrelmail/plugins/
# tar zxvf compatibility-2.0.2.tar.gz -C /var/www/squirrelmail/plugins/
# tar zxvf change_mysqlpass-3.2-1.2.8.tar.gz -C /var/www/squirrelmail/plugins/
第一个插件是用来显示邮箱的使用情况的;第二个和第三个插件是用来修改密码的。
如果不想装这些插件,请跳过。

配置Quota Usage
# cd /var/www/squirrelmail/plugins/quota_usage
# cp config.php.sample config.php

配置Change MySQL Password
# cd /var/www/squirrelmail/plugins/change_mysqlpass
# cp config.php.sample config.php
# vi config.php
更改如下几个变量:
$mysql_database = 'postfix';
$mysql_table = 'mailbox';
$mysql_userid_field = 'username';
$mysql_password_field ='password';
$mysql_manager_id = 'postfix';
$mysql_manager_pw = 'postfix';
$mysql_unixcrypt = 0;
$mysql_MD5crypt = 1;
$use_ssl_for_password_change = 0;

配置squirrelmail
# cd /var/www/squirrelmail
# ./configure
进入10. Languages
把1. Default Language : 的en_US改成zh_CN。
进入8. Plugins,添加这三个插件

# chown -R vmail:vmail /var/www/squirrelmail/data/
# chmod -R 730 /var/www/squirrelmail/data/

打开浏览器输入http://192.168.0.5/squirrelmail/,用test@test.com登陆,你将会在屏幕的左上角看到邮箱的使用情况,你还会看到一条警告信息:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /var/www/squirrelmail/plugins/change_mysqlpass/functions.php on line 129
这是由于数据库结构不一致造成的,你只要把functions.php中的129行注释调即可(在行首加//)

Go to top.

12.安装clamav 0.87
# wget http://optusnet.dl.sourceforge.net/sourcef...mav-0.87.tar.gz
# tar zxvf clamav-0.87.tar.gz
# cd clamav-0.87
# groupadd clamav
# useradd -g clamav -s/sbin/nologin -d/dev/null clamav
# ./configure --prefix=/usr/local/clamav --with-dbdir=/usr/local/share/clamav --disable-zlib-vcheck
# make
# make check
# make install

编辑/usr/local/clamav/etc/clamd.conf
# vi /usr/local/clamav/etc/clamd.conf
#Verbose logging with syslog
LogSyslog
LogVerbose
LogFacility LOG_MAIL
LogFile /var/log/clamav/clamd.log
#Change pid file location
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /usr/local/share/clamav
#Set the clamav socket
LocalSocket /var/run/clamav/clamd
#Close the connection when this limit is exceeded
StreamMaxLength 10M
#Don't run clamd as root
User amavis
#Newer versions require you to uncomment this
ScanMail
ScanArchive

编辑/usr/local/clamav/etc/freshclam.conf
# vi /usr/local/clamav/etc/freshclam.conf
DatabaseDirectory /usr/local/share/clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogSyslog
LogVerbose
DatabaseOwner amavis
#Check for updates every two hours. That is the official recommendation
Checks 12
DatabaseMirror db.CN.clamav.net
DatabaseMirror database.clamav.net
NotifyClamd

注意:一定要注释掉上面两个文件中Example那行

添加amavis用户和组
# groupadd amavis
# useradd -g amavis -s /sbin/nologin -d /dev/null amavis

创建日志文件夹并设置权限
# mkdir /var/log/clamav
# chmod -R 744 /var/log/clamav
# chown -R amavis:amavis /var/log/clamav

# chown -R amavis.amavis /usr/local/share/clamav
# mkdir /var/run/clamav
# chmod 700 /var/run/clamav
# chown amavis.amavis /var/run/clamav

手动更新病毒库
# /usr/local/clamav/bin/freshclam

启动
# /usr/local/clamav/sbin/clamd

Go to top.

13.安装amavisd-new 2.3.3

# wget http://www.ijs.si/software/amavisd/amavisd...ew-2.3.3.tar.gz
# tar zxvf amavisd-new-2.3.3.tar.gz
# cd amavisd-new-2.3.3

# mkdir -p /var/amavis /var/amavis/tmp /var/amavis/var /var/amavis/db
# chown -R amavis:amavis /var/amavis
# chmod -R 750 /var/amavis

# cp amavisd /usr/local/sbin/
# chown root /usr/local/sbin/amavisd
# chmod 755 /usr/local/sbin/amavisd

# cp amavisd.conf /etc/
# chown root /etc/amavisd.conf
# chmod 644 /etc/amavisd.conf

# cp amavisd_init.sh /etc/rc.d/init.d/amavisd
# chmod 744 /etc/rc.d/init.d/amavisd
# chkconfig --add amavisd
# chkconfig amavisd on
# vi /etc/rc.d/init.d/amavisd
prog="/usr/local/sbin/amavisd"

病毒邮件存放目录
# mkdir /var/virusmails
# chown amavis:amavis /var/virusmails
# chmod 750 /var/virusmails

Go to top.

编辑/etc/amavisd.conf,修改下面这几行
# vi /etc/amavisd.conf
$max_servers=8;
$daemon_user = 'amavis';
$daemon_group = 'amavis';
$mydomain = 'test.com';
$db_home = "$MYHOME/db";
$inet_socket_port = 10024;
$sa_tag_level_deflt = -100;
$sa_tag2_level_deflt = 6.3;
$sa_kill_level_deflt = $sa_tag2_level_deflt;
$virus_admin = "virusalert\@$mydomain";
$sa_spam_subject_tag = '***SPAM*** ';
$notify_method = $forward_method;
$forward_method = 'smtp:127.0.0.1:10025';
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],

测试amavis
# /usr/local/sbin/amavisd debug
ERROR: MISSING REQUIRED BASIC MODULES:
Time::HiRes
IO::Wrap
Unix::Syslog
Mail::Field
MIME::Words
Net::Server
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 141.
根据出错提示,缺什么装什么,我的LANG变量为en_US.UTF-8
# perl -MCPAN -e shell
cpan> install Time::HiRes
cpan> install IO::Wrap
cpan> install Unix::Syslog
cpan> install Mail::Field
cpan> install Compress::Zlib
cpan> install MIME::Words
cpan> install Net::Server
cpan> install BerkeleyDB
cpan> install Convert::TNEF
cpan> install Convert::UUlib
cpan> install Archive::Tar
cpan> install Archive::Zip
cpan> install HTML::Parser
cpan> install DB_File
cpan> install Net::DNS (提示是否test, 选择no)
cpan> install Digest::SHA1
cpan> install Mail::SpamAssassin (# export LANG=en_US)

期间MIME安装会失败,只好手动安装,跳过测试
# cd /root/.cpan/build/MIME-tools-5.418/
# perl Makefile.PL
# make install

启动
# /usr/local/sbin/amavisd start 或
# service amavisd start

Go to top.

设置postfix
修改/etc/postfix/main.cf
# vi /etc/postfix/main.cf (加入一行)
content_filter = amavis:127.0.0.1:10024
修改/etc/postfix/master.cf
# vi /etc/postfix/master.cf (在最后加上)
# amavisd-new
amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes

localhost:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o mynetworks=127.0.0.0/8
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

重新服务
# service postfix restart
# service clamd restart
# service amavisd restart

# netstat -ant | grep LISTEN (应该可以看到这两个端口在监听)
127.0.0.1.10024 *.* 0 0 49152 0 LISTEN
127.0.0.1.10025 *.* 0 0 49152 0 LISTEN

Go to top.

14.安装Spamassassin
前面装amavis的时候已经装好了,如果没装,请按如下方式安装

启动spamd
# /usr/bin/spamd –daemonize –pidfile /var/run/spamd.pid

下载中文垃圾垃圾邮件过滤规则Chinese_rules.cf
# wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf

每次更新Chinese_rules.cf需要重启spamd方法如下
# kill -HUP `cat /var/run/spamd.pid`

自动更新中文垃圾垃圾邮件过滤规则
# vi /etc/crontab (加一行)
0 0 1 * * root wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf;kill -HUP `cat /var/run/spamd.pid`

测试病毒扫描
给该test@test.com用户发送邮件,包含以下内容:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
查看日志,如果出现类似如下提示,则表明成功
Nov 6 22:06:20 localhost postfix/smtp[18276]: 9CEB657E22: to=, relay=127.0.0.1[127.0.0.1], delay=2, status=sent (250 2.7.1 Ok, discarded, id=18262-01 - VIRUS: Eicar-Test-Signature)
邮件病毒扫描日志将被记录在/var/log/clamav/clamav.log中!

测试垃圾邮件扫描
给test@test.com用户发送邮件,包含以下内容:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
查看日志,如果出现类似如下提示,表明成功
Nov 6 22:10:51 localhost amavis[18263]: (18263-01) Blocked SPAM, LOCAL [127.0.0.1] [127.0.0.1] -> , quarantine: spam-JH2LSCT1MLYg.gz, Message-ID: <1451.192.168.1.10.1131286248.squirrel@192.168.1.21>, mail_id: JH2LSCT1MLYg, Hits: 1005.902, 3591 ms

Go to top.

15.启动脚本
postfix的启动脚本:
# cat /etc/rc.d/init.d/postfix
=================================================================
#!/bin/bash
#
# mailsys This shell script takes care of starting and stopping Postfix
# author : xingyu.wang 2004/1/28
#
# chkconfig: 2345 80 30
# description: Postfix is a Mail Transport Agent, which is the program
# that moves mail from one machine to another.
#
# processname: mailsys
# pidfile: /var/run/postfix.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/postfix ] || exit 0
RETVAL=0
prog=”Postfix”

start() {
# Start daemons.
echo -n $”Starting $prog: ”
/usr/sbin/postfix start > /dev/null 2>&1 &

RETVAL=$?

if [ $RETVAL -eq 0 ]; then
touch /var/lock/subsys/postfix
success $”$prog start”
else
failure $”$prog start failure”
fi

echo
return $RETVAL
}

stop() {
# Stop daemons.
echo -n $”Shutting down $prog: ”
/usr/sbin/postfix stop > /dev/null 2>&1 &
RETVAL=$?

if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/postfix
success $”$prog stop”
else
failure $”$prog stop failure”
fi

echo
return $RETVAL
}

# See how we were called.
case “$1″ in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
*)
echo $”Usage: $0 {start|stop|restart}”
exit 1
esac
exit $RETVA

# chmod 755 /etc/rc.d/init.d/postfix
# chkconfig –level 2345 postfix on

clamav的启动脚本
# vi /etc/rc.d/init.d/clamd
=================================================================
#! /bin/bash
#
# crond Start/Stop the clam antivirus daemon.
#
# chkconfig: 2345 90 60
# description: clamdis a standard UNIX program that scans for Viruses.
# processname: clamd
# config: /usr/local/clamav/etc/clamd.conf
# pidfile: /var/run/clamav/clamd.pid

# Source function library.
. /etc/rc.d/init.d/functions

RETVAL=0

# See how we were called.

prog=”clamd”
progdir=”/usr/local/clamav/sbin”

# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi

start() {
echo -n $”Starting $prog: ”
daemon $progdir/$prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/run/clamav/clamd.pid
return $RETVAL
}

stop() {
echo -n $”Stopping $prog: ”
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamav/clamd.pid
return $RETVAL
}

rhstatus() {
status clamd
}

restart() {
stop
start
}

reload() {
echo -n $”Reloading clam daemon configuration: ”
killproc clamd -HUP
retval=$?
echo
return $RETVAL
}

case “$1″ in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/clamd ] && restart || :
;;
*)
echo $”Usage: $0 {start|stop|status|reload|restart|condrestart}”
exit 1
esac

exit 0

# chmod 755 /etc/rc.d/init.d/clamd
# chkconfig –add clamd
# chkconfig clamd on

Go to top.

Popularity: 26% [?]

Tags: , , , , , , , , ,

ubuntu 源镜像学习笔记

Posted 11 months, 1 week ago at 11:32 am. 0 comments

原文 How To Create A Local Debian/Ubuntu Mirror With apt-mirror

类似 windows 系统的SUS机制,ubuntu如果在公司范围内大量使用,到外网重复下载、update,费时费力…

笔记如下:

1. In my tests I mirrored the main, contrib, and non-free sections of Debian Sarge and the main, restricted, and universe sections of Ubuntu Edgy Eft which took about 25GB of hard disk space and about 6 hours of download time on a 16MBit DSL line.
I will not mirror security updates in this tutorial - I think it’s a good idea to always download security updates directly from the internet. That way you can be sure you get the latest ones.

不包括security的源目前大约25G。

2. This step is for all systems (Debian and Ubuntu). To install apt-mirror, please run

apt-get install apt-mirror

安装 apt-mirror

3. Later on, I want to access my new local Debian/Ubuntu mirror over http, therefore I install the Apache web server now:

apt-get install apache2

The default document root is /var/www, I will create symlinks from that directory to the location of the Debian and Ubuntu repository later on.

安装 apache2,后面再加入 symlinks。

4. apt-mirror’s configuration file is /etc/apt/mirror.list. There should already be a default configuration in it;On Ubuntu Edgy Eft, the file looks like this:


############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
set nthreads 20
set tilde 0
#
############# end config ##############

deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse

clean http://archive.ubuntu.com/ubuntu

Please note that I used ftp.de.debian.org instead of ftp.fi.debian.org and de.archive.ubuntu.com instead of archive.ubuntu.com. You should use mirrors that are close to you, so if you are in the U.S., for example, replace de with us, and so on.

The cleaning section at the end tells apt-mirror in which directories on the local hard disk it should check to see if hard disk space can be freed. I want to check the whole local repositories for both Debian and Ubuntu, therefore I specify

clean http://ftp.de.debian.org/
clean http://de.archive.ubuntu.com/

If you want to use other Debian/Ubuntu versions, simply replace sarge with etch or sid and edgy with breezy, dapper, etc.

5. Create The Local Repositories 创建本地源

Now that apt-mirror is configured, it’s time to run it for the first time and download all the packages that form the local Debian and Ubuntu repository. All we have to do is type

su - apt-mirror -c apt-mirror

apt-mirror tells you how many GB it must download. This can take a few hours, so be patient. The packages will be stored in subdirectories of the /var/spool/apt-mirror/mirror directory, so make sure the partition that holds that directory has enough disk space left.

The Debian repository will be in /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian, and the Ubuntu repository will be in /var/spool/apt-mirror/mirror/de.archive.ubuntu.com/ubuntu. If you used different mirrors in chapter 4, the paths will be a little bit different for you.

6. Clean Up The Local Repositories 清理本地源

After apt-mirror has finished downloading all packages, it will most likely tell you can free up some disk space with the /var/spool/apt-mirror/var/clean.sh script. That’s what we do now:

/bin/bash /var/spool/apt-mirror/var/clean.sh

The output will look like this:

server1:~# /bin/bash /var/spool/apt-mirror/var/clean.sh
Removing 157 unnecessary files [13316096 bytes]…
[0%]…………….done.

Removing 18 unnecessary directories…
[0%]………………done.

As you see, some MB have been freed.

7. Update The Local Repositories / Create A Daily Cron Job
更新本地源/创建cron计划任务

Updating the local mirror is easy. Simply run

su - apt-mirror -c apt-mirror

again.

If you don’t want to do it manually, you can create a daily cron job for it. Simply edit /etc/cron.d/apt-mirror and uncomment the last line in it so that it looks like this:

vi /etc/cron.d/apt-mirror

#
# Regular cron jobs for the apt-mirror package
#
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log

This will make apt-mirror run at 4.00h each day, and it will log to /var/spool/apt-mirror/var/cron.log.

8. Make The Local Mirrors Accessible Over HTTP
创建http访问

The default Apache document root under Debian and Ubuntu is /var/www, but our repositories are stored in /var/spool/apt-mirror/mirror. In order to make our repositories accessible by http://192.168.0.100/debian and http://192.168.0.100/ubuntu (in this tutorial 192.168.0.100 is the IP address of our local mirror), we create the symlinks /var/www/debian and /var/www/ubuntu that point to the real repositories:

ln -s /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian /var/www/debian
ln -s /var/spool/apt-mirror/mirror/de.archive.ubuntu.com/ubuntu /var/www/ubuntu

Remember to adjust these commands if you use different mirrors than ftp.de.debian.org and de.archive.ubuntu.com.

The next thing to consider is that you can refer to Debian Sarge as sarge, but also as stable (at the time of this writing Debian Sarge is stable and the upcoming Debian Etch still testing). When you run

ls -l /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists

you will see that there is a directory called sarge, but not stable. If you use stable instead of sarge in /etc/apt/sources.list or install a new Debian system with the local mirror, this is a problem (the Debian Sarge installer also refers to stable instead of sarge). The solution is to create a symlink:

cd /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists
ln -s sarge/ stable

Remember to adjust this command if you use a different mirror than ftp.de.debian.org.

At the time Debian Etch becomes stable and you decide to mirror Etch as well, don’t forget to change the stable symlink, e.g. like this:

cd /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists
rm -f stable
ln -s etch/ stable

We don’t have this problem with Ubuntu as there’s no stable, only breezy, dapper, edgy, etc.

9. 配置 Ubuntu Edgy Eft 使用本地源

On Ubuntu Edgy Eft systems, you can replace the main restricted universe repository in /etc/apt/sources.list like this:

vi /etc/apt/sources.list


deb http://192.168.0.100/ubuntu/ edgy main restricted universe

Afterwards, run

apt-get update

Fresh Installation 初次安装设置源,参考下图


更多资料:
http://apt-mirror.sourceforge.net

Popularity: 18% [?]

Tags: , , , , , ,

Ubuntu的过去、现在和未来(转)

Posted 11 months, 1 week ago at 11:32 am. 0 comments

15年前,Linux开发项目刚刚开始,那时,人们并不清楚Linux的开发方式(开放、松散、协同)究竟能够走得多么远。现今,历史的发展已经证明,无论遭遇何种挖苦、打击、阻挠,甚至恐吓,Linux开发项目始终在向前挺进,而且其中的技术创新从不间断。为什么?

根据国际最大的开源网站(www.Sourceforge.net)的统计,现今注册的开源项目共有140,417个,注册者高达1,498,326人。有一点很值得注意,近十年来,开源项目与注册人数的比例始终接近 1 : 10,也就是说,平均一个开源项目有10个人参与其中。统计表明,90%的开源项目趋于静止状态(被抛弃、或者死亡);只有10%的开源项目处于活动状态;那些开发活动频繁、人气很旺的开源项目就更少一些。开源项目共分成19个大类,其中互联网(26,950个子项目)、软件开发(26,318 个)、系统(21,828个)、通信(17,473个)、游戏娱乐(16,185个)、多媒体(14,640个)、科学计算(13,807个),其余大类的子项目都在10,000个以下,比如:桌面环境开发项目只有3,550个子项目。这就是当今国际开源运动的概况。

2003年11月3日,美国红帽(RedHat)公司总裁Mathew Szulik根据当时的Linux及有关开源项目的开发现状,决定暂时放弃“Linux桌面”的研发,全面转向企业Linux。Mathew Szulik说:“对消费市场而言,Windows大概继续是正确的产品线”,“Linux技术需要再成熟一些”。这种说法,出自那时为首的Linux企业(即红帽公司)领导人,简直等于给全球开源运动“泼了一盆凉水”。从此,红帽全面走上面向企业的“定购”服务发展道路。在世界范围内,(桌面)Linux的发展处于低潮(甚至低谷)。

2004年4月,非洲第一位自费宇航员Mark Shuttleworth在澳大利亚召集了一个“志愿者小会”,想再次复兴“桌面 Linux”。会议决定,在Debian(一种十分庞大的Linux社区发行版)基础上,精练出一种“桌面Linux”,而且使其保持永远纯粹的“自由软件”(即可以“使用自由”)状态。Mark给这一开发计划起了一个十分响亮的名字:“Ubuntu”(“无本图”,古非洲语,“善待他人”之意)。从此, Mark Shuttleworth就把Ubuntu的精神带入到世界软件业里面。结果,在2004年10月,第一个 “Ubuntu Linux 4.10”版本发布了,版本序列号“4.10”表示是04年10月发布的版本,接着Ubuntu Linux 5.04、 5.10、6.06、6.10版本相继发布,发布间隔为半年,当前,正准备Ubuntu Linux 7.04最新版本的测试和发布。 Ubuntu Linux 6.06版本是所谓“长期支持”的版本,分为桌面版本和服务器版本,其中桌面版本支持期限为3年;服务器版本为5年;其余版本的有效支持期限均为1年半。简要说来,Ubuntu的目标就是复兴“桌面Linux”。

当初,参与Ubuntu社区的开发人员才有6千多人,可是在两年之后的今天,仅参与Ubuntu论坛的注册人数就超过23万人。因为, Ubuntu社区遵守一条“行为准则”(1、替别人着想;2、待人有礼貌;3、有协作精神),吸引了无数自由软件志愿者(或爱好者)。Ubuntu社区人气很旺,战斗力强,发誓要领跑“桌面创新”。在《发行版守护神》(www.distrowatch.com)的每日点击数排行榜上,Ubuntu一直遥遥领先,稳居第一位。两年来,Ubuntu荣获5个国际奖项,成为最流行、最普及的Linux发行版。根据最近公布的国际《开源软件实验室》(OSDL)的一项世界性调查中,全球Ubuntu用户占据了49%的Linux用户总数,位居第一。据有关方面统计,全球使用Ubuntu的用户总数目前已经接近1,000万人。

2007年1月,世界《Linux.org》的主编Michael J. Jordan 撰文称:“在不太长久的未来,Ubuntu这个词不仅是“peace”(和平)的同义词,而且也将是“Linux”的同义词,就像当前红帽就是Linux的同义词一样”。他对Ubuntu给予很高的评价和希望。我们要问,这一切是为什么?

Ubuntu不是国际互联网上无家可归的“流浪猫”,东游西荡,无人呵护。位于欧洲的Canonical公司是Ubuntu的第一支持者,它在加拿大蒙特利尔设立了Ubuntu的多语种“Call Center”(呼叫中心),向全球提供Ubuntu的支持服务。Ubuntu在全球已经有 46个“合作伙伴”,提供Ubuntu的本地化服务。2007年7月22~24日,Ubuntu第一届“商务年会”将在美国Portland市召开,将进一步推动Ubuntu在全球的发展。Ubuntu的未来如何?

全世界Ubuntu志愿者有一个共同理念:Ubuntu是献给全人类的礼物。Ubuntu庄严承诺“永远免费”,类似Google的搜索服务。但是,免费的东西并不表示完全没有商机。首先,Ubuntu的品牌效益就不小,一件印有“Ubuntu”标记的T恤衫就标价25美元,而在中国生产这种T恤衫的成本才不到1美元。一个持有“Ubuntu技术水准”认证证书的工程师,每日的现场收费标准不低于1000美元(国内参考价每日1000元人民币)。将来,当Ubuntu“家喻户晓”的时候,什么东西(限于IT领域产品)贴上Ubuntu的标签也会卖出个好价钱。比如,现今微软Vista“软件大礼包”出厂了,体积庞大,系统复杂,全球统一定价而且价格奇高。在这种情况下,手里拿着“Ubuntu软件包”的个体经营者,溜街穿巷,大声叫卖“包医百病(指IT疾病),Ubuntu不要钱”,也许能混口饭吃。药物可以不要钱,医术(服务)不可免费。何况办个Ubuntu(“无本图”)小公司,赚点 “小钱”呢?Ubuntu使现今的软件市场“扁平化”(即所谓“无产业巨人”),使得产业总体成本下降,效率持续提高,技术不断创新。近两年来,《Ubuntu实验室》的运行经验证明:Ubuntu是一个十分可靠的企业运行平台,从不遭受病毒、谍件的侵扰,更不会无端死机,系统异常坚固。老实讲,《Ubuntu实验室》成功和失败的经验教训,也许会值点钱罢!我奇怪,为什么国内企业就不喜欢做Ubuntu的生意呢?

Ubuntu的未来会怎样呢?当今,Ubuntu社区已经相当强大。Mark造就了Ubuntu社区,Ubuntu社区也成就了Mark。一个人的理念也许会发生改变,但是,一大群人的理念不会轻易改变的。在不远的未来,Ubuntu将不会再受制于什么人,人类将最终接受这一礼物。对此,许多国内同仁虽然不爱说话(公开言论),但是,他们心中都非常明白这个道理。Ubuntu的全部价值就在于它的自由使用。

buntu支持瘦型计算机的大规模使用,支持LAMP企业架构,支持局域SOA(面向服务的基础架构),支持多媒体技术应用。Ubuntu 企业应用也很宽广。Ubuntu桌面,人见人爱。Ubuntu的产业渗透率极高,增长极为迅速。Ubuntu在教育领域的应用尤其宽广,LTSP电脑教室和Moodle开源教学系统,都大有用武之地。基于Ubuntu的各种社会力量,比较容易团结起来,因为他们原本并无他图(所谓“无本图”),只是一个理念在推动着他们前进,再前进。将来一定会出现基于Ubuntu生态系统的产业链,教育是首当其冲的社会环节。开源产业,应当从教育入手,着力重点在于 “Open Source in China”,而不是“Open Source China”,也就是说,在教育中使用开源软件,不搞抽象的“开源教育”。未来的IT教育,必然与Ubuntu相关联,培养德才兼备的IT人才。我们要有十年之后的战略发展眼光,寄希望于未来一代新人。

via http://www.ubuntuchina.com/

Popularity: 8% [?]

Tags: , , ,

sopcast

Posted 11 months, 1 week ago at 11:32 am. 0 comments

sopcast 现在的节目源还不少,比开始好多了…

安装图形界面版本:

rpm:http://apt.magiclinux.org/magic/2.1/unstable/RPMS.os/qsopcast-0.2.4-4mgc.i686.rpm
或者
srpm:http://apt.magiclinux.org/magic/2.1/unstable/SRPMS.os/qsopcast-0.2.4-4mgc.src.rpm

sudo alien -i xxxx.rpm

即可。在 配置 - 配置 中可以设置声音或者视频的播放器。默认是 amarok 和 kaffine,可以改成 mplayer 之类。

guoshuang2007-12-10+我转好的 .deb 文件

qsopcast_0.3.5-3_i386.deb
sp-sc_1.0.2-2_i386.deb

Popularity: 20% [?]

Tags: , , ,

352 种linux发行版图标

Posted 11 months, 1 week ago at 11:32 am. 0 comments

来自 http://www.gridter.com/linx/linux.html