Cygwin

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(FastCGI and Cygwin)
 
(未显示1个用户的8个中间版本)
第1行: 第1行:
 +
{{top news}}
 +
{{SeeWikipedia}}
 +
 
Cygwin is a Linux-like environment for Windows.It consists of two parts:  
 
Cygwin is a Linux-like environment for Windows.It consists of two parts:  
 +
 +
Cygwin 可作为 GNU 在 Windows 上的练习平台,没事就在 Cygwin 上编写脚本: Bash,Perl,Tcl,Python,Awk ...
  
 
*A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
 
*A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
第14行: 第19行:
 
  cp lighttpd.conf.default lighttpd.conf
 
  cp lighttpd.conf.default lighttpd.conf
 
  /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 
  /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 +
配置 cgi, 请参考 [[Lighttpd.conf examples]]
 +
touch hello.c
 +
#include <stdio.h>
 +
int main(int argc, char *argv[])
 +
{
 +
  printf("Content-type: text/html\n\n");
 +
  printf("<head>\n");
 +
  printf("<title>Hello, World</title>\n");
 +
  printf("</head>\n");
 +
  printf("<body>\n");
 +
  printf("Hello, World\n");
 +
  printf("</body>\n");
 +
  return 0;
 +
}
 +
gcc -o hello hello.c
 +
or
 +
gcc -o hello.html hello.c
 +
cp hello.exe /var/www/cg-bin
 +
http://localhost/cgi-bin/hello.exe  :)
 +
http://localhost/cgi-bin/hello.html :)
 
   
 
   
 
==FastCGI and Cygwin==
 
==FastCGI and Cygwin==
 +
 +
[[category:software development]]
 +
[[category:GNU]]
 +
[[category:windows]]

2013年2月20日 (三) 01:16的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Cygwin Thanks, Wikipedia.

Cygwin is a Linux-like environment for Windows.It consists of two parts:

Cygwin 可作为 GNU 在 Windows 上的练习平台,没事就在 Cygwin 上编写脚本: Bash,Perl,Tcl,Python,Awk ...

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.

http://cygwin.com/

通过 setup.exe 进行 cywin 软件包的安装,其过程非常简单。

[编辑] Apache and Cygwin

Using Apache with Cygwin - http://httpd.apache.org/docs/1.3/cygwin.html

[编辑] Lighttpd and Cygwin

cd /etc/lighttpd
cp lighttpd.conf.default lighttpd.conf
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

配置 cgi, 请参考 Lighttpd.conf examples

touch hello.c
#include <stdio.h>
int main(int argc, char *argv[]) 

{

 printf("Content-type: text/html\n\n");
 printf("<head>\n");
 printf("<title>Hello, World</title>\n");
 printf("</head>\n");
 printf("<body>\n");
 printf("Hello, World\n");
 printf("</body>\n");
 return 0;
}
gcc -o hello hello.c
or 
gcc -o hello.html hello.c
cp hello.exe /var/www/cg-bin
http://localhost/cgi-bin/hello.exe  :)
http://localhost/cgi-bin/hello.html :) 

[编辑] FastCGI and Cygwin

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱