CentOS编译安装Lighttpd1.4.28
来源:互联网 发布:知我无情有情 张南雁 编辑:程序博客网 时间:2024/06/03 22:51
CentOS编译安装Lighttpd1.4.28
安装所需编译模块
1
yum
install
gcc glib2-devel openssl-devel pcre-devel
bzip2
-devel
gzip
-devel zlib-devel
You need to install following libraries to compile required modules and features:
- glib2-devel : Gnome header files for version 2 of the GLib library
- openssl-devel – Used by core and SSL support
- pcre-devel – Used by mod_redirect, mod_rewrite,
- bzip2-devel – Use by compress-bzip2
- zlib-devel – Used by compress-gzip and compress-deflate. It contains the header files and libraries.
下载
1
wget http:
//download
.lighttpd.net
/lighttpd/releases-1
.4.x
/lighttpd-1
.4.28.
tar
.gz
解压
1
tar
zxvf lighttpd-1.4.28.
tar
.gz
进入安装目录
1
cd
lighttpd-1.4.28
配置
1
.
/configure
--prefix=
/usr/local/lighttpd
编译与安装
1
make
&&
make
install
拷贝启动脚本
1
sed
-e
's/FOO/lighttpd/g'
doc
/initscripts/rc
.lighttpd >
/etc/init
.d
/lighttpd
修改启动脚本中的lighttpd的安装位置
1
2
vi
/etc/init
.d
/lighttpd
lighttpd=
"/usr/sbin/lighttpd"
-> ighttpd=
"/usr/local/lighttpd/sbin/lighttpd"
增加脚本的执行权限
1
chmod
a+rx
/etc/init
.d
/lighttpd
创建默认配置文件
1
cp
-p doc
/initscripts/sysconfig
.lighttpd
/etc/sysconfig/lighttpd
拷贝配置文件
1
2
mkdir
-p
/etc/lighttpd
cp
-R doc
/config/conf
.d/ doc
/config/
*.conf doc
/config/vhosts
.d/
/etc/lighttpd/
添加到开机自动启动服务
1
chkconfig lighttpd on
修改配置文件
1
vi /etc/lighttpd/lighttpd.conf
var.server_root = "/srv/www" => var.server_root = "/home/wwwroot"
server.use-ipv6 = "enable" => server.use-ipv6 = "disable"
server.username = "lighttpd" => server.username = "www"
server.groupname = "lighttpd" => server.groupname = "www"
运行前的准备
1
2
3
4
5
6
7
8
9
10
11
12
13
# 增加www组与用户
groupadd www
useradd -g www -s /sbin/nologin -d /dev/
null
www
# 分配权限
chown -R www:www /usr/local/lighttpd
chown root:root /etc/rc.d/init.d/lighttpd
chmod
755
/etc/rc.d/init.d/lighttpd
# 创建日志目录
mkdir -p /var/log/lighttpd
chown -R www:www /var/log/lighttpd
# 创建网站根目录
mkdir -p /home/wwwroot
chown -R www:www /home/wwwroot
- CentOS编译安装Lighttpd1.4.28
- CentOS编译安装Lighttpd1.4.28
- 安装笔记 lighttpd1.4.28
- CentOS编译安装lamp
- centos 编译安装glib
- CentOS安装编译环境
- CentOS编译安装lamp .
- centos 编译安装tmux
- centos编译安装lamp
- CentOS编译安装GIMP
- centos 编译 安装 protobuf
- CentOS 编译安装 MongoDB
- Centos 编译安装ACE
- centos 编译安装 heartbeat
- CentOS编译安装gSOAP
- centos 编译 安装 git
- CentOS编译安装boost
- centos 编译安装python
- 基于ACE的线程池学习与实现(二)——ACE_Message_Block与ACE_Condition
- 如何取得bcb运行参数
- js 验证各种格式类型的正则表达式
- V4L2 pixel format
- ubuntu下使用SecureCRT和PUTTY连接串口
- CentOS编译安装Lighttpd1.4.28
- 浏览器内核的解析和对比
- zend framework操作mysql数据库
- 修改注册表开机自启动(vc)
- Objective-C中单例模式的实现
- xcode静态库的使用
- 代码之美——Doom3源代码赏析
- SetWindowOrg和SetViewportOrg
- 是 Sun 的专用 API,可能会在未来版本中删除的解决办法。