[
2010/02/02 16:08 | by tinkoko ]
2010/02/02 16:08 | by tinkoko ]
http://mirror.extmail.org/yum/
里面还可以找到其他一些常用的RPM包!!!
里面还可以找到其他一些常用的RPM包!!!
[
2010/01/25 16:48 | by tinkoko ]
2010/01/25 16:48 | by tinkoko ]
ubuntu版本
1.Linux www.vivi.cn 2.6.28-15-server #52-Ubuntu SMP Wed Sep 9 11:34:09 UTC 2009 x86_64 GNU/Linux
#cat /etc/vsftpd.conf
vsftpd.conf
vim /etc/vsftpd.conf 运行这个就可以进入配置界面
listen=YES 独立运行模式
anonymous_enable=NO/YES (允许匿名登陆吗?=YES 可登陆 =NO 不可登陆)
no_anon_password=NO/YES (匿名登陆要密码吗?=YES 要 =NO 不要)
local_enable=YES/NO 本地用户可登陆吗? =YES 要 =NO 不要
write_enable=YES 本地用户有写权限吗?
local_umask=022 不要动,前面如果有#就去掉,什么意思,不告诉你
connect_from_port_20=YES 端口设成20 ,不想要,自己在改: connect_from_port_205=YES
idle_session_timeout=600 监听,多常时间,没响应,VSFTPD 把你踢出服务器
data_connection_timeout=600 连接服务器后,数据多常时间不能传入,断开服务
chroot_list_enable=YES 这一行,和下面一行,密切相关
chroot_list_file=/etc/vsftpd.chroot_list 这一行,上一行设置YES才生效。意思是:加入到这个文件内的用户,只能访问自己的目录。其它目录不能访问.建立下面有说明.
secure_chroot_dir=/var/run/vsftpd 意思是:vsftpd 运行的目录。
pam_service_name=vsftpd 加密(pam) 传输模式,这个目录内的: /etc/pam.d/vsftpd
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key (KEY文件,不要动)
2,添加账户
添加用户:adduser tinkoko
然后直接按照英文提示顺下来就ok了~~
重启服务后,就能访问FTP了。
1.Linux www.vivi.cn 2.6.28-15-server #52-Ubuntu SMP Wed Sep 9 11:34:09 UTC 2009 x86_64 GNU/Linux
#cat /etc/vsftpd.conf
vsftpd.conf
vim /etc/vsftpd.conf 运行这个就可以进入配置界面
listen=YES 独立运行模式
anonymous_enable=NO/YES (允许匿名登陆吗?=YES 可登陆 =NO 不可登陆)
no_anon_password=NO/YES (匿名登陆要密码吗?=YES 要 =NO 不要)
local_enable=YES/NO 本地用户可登陆吗? =YES 要 =NO 不要
write_enable=YES 本地用户有写权限吗?
local_umask=022 不要动,前面如果有#就去掉,什么意思,不告诉你
connect_from_port_20=YES 端口设成20 ,不想要,自己在改: connect_from_port_205=YES
idle_session_timeout=600 监听,多常时间,没响应,VSFTPD 把你踢出服务器
data_connection_timeout=600 连接服务器后,数据多常时间不能传入,断开服务
chroot_list_enable=YES 这一行,和下面一行,密切相关
chroot_list_file=/etc/vsftpd.chroot_list 这一行,上一行设置YES才生效。意思是:加入到这个文件内的用户,只能访问自己的目录。其它目录不能访问.建立下面有说明.
secure_chroot_dir=/var/run/vsftpd 意思是:vsftpd 运行的目录。
pam_service_name=vsftpd 加密(pam) 传输模式,这个目录内的: /etc/pam.d/vsftpd
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key (KEY文件,不要动)
2,添加账户
添加用户:adduser tinkoko
然后直接按照英文提示顺下来就ok了~~
重启服务后,就能访问FTP了。
[
2010/01/18 14:51 | by tinkoko ]
2010/01/18 14:51 | by tinkoko ]
很感谢ecshop的会员分享,本来想自己手写ecshop的rewrite规则。
因为大部分都是ecshop2.6.x的、在2.7上用了会出错。~这样子整理了下~~~
1.ecshop后台商店设置--基本设置--URL重写---简单重写
2.以下代码加入到nginx的ecshop虚拟主机中~~很感谢分享,再次谢谢!!
if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last;
}
3.重启下nginx服务器~~~~~~~~~~
因为大部分都是ecshop2.6.x的、在2.7上用了会出错。~这样子整理了下~~~
1.ecshop后台商店设置--基本设置--URL重写---简单重写
2.以下代码加入到nginx的ecshop虚拟主机中~~很感谢分享,再次谢谢!!
if (!-e $request_filename)
{
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last;
}
3.重启下nginx服务器~~~~~~~~~~
[
2010/01/09 14:40 | by tinkoko ]
2010/01/09 14:40 | by tinkoko ]
中午电话过来,说邮件服务器无法正常收发邮件。
原来以为是邮件队列问题。
对于我们的机器每天收发几百万封都没有出现问题。
maillq看了下只有700多封邮件,而且很多事 退信。
但是为了测试只好全部删除了。。
postsuper -d ALL.
但是还是不行,重启了slock和clamav。amvised都是不行的。
===============================
extmail.org看到一个事情就是CLAMAV要升级。尝试试了下,还真的是这样子。
1. vi /etc/yum.repos.d/CentOS-Base.repo
加入下面内容:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag/
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
enabled=1
2. yum install clamav ,yum install clamav-db ,过程中,可能要输入几个y。
3./etc/init.d/amavisd restart
4./etc/init.d/clamd restart 此时会提示如下错误:
[root@mail etc]# /etc/init.d/clamd restart
Stopping Clam AntiVirus Daemon: [ OK ]
Starting Clam AntiVirus Daemon: ERROR: Missing argument for option at line 34
ERROR: Can't open/parse the config file /etc/clamd.conf [FAILED]
5.[root@mail etc]# cp /etc/clamd.conf.rpmnew /etc/clamd.conf
cp: overwrite `/etc/clamd.conf'? y
6.[root@mail etc]# /etc/init.d/clamd restart
Stopping Clam AntiVirus Daemon: [FAILED]
Starting Clam AntiVirus Daemon: [ OK ]
原来以为是邮件队列问题。
对于我们的机器每天收发几百万封都没有出现问题。
maillq看了下只有700多封邮件,而且很多事 退信。
但是为了测试只好全部删除了。。
postsuper -d ALL.
但是还是不行,重启了slock和clamav。amvised都是不行的。
===============================
extmail.org看到一个事情就是CLAMAV要升级。尝试试了下,还真的是这样子。
1. vi /etc/yum.repos.d/CentOS-Base.repo
加入下面内容:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag/
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
enabled=1
2. yum install clamav ,yum install clamav-db ,过程中,可能要输入几个y。
3./etc/init.d/amavisd restart
4./etc/init.d/clamd restart 此时会提示如下错误:
[root@mail etc]# /etc/init.d/clamd restart
Stopping Clam AntiVirus Daemon: [ OK ]
Starting Clam AntiVirus Daemon: ERROR: Missing argument for option at line 34
ERROR: Can't open/parse the config file /etc/clamd.conf [FAILED]
5.[root@mail etc]# cp /etc/clamd.conf.rpmnew /etc/clamd.conf
cp: overwrite `/etc/clamd.conf'? y
6.[root@mail etc]# /etc/init.d/clamd restart
Stopping Clam AntiVirus Daemon: [FAILED]
Starting Clam AntiVirus Daemon: [ OK ]
[
2009/12/30 17:54 | by tinkoko ]
2009/12/30 17:54 | by tinkoko ]
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
以上网址大家可以测试下。。
以上网址大家可以测试下。。





