当前位置: 移动技术网 > 科技>操作系统>Linux > thttpd 在S3C6410的移植-web服务程序的应用

thttpd 在S3C6410的移植-web服务程序的应用

2018年11月16日  | 移动技术网科技  | 我要评论

1.    在vmware 虚拟机上将arm-linux-gcc 4.3.1配置好;
2.    下载thttpd软件包并解压;
3.    在thttpd根目录下运行:  ./configure;
4.    修改 makefile文件 cc = gcc  替换为 cc = arm-linux-gcc,共3处,压缩根目录包1个,cgi-src目录1个,extras目录1个;
5.    执行make命令;
6.    将生成的 thttpd 复制到目标板 /usr/sbin 目录,contrib/redhat-rpm/thttpd.conf 复制到目标板 /etc 目录,并添加 thttpd 为可执行 chmod 777 thttpd;
7.    使用 vi 打开 thttpd.conf 文件,并进行配置,
dir=/home/httpd/html
#chroot
user=root
# default = nobody
logfile=/var/log/thttpd.log
pidfile=/var/run/thttpd.pid
cgipat=/cgi-bin/*.cgi  
8.    再在目标板上新建 /home/httpd 和 /home/httpd/html和、home/httpd/html/cgi-bin三个目录,并修改权限为755:
9.    html文件夹是用来存放html文件的,而在cgi-bin程序则存放在cgi-bin 目录下面;
    目录属性777,.html .js 文件属性666 .cgi 属性 777
    
11.    配置 /etc/init.d/rcs 文件在最后加上   此处是为了开机启动而设置的,不同的linux系统不同的文件
    thttpd -d -c /etc/thttpd.conf &

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网