载入中
自定义HTML载入中... loading
日历
<<  <  2008 - 9  >  >>
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
载入中
边栏内容载入中... loading
MSDOS创建文本的方法 [转贴 2007-03-21 11:53:36]  
以下是在查资料后知道的新建文本文件的方法,记下来,希望有用吧:
第一种方法:
copy con A.txt          //创建A.txt文本文件
.......^Z         //输入内容
                     //^指按CTRL键,此时须同时按这两个键


第二种方法:
edit A.txt             //编辑A.txt文本文件,如果A.txt文件不存在,则创建文件
........               //输入内容
                       //如果要保存或做其它的操作,则在菜单中选择,操作完后退出即可

 

(字节数 : 799)
[技术分享]APACHE 隐藏目录列表 [转贴 2007-02-07 11:41:24]  
必须为你不想设置显示文件的目录配置目录浏览属性,例如是/usr/local/apachedocs/manual目录
必须在httpd.conf里有
<Directory "/usr/local/apachetdocs/manual">
Options FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory "/usr/local/apache/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
去掉里面的Indexes

 

(字节数 : 530)
Squid for Windows 简介 [转贴 2007-02-01 04:07:36]  

是大家也许不知道,Squid有一个for Windows的版本,下载地址为: http://www.acmeconsulting.it/pagine/opensource/squid/SquidNT.htm
    先来说一下Squid for Windows的安装,需求:你要拥有一台可联网的、运行着Windows NT/2000/XP/Server 2003的计算机,还要有Squid

for windows的软件包。从网上下载的Squid for windows的二进制文件是压缩到zip文件里的,首先来解压缩这个文件,加压后会生成一个

Squid的文件夹,将此文件夹拷贝到C:\,至此Squid for Windows算是被“安装”到你的Windows计算机了。(备注:Squid for windows的默认

安装是在C:\squid下,当然,可以把Squid放到其他的路径,但是需要大量的配置squid配置文件中的路径信息,那样会比较麻烦)
    Unix Like的操作系统下的大部分软件都是基于命令行的,使用文本文件进行配置,这样虽说对一些用惯了Windows下软件的朋友们会有些

复杂的感觉,但是这样的软件还是有好处的,毕竟其没有Gui会有更高的性能,配置文件的编写更具灵活性,下面我们来看一下具体怎么配置

squid for windows。首先,单击[开始],选择“运行”,输入 cmd 打开Windows的“命令提示符” 窗口,在命令提示符窗口内输入以下命令:
C:\>cd c:\squid\etc
C:\squid\etc>copy squid.conf.default squid.conf   **将Squid的默认配置文件复制一份并起名为squid.conf
C:\squid\etc>copy mime.conf.default mime.conf     **将mime.conf.default复制一份并起名为mime.conf

下面,我们可以使用任意文本编辑器对squid.conf(配置文件)进行编辑,修改squid的配置语句,文件中的#后的文本表示注释。
首先,我们找到TAG: acl段,这里是定义访问Squid的IP地址及其对应的名称
我们在此段acl Safe_ports port 777 #multiling http后增加一个新行,写 “acl 名称 src IP地址”

示例:acl name1 src 192.168.100.0 #定义所有来自192.168.100.*的机器对应的名称为name1

然后我们找到TAG: http_access段,这里是定义允许访问squid的列表
我们在此段http_access deny CONNECT !SSL_ports后增加一个新行,写“http_access allow/deny 名称”,allow表示允许访问,deny表示拒

绝访问。

示例:http_access allow name1 #定义所有标识为name1(192.168.100.*)的机器允许访问squid代理服务器

并且在后面再增加一行 http_access deny all。

任何一个网络应用都会对应一个或N个端口,squid的默认端口是3128,如果要更改,找到 #http_port 3128 这里,删掉前面的#号,并且修改

后面的端口号。

示例:http_port 7777 #将squid的服务端口改为7777

由于Squid是基于Cache(缓存)的代理服务器,所以设置缓存的大小对优化服务器的性能是有必要的,下面来看一下如何设置cache的大小。
找到#cache_mem 8 MB这句 删掉前面的#号 将默认的8修改到需要的大小,这里的数值应视具体的机器可用内存而定,应在内存允许的情况下尽

量地设置的大一些以提高代理服务器性能,但不能让代理服务器的缓存大小影响本机器的性能。

示例:cache_mem 200 MB #设置squid使用200MB的内存当做代理服务器缓存

最后我们还要有一个步骤,否则在启动squid服务的时候会报错,那就是配置TAG: visible_hostname段,找到此段,再后面添加

visible_hostname 机器名(随便起) 这么一行,就搞定了。

示例:visible_hostname supersrv #将hostname设置为supersrv

至此,可以保存squid.conf并且退出文本编辑器了,简单的Squid for Windows的配置已经完成。

下面我们回到命令行,输入以下命令:
c:\>cd c:\squid\sbin
C:\squid\sbin>squid -i    (注册Squid为Windows的服务,默认的服务名为SquidNT,可以使用“管理工具”中的“服务”来启动/停用服务)
C:\squid\sbin>squid -z    (生成高速缓存的目录)
C:\squid\sbin>squid       (启动squid服务,另一种比较好的方法是在“管理工具”,“服务”中选择SquidNT,然后选择启动服务)

    以上简明说明了squid for Windows的安装,配置,启动,此文应用在Unix/Linux下的对Squid的简单配置也是可行的。


 

 

(字节数 : 2812)

 

   下载免费的NT版Squid
http://www.acmeconsulting.it/pagine/opensource/download/squid-2.5.STABLE12-NT-bin.zip
   解压在c:根目录
c:\squid

 配置
c:\squid\etc\mime.conf (默认有 mime.conf.default 拷贝一份或者改名都行)
c:\squid\etc\squid.conf(下面给个简单代理服务器样例 如果要公开 想配多灵活都可以)

squid.conf 样例:
可能你需要修改的地方:
代理端口3128 内存大小64 cache目录 允许网段 国外代理(如果没有可以把那4+5行删掉)
offline_mode off
http_port 3128
icp_port 0
snmp_port 0
htcp_port 0

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_mem 64 MB
maximum_object_size 8192 KB
maximum_object_size_in_memory 8192 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LFUDA

cache_dir ufs c:/squid/var/cache 100 4 4
cache_access_log none
#cache_access_log c:/squid/var/logs/access.log
cache_log c:/squid/var/logs/cache.log
cache_store_log none

emulate_httpd_log on
dns_nameservers 202.106.0.20

refresh_pattern .        0    5%    604800
half_closed_clients off

acl myhome src 192.168.0.0/16
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl all src 0/0

acl PURGE method PURGE
http_access allow PURGE localhost
http_access deny PURGE
 
http_access allow manager localhost
http_access deny manager

http_access allow localhost
http_access allow myhome

http_access deny all

acl cantdirect dstdomain .sourceforge.net
acl cantdirect dstdomain .freebsd.org
acl cantdirect dstdomain .wikipedia.org
acl cantdirect dstdomain .wikimedia.org

cache_peer 国外代理 parent 端口 0 no-query no-digest no-netdb-exchange
cache_peer_access 国外代理 allow cantdirect
cache_peer_access 国外代理 deny all
always_direct deny cantdirect
always_direct allow !cantdirect

icp_access deny all
shutdown_lifetime 5 seconds
ignore_unknown_nameservers on

cache_mgr 你的email
visible_hostname squidnt.ipcn.org

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
logfile_rotate 0

forwarded_for off
log_icp_queries off

client_persistent_connections on
server_persistent_connections on
client_db off

# reload_into_ims off
negative_ttl 300 seconds

--4-- 启动
新建 c:\squid\var\cache 目录 (根据配置指向建)
开始 - 运行 - "c:\squid\sbin\squid -z" 初始化 cache 目录结构
开始 - 运行 - "c:\squid\sbin\squid -i" 安装squidnt服务

ok 可以用了 家里其他机器或者本机浏览器设置代理即可
以后系统启动会自动 (如果不重起可以 开始 - 运行 - "net start squidnt" 启动)
转自:http://windtear.net/archives/2006/02/13/000917.html

 

http://blog.csdn.net/cokeyang/archive/2005/12/17/555046.aspx
 

 

(字节数 : 3086)
上一页 | 1 ... | 4 | 5 | 6 | 7 | 8 | ... 16 | 下一页
和讯个人门户 v1.0 | 和讯部落 | 客服中心