Tag Archive for 'system'

A good win32 apache module binary download site

I found a very good win32 apache module binary download site, English site. You can download many binary module there. such as:

  • mod_perl
  • mod_fcgid
  • mod_macro

and this site is very cool for apache users! ;)

Using Telnet with a POP3 Mail Server

It is possible, with many ISPs, to use a Telnet program to do maintenance on your mailbox on the POP3 mail server. This allows you to look at, and possibly delete, any problem causing message (e.g. too large to download, improperly formatted message, etc.)

The instructions below are based on the Win95 TELNET.EXE program. See here for some other Telnet programs and operating systems.

From the Win95 task bar, select: Start, Run…, and enter the following:


telnet pop-server-name port#
(Note: if you start Telnet from the browser, rather than the Win95 Start Run command, the syntax is telnet://pop-server-name:port# – However, MSIE 3 has a bug and you must leave out the // on the address line and use telnet:pop-server-name:port#)

Check your mail settings for the pop-server-name and port#. Most POP3 servers use port 110.

For example:

– For CNZX Internet: telnet mail.cnzx.info 110
– For AT&T Worldnet: telnet postoffice.worldnet.att.net 110
– For Netcom: telnet popd.ix.netcom.com 110
– For SpryNet: telnet m#.sprynet.com 110
(# is 1 to 5 and varies by user)

This will connect to the mail server. If you fail to get a successful connection message, check the following:
You must include the correct port number, usually 110. The default Telnet port number won’t work.
The syntax varies by how you start the Telnet program. On the Start, Run, you separate the server name and the port number with a Space. In the browser, you separate the server name and the port number with a Colon.
If starting from the browser, the browser must be configured to know about your Telnet program. The Win95 version of MSIE normally does this automatically on install. For Netscape, and the Win3.1 version of MSIE you usually need to do this manually. See your browser documentation. However, it is not necessary to start the program from the browser. You can start it directly.
MSIE 3 may not start the Telnet program from its address line if you use the “//” in the URL. Just remove the “//”.
You will want to enable Local Echo so you can see what you type. In the Win95 Telnet program this is under Terminal, Preferences. Also, you may want to turn on logging to capture messages to a text file. In the Win95 Telnet program this is under Terminal, Start Logging

For the connection, and each command that you enter, the mail server will respond:
Continue reading ‘Using Telnet with a POP3 Mail Server’

取消某个目录的PHP运行权限

1
2
3
4
RemoveHandler .cgi
RemoveHandler .php
RemoveHandler .pl
RemoveHandler .py

.htaccess 中或者是 httpd.conf 配置中设定就可以了。

笔记本光驱驱动损坏问题

今天想安装CD上的一个东西,但发现我的ACER 3600/3609 的光驱驱动损坏,不会是DVD坏了吧,启动到LINUX,一切正常,在网上搜索了一下,这是软件引起的问题,在注册表中删除以下内容就可以正常工作了,不过我的光驱很少使用的一般。

1
2
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\
{4D36E965-E325-11CE-BFC1-08002BE10318}

删除以下键
LowerFilters 和 UpperFilters

重新启动机器,就看得到光驱盘符了。

時間、地點、人物

不知道為什么要用“時間、地點、人物”作為這篇日志的標題,可能是因為我要用用繁體字吧,哈哈。用的Google的輸入法,不過說實話,不是很好,真的。

昨天在dream host 上搭建好了 trac. 不過沒有使用 FastCGI ,因為一直不成功,一直500錯誤。 ;(

让 viewvc 默认显示GB2312编码

默认的viewvc是显示UTF-8,不过可能有时候你的项目都是GB2312编码或者BIG5编码,需要改变其实很简单,在viewvc的安装目录下找到这个文件

1
$VIEWVC_INSTALL_DIR/lib/sapi.py

只需要把 UTF-8 替换成 GB2312 就可以了,一共有三个地方,使用 vim 来就是这样

1
:%s/=UTF-8/=GB2312/g

或者你可以改一下原代码,更为方便的改动和使用。

注意我使用的 viewvc 版本为dev-1.1,关于viewvc的安装请参考这篇日志,关于svn的安装请参考这篇日志

viewvc 搭建笔记

关于svn+apache2的工作环境搭建,请参考我的这一篇笔记

这是一篇关于如何搭建viewvc来更好的通过WEB展示svn记录的笔记。

工作环境为RedHat EL4

1
Linux MYSERVER 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux

首先,viewvc同时支持CVS和Subversion,最开始是为CVS系统开发,不过由于SVN系统近来的流行,viewvc也开始支持svn系统了。

  1. 下载viewvc
    1
    $ wget http://www.viewvc.org/nightly/viewvc-1.1-dev-20070307.tar.gz
  2. 安装viewvc
    1
    $ ./viewvc-install
  3. 编辑viewvc配置文件 viewvc.conf
    1
    2
    root_parents = /home/userhome/zztest/svn_dir : svn,
    #               /home/cvs-repositories : cvs

    同时你还可以在 viewvc.conf 中找到一些可选配置,比如PHP语法高亮等。

  4. 在 Apache 的配置文件中加入viewvc配置,并加如HTTP验证功能
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Alias /webview /usr/local/viewvc-dev/bin/cgi/
            <Directory "/usr/local/viewvc-dev/bin/cgi">
                DirectoryIndex viewvc.cgi
                AddHandler cgi-script .cgi
                Options ExecCGI FollowSymLinks
                AllowOverride None
                AuthType Basic
                AuthName "Subversion repository"
                AuthUserFile /usr/local/viewvc-dev/viewpasswd.conf
                Require valid-user
                Order allow,deny
                Allow from all
            </Directory>
  5. 这时当你在WEB上查看viewvc时,可能会提示
    1
    viewvcImportError: No module named svn

    这是因为 python 还需要一个和你工作的svn系统进行联系的库,在svn的原代码中可以进行编译并安装,前提是需要安装 swig 这个软件包,还好在大多数LINUX发行版中,这个软件包是默认安装的。你可以用

    1
    $ which swig

    这样的命令来验证,如果没有安装上,可以安装一个。接下来你可能需要通过这样的方式,重新编译并安装svn软件包

    1
    2
    3
    4
    5
     $ ./configure --codefix=/usr/local --with-apxs=/usr/local/bin/apxs --with-berkeley-db=/usr/local PYTHON=/usr/local/bin/python2.5
     $ make
     $ sudo make install
     $ make swig-py
     $ make install-swig-py

    现在你的viewvc就可以正常工作了。

  6. 最后你还可以对viewvc安装目录中的 python 代码和 template 模板文件进行修改来满足你的需求。

UPDATE 在编译的时候,使用VIEWVC可能会遇到象这里描述的问题,不过这里有解决方法,可以参考 ;)

Indexing repository
Failed to initialize environment. /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol: gss_delete_sec_context
Traceback (most recent call last):
File “/usr/lib/python2.3/site-packages/trac/scripts/admin.py”, line 616, in do_initenv
repos = self.__env.get_repository()
File “/usr/lib/python2.3/site-packages/trac/env.py”, line 155, in get_repository
from trac.versioncontrol.svn_fs import SubversionRepository
File “/usr/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py”, line 25, in ?
from svn import fs, repos, core, delta
File “/usr/local/lib/svn-python/svn/fs.py”, line 19, in ?
from libsvn.fs import *
File “/usr/local/lib/svn-python/libsvn/fs.py”, line 5, in ?
import _fs
ImportError: /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol: gss_delete_sec_context

把 Makefile 的

1
SVN_APR_LIBS =  /home/rob/build/subversion-1.4.2/apr/libapr-0.la -lrt -lm -lcrypt -lnsl  -lpthread -ldl

改为

1
SVN_APR_LIBS =  /home/rob/build/subversion-1.4.2/apr/libapr-0.la -lrt -lm -lcrypt -lnsl  -lpthread -ldl -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lk5crypto

关于Perl模块的重新安装

由于重新编译了Perl之后,发现以前安装的Perl模块出了不少问题~ 也不能用CPAN重新安装了,至少我不会,安装LWP也不行,不知道为什么。后来在IBM的站点上找到了这样的方式可以重新安装已经安装的PERL模块

1
$ /usr/local/bin/perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'

安装PHP总结,外加magickwand安装

安装PHP5.2.0,如果在 ./configure 使用了 –with-apxs= 那么PHP就会以 lic 的模式编译,当然,用 –disable-lic 就是不行的了,还有就是如果 –disable-lic 起作用了那么 –with-pear 也就不会起作用了,我试图以 fastcgi 的模式编译 PHP,这是不行的, fastcgi 必须在 –disable-lic 的情况上才能编译,除非我不使用 PHP 的APACHE模块,还是算了,这样以来似乎又要安装另外一个PHP5了,或者PHP4。懒得编译了。

说到magickwand的安装,使用网站上的文档,根本就不行,至少在我这里是这样,还需要通过PHP模块的方式来编译。

1
2
3
4
5
$ wget -c http://www.magickwand.org/download/php/magickwand-0.1.9.zip
$ unzip magickwand-0.1.9.zip
$ ./configure --with-php-config=/home/php/bin/php-config --with-magickwand=/usr/local
$make
# make install

在 phpinfo() 中终于出现了,不过注意还是要配置一下 php.ini 让PHP能够加载 magickwand.so

Continue reading ‘安装PHP总结,外加magickwand安装’

Pages: 1 2 3

安装 mod_perl

在安装mod_perl的时候提示不能安装,原因是因为Perl没有击活线程,怎么办?重新编译一次Perl 5.8.8 就可以了。

1
2
3
$ Configure --codefix=/opt/perl -Dusethreads
$ make && make test
# make install