Linux下Nginx + Resin 的搭建
nginx的安装
对于现在流行的Nginx + Resin,其性能大家都有目共睹。
首先,安装Nginx
可以参数Nginx的安装文章:http://blog.csdn.net/vebasan/archive/2010/02/26/5328494.aspx
如果在安装Nginx的时候提示有问题,可以参考:http://blog.csdn.net/vebasan/archive/2010/02/26/5328545.aspx
有关Nginx,pcre,openssl相关的包文件,可以通过google进行查找下载,并上传到服务器上。
接着,安装Resin
tar -xvf resin-3.1.9.tar.gz
接着,将其移动到/usr/local/resin下面
mv resin-3.1.9 /usr/local/resin
接着进入resin的目录,对其进行配置安装
cd /usr/local/resin
./configure
make
make install
接着,我们需要将nginx配置为系统的服务
vi /etc/rc.d/init.d/nginx
在vi环境下,贴下以下内容:
程序代码
#!/bin/bash
# nginx Startup script for the Nginx HTTP Server
# this script create it by gcec at 2009.10.22.
# it is v.0.0.1 version.
# if you find any errors on this scripts,please contact gcec cyz.
# and send mail to support at gcec dot cc.
#
# chkconfig: - 85 15
# description: Nginx is a high-performance web and proxy server.
# It has a lot of features, but it's not for everyone.
# processname: nginx
# pidfile: /var/run/nginx.pid
# config: /usr/local/nginx/conf/nginx.conf
nginxd=/usr/local/nginx/sbin/nginx
nginx_config=/usr/local/nginx/conf/nginx.conf
nginx_pid=/var/run/nginx.pid
RETVAL=0
prog="nginx"
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $nginxd ] || exit 0
# Start nginx daemons functions.
start() {
if [ -e $nginx_pid ];then
echo "nginx already running...."
exit 1
fi
echo -n $"Starting $prog: "
daemon $nginxd -c ${nginx_config}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/nginx
return $RETVAL
}
# Sto
相关文档:
在linux下,估计你经常使用pwd这个命令,这个命令就是打印当前的工作路径,即print working directroy, 今天我们也来c语言实现这个命令。
要实现这个功能,需要用到下面的一个系统调用:
#include <unistd.h>
char *getcwd(char *buf, size_t size);
该系统调用返回当前的工作目录的绝对路径,绝对路径 ......
inux的chmod命令使用详解
使用方式 : chmod [-cfvR] [--help] [--version] mode file...
说明 : Linux/Unix 的档案存取权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所存取。
mode : 权限设定字串 ......
实验3 Linux的进程控制
一.实验目的
通过实验掌握Linux中进程控制的基本命令。
二.实验要求
1.练习使用who, w, ps,pstree察看系统用户及进程的信息。
2.练习使用kill命令撤销进程。
3.练习进程前后台的切换。
三、 实验报告要求
1.   ......