tengine编译&&运行,
tengine编译&&运行,
淘宝Web服务器Tengine正式开源,玩一下吧。1.build and install nginx
sfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine$ ./configure --with-debug --without-http_gzip_module --without-http_rewrite_module --prefix=/home/sfoolish/Desktop/My_Prj/2_NGINX/tengine/nginxsfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine$ ./configure --help
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib=<path> option.
2.run nginx
sfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine/nginx$ vim conf/nginx.confserver {
listen 8080;#80;apache在运行端口号被占
server_name localhost;
sfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine/nginx$ sudo ./nginx
sfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine/nginx/sbin$ sudo ./nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
3.test nginx
sfoolish@ubuntu:~/Desktop/My_Prj/2_NGINX/tengine/nginx$ curl 192.168.1.27:8080<html>
<head>
<title>Welcome to nginx!</title>
</head>
<body bgcolor="white" text="black">
<center><h1>Welcome to nginx!</h1></center>
</body>
</html>
评论暂时关闭