@Zjmainstay
2015-05-07T16:37:17.000000Z
字数 3678
阅读 2532
Linux
cygwin
从http://cygwin.com下载相应位数(32bit/64bit)的软件
重新启动setup.exe,搜索wget,然后安装相关的
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -P /bin;chmod.exe +x /bin/apt-cyg
如果googlecode.com无法访问,可使用链接(2015-05-07更新):
wget http://download.zjmainstay.cn/apt-cyg -P /bin;chmod.exe +x /bin/apt-cyg
apt-cyg -m http://mirrors.163.com/cygwin/
apt-cyg install vim
类似ubuntu的apt-get
apt-cyg install util-linux
apt-cyg install ncurses
apt-cyg install make
setup.exe 搜索gcc,全部安装
wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
参考:http://blog.sina.com.cn/s/blog_6b9954cb0101allj.html
setup.exe ssh
apt-cyg install procps
apt-cyg install cron
cygrunsrv -I cron -p /usr/sbin/cron --args -n -u Administrator
如果提示密码不正确,可以试试去掉用户名
cygrunsrv -I cron -p /usr/sbin/cron --args -n
cygrunsrv -S cron
cygrunsrv -E cron
cron没有被使用会自动关闭(cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:)
cygrunsrv -I cygserver -p /usr/sbin/cygserver -e "CYGWIN=server"
$ cron-config
Cron is already installed as a service under account LocalSystem.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.
Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ] ntsec
You must decide under what account the cron daemon will run.
If you are the only user on this machine, the daemon can run as yourself.
This gives access to all network drives but only allows you as user.
To run multiple users, cron must change user context without knowing
the passwords. There are three methods to do that, as explained in
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
If all the cron users have executed "passwd -R" (see man passwd),
which provides access to network drives, or if you are using the
cyglsa package, then cron should run under the local system account.
Otherwise you need to have or to create a privileged account.
This script will help you do so.
Do you want the cron daemon to run as yourself? (yes/no) no
Were the passwords of all cron users saved with "passwd -R", or
are you using the cyglsa package ? (yes/no) yes
The cron daemon will run as SYSTEM.
Running cron_diagnose ...
WARNING: Your computer does not appear to have a cron table for Administrator.
Please generate a cron table for Administrator using 'crontab -e'
... no problem found.
Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.
In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.
Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.
If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.
WARNING: PATH may be set differently under cron than in interactive shells.
Names such as "find" and "date" may refer to Windows programs.
*/10 * * * * /home/Yordan/sync_gdrive.sh
# * * * * * command to be executed
# - - - - -
# | | | | |
# | | | | +- - - - day of week (0 - 6) (Sunday=0)
# | | | +- - - - - month (1 - 12)
# | | +- - - - - - day of month (1 - 31)
# | +- - - - - - - hour (0 - 23)
# +--------------- minute
来源: http://stackoverflow.com/questions/707184/how-do-you-run-a-crontab-in-cygwin-on-windows
# Run scripts in cron.hourly on first minute of every hour
01 * * * * run-parts /etc/cron.hourly
# Run scripts in cron.daily at 0:02 each day
02 0 * * * run-parts /etc/cron.daily
#Run scripts in cron.weekly at 2:45 each Saturday
45 2 * * 6 run-parts /etc/cron.weekly
#Run scripts in cron.monthly at 0:03 on the firstday of each month
03 0 1 * * run-parts /etc/cron.monthly
#Run scripts in cron.yearly at 0:04 each January 1.
04 0 1 1 * run-parts /etc/cron.yearly
来源: <http://cygwin.com/ml/cygwin/2005-04/msg00751.html>
E:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -