Linux下nginx的安装
nginx("engine x")是一个高性能的HTTP和反向代理服务器,是由俄罗斯人Igor Sysoev建立的项目,超轻量级,超快处理能力。
目前使用的nginx版本是0.7.61
nginx的官言网站为:http://nginx.net/
下载地址为:http://sysoev.ru/nginx/nginx-0.7.61.tar.gz
nginx需要pcre的支持,所以我们需要下载pcre
pcre全名为Perl Compatible Regular Expressions,即Perl正则表达式库,目前最新的是7.9;
pcre的官方网站为:http://www.pcre.org/
下载地址为:http://sourceforge.net/project/showfiles.php?group_id=10194
安装pcre
tar xzvf pcre-7.9.tar.gz
#cd pcre-7.9
#./configure
#make
#make install
安装nginx
tar -xzvf nginx-0.7.61.tar.gz
#cd nginx-0.7.61
#./configure --prefix=/usr/local/nginx
#make
#make install
启动nginx
nginx默认是不会自己启动的
启动命令为:/usr/local/nginx/sbin/nginx
相关文档:
在linux下,估计你经常使用pwd这个命令,这个命令就是打印当前的工作路径,即print working directroy, 今天我们也来c语言实现这个命令。
要实现这个功能,需要用到下面的一个系统调用:
#include <unistd.h>
char *getcwd(char *buf, size_t size);
该系统调用返回当前的工作目录的绝对路径,绝对路径 ......
#protect share data
spin_lock/spin_unlock: protect the data during process context(and only at process context), and make sure your code bewteen lock/unlock is fast enough.There may deadlock if the same spin_lock is called at interrupt context.
spin_lock_irq/spin_unlock_irq: call it during interru ......
Ubuntu Linux系统环境变量配置文件介绍
发布时间:2007.12.19 06:30 来源:赛迪网 作者:sixth
在Ubuntu中有如下几个文件可以设置环境变量
/etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此文件为系统的每个用户设置环境信息,当用 ......
1,先看看工作队列和tasklet的区别:
(1) 定时器和tasklet:
Tasklets resemble kernel timers in 3 ways.
1)They are always run at interrupt time,
2)they always run on the same CPU that schedules the ......