132010

Telnet remote server gives no response on Cygwin

Windows's telnet doesn't work on cygwin.We can install inetutils which contains some useful command,such as telnet ftp and so on

inetutils is in Net category.

Posted by admin
232010

windows下启动cygwin的cron
windows 的计划任务管理 taskschedule 实在太不合我口味了,老早以前就搜过 windows 下的 cron 实现,找到一个运行不怎么稳定,莫名其妙的崩溃。老早以前用 cygwin 的时候,以 linux 的思维方式, crontab -e 制定完任务以后,发现怎么也执行不了。

前阵子又进一步了解了 cygwin ,原来还需要启动一个服务才能够搞定 cron 。cygwin 下不仅仅是 cron 需要以 windows 服务的方式启动,消息队列、共享内存以及信号量等进程间通信方式也需要以 windows 服务方式启动 cygserver 以后才可用。除了 cron 包,还需要确认 cygrnsrv 包已经安装:

# 安装 cron 服务
cygrunsrv -I cron -p /usr/sbin/cron -a -D
# 启动服务: 也可以用 windows 的启动方式 net start cron
cygrunsrv -S cron

# 启动 cygserver
cygrunsrv -I cygserver -p /usr/sbin/cygserver -e "CYGWIN=server"

启动 cron 以后,即使关闭 cygwin 命令窗口,crond 还是会继续运行 :) ,而且默认是自动启动的服务,重启机器以后依然运行—不需要开 cygwin 窗口。

如果用于运行cron的用户是有密码的

则需要用

cron-config来进行初始化配置

Posted by admin Tagged with:
092009

直接执行
alias ls='ls --color --show-control-chars --time-style=long-iso'
或者把上面的内容加到/etc/profile中重启Cygwin即可。

为了使使用更方便,推荐增加如下配置信息:

1. 编辑用户home目录下的文件.inputc,去除以下几行的注释:

set meta-flag on

# 关闭bash命令行8字节字符转义符的转换
set convert-meta off

# 使bash命令行支持8字节字符输出
set output-meta on
set input-meta on

2 编辑用户home目录下的文件.bash_profile,在文件末尾加上下面几行:

alias ls='ls --color --show-control-chars --time-style=long-iso'
export LC_ALL=zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS="@im=Chinput"3
stty cs8 -istrip
stty pass8
# Update: 少了这个less就不支持中文了
export LESSCHARSET=latin1

转载自:http://blog.sina.com.cn/s/blog_3ee207aa010008ml.html

Posted by admin Tagged with:
092009

安装bind包
安装好后,执行
dig
报错:
;; communications error: connection reset
解决办法:
1、指定使用的DNS服务器,就可以正常显示
dig 187299.com @192.168.0.1
2、彻底解决,添加/etc/resolv.con文件
vim /etc/resolv.conf
添加以下内容
nameserver 192.168.0.1
保存退出
添加resolv.conf之后,whois、dig、host就可以正常使用

Posted by admin Tagged with:
082009

cygwin setup.exe 2.573.2.2

Accessibility
Admin
shutdown: Shutdown, reboot, hibernate or suspend the machine
Base
alternatives: A tool for managing package conflicts
ash: A Bourne Shell (/bin/sh) workalike
bash: The GNU Bourne Again SHell
coreutils: GNU core utilities
cygwin: The UNIX emulation engine   1.5.24-2
cygwin-doc: Utilities for finding files--fine, xargs, locate, updatedb
gawk: GNU awk, a pattern scanning and processing language
grep: Search and print textual input for lines which match a specified pattern
gzip: The GNU compression utility
login:  Sign on to a system
man : Man, apropos and wahtis
run: Start console programs with hidden console
sed: The GNU sed stream editor
tar: A GNU file archiving program
which: Displasy where a particular program in your path is located

Continue reading »

Posted by admin Tagged with: