Ubuntu12.10下安装lighttpd1.4.32详细步骤
来源:互联网 发布:网络与新媒体概论重点 编辑:程序博客网 时间:2024/06/09 18:03
彻底删除占用80端口的所有程序
# lsof -i :80|grep -v “PID”|awk ‘{print “kill -9″,$2}’|sh
最近在自学Python,学到Web开发,自然就接触到Python的Web框架,Django 很出色,但是个人喜欢精简核框架,找到web.py(http://webpy.org/)。网上搜了一下web.py资料很少,只能跑到官网上自学。开发首先要把环境搭建好,虽然web.py内置一个web服务器,但是官网还是推荐用 lighttpd 或者Apache。 下面详细介绍自己安装lighttpd的过错中出现的问题和解决方法。
首先我们先从lighttpd官网上下载http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.32.tar.gz
解压后 lighttpd-1.4.32 进入解压后的目录 cd xxx/lighttpd-1.4.32/
1 ./configure
这里就出错啦。具体错误代码忘记保存啦。但是 是缺少 pcre 。到 http://www.pcre.org/ 活在https://sourceforge.net/projects/pcre/files/pcre/ 上下载 解压 安装
进入到pcre解压后的目录
./configure
这里有出现错误啦。缺少C++编译器。我们只要安装G++就可以啦
1 sudo apt-get install g++
安装完之后,在重新编译pcre
1 ./configure2 make
pcre安装成功之后就可以重新编译安装 lighttpd 了
另外的错误提示一并贴一下
出现configure: error: C compiler cannot create executables … 安装sudo apt-get install libc6-dev.
出现configure: error: configure: error: pcre-config not found … 安装sudo apt-get install libpcre3-dev
出现configure: error: zlib-headers and/or libs where not found … 安装sudo apt-get install zlib1g-dev
出现configure: error: bzip2-headers and/or libs where not found … 安装sudo apt-get install libbz2-dev
最后有跑到 lighttpd 官网看了下 安装步骤,才发现更简单,直接输入下面指令
1 sudo apt-get build-dep lighttpd2 ./configure3 make4 su make install
默认是安装在 /usr/local 如果你想安装在其他目录,输入
1 ./configure --help
里面有详细说明
安装成功后要想在控制台中 直接启动 lighttpd 需要创建初始化脚本 ,输入
1 sudo update-rc.d lighttpd defaults
我的机器 提示 System start/stop links for /etc/init.d/lighttpd already exist。看来在安装的时候 已经帮我创建好了。
启动 lighttpd
1 lighttpd -f
lighttpd: option requires an argument -- 'f'
lighttpd/1.4.32 (Jan 13 2013 12:44:00) - a light and fast webserver
usage:
-f <name> filename of the config-file
-m <name> module directory (default: /usr/local/lib)
-p print the parsed config-file in internal form, and exit
-t test the config-file, and exit
-D don't go to background (default: go to background)
-v show version
-V show compile-time features
-h show this help
看来我们从配置文件启动,输入指令
1 sudo lighttpd -f /etc/lighttpd/lighttpd.conf
我的机器上提示 2013-01-13 14:36:08: (network.c.379) can't bind to port: 80 Address already in use
我的80端口被Apache服务器占用了,所以我们要修改配置文件
vi /etc/lighttpd/lighttpd.conf
加上
server.port = 8090 ##设置端口
保存退出 ,输入指令
1 sudo lighttpd -f /etc/lighttpd/lighttpd.conf
启动 lighttpd 服务器
浏览器中输入
localhost:8080 /默认访问的是 /var/www/ 目录
lighttpd.conf 的详细配置 参考
http://hi.baidu.com/uybdifnwhtbhqsd/item/ed1b59eb7b7560265a2d6497
其实 lighttpd 的配置文件 还是 非常 清晰明了的。
- Ubuntu12.10下安装lighttpd1.4.32详细步骤
- Ubuntu12.10下安装lighttpd1.4.32详细步骤
- ubuntu12.04下安装jdk详细步骤
- ubuntu12.04下安装jdk详细步骤
- ubuntu12.04下安装jdk详细步骤
- ubuntu12.04下wine1.5.9安装QQ2012详细步骤
- ubuntu12.04.4安装cuda5.5详细步骤
- Ubuntu12.04下安装 Ns3.19 步骤
- Ubuntu12.04下PyTorch详细安装记录
- Ubuntu12.04下Tomcat集群搭建详细步骤
- Ubuntu11.10下手工安装eclipse3.7.1详细步骤
- linux环境下oracle 10 R2安装详细步骤
- win7下安装ubuntu12.10
- Ubuntu12.10下安装flash
- win7下安装ubuntu12.10
- ubuntu12.10下安装Asterisk
- ubuntu12.10下安装Asterisk
- ubuntu12.10 下安装libtorrent
- 如何向App Store提交应用
- Aix下网络存储挂载
- opencv学习记录(3)Mat - 基本图像容器
- android的消息队列机制
- Linux下用hostapd架无线AP
- Ubuntu12.10下安装lighttpd1.4.32详细步骤
- c语言个人通讯录(功能未全部完成)
- 【python】 安装python
- tomcat性能调优
- 常见内存错误大全
- 古怪的C++语法*p++=*q++
- Asp.net MVC 环境搭建 .
- c语言-链表实现
- android的异步加载图片的解决方案