开发和运行环境
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
#vi /etc/lighttpd/lighttpd.conf,把下面内容全部贴入。
var.log_root = "/var/log/lighttpd"
var.server_root = "/usr/local/www"
var.state_dir = "/var/run"
var.home_dir = "/usr/local/lighttpd"
#vi /etc/init.d/ipshotweb
将prog改为"ipshotweb",改lighttpd路径为“/usr/local/lighttpd/sbin/lighttpd”
#cp doc/config/lighttpd.conf/etc/lighttpd/lighttpd.conf
#> /etc/lighttpd/lighttpd.conf
var.conf_dir = "/etc/lighttpd"
var.vhosts_dir = server_root + "/vhosts"
var.cache_dir = "/var/cache/lighttpd"
var.socket_dir = home_dir + "/sockets"
server.modules = (
rpm --importhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
2.2
条件:设置好yum镜像网站”2.1部分”,注意,两次update.
#yum update
#yum update
#reboot
2.3
#yum install openssl-develpcre-develpcre
#make
#make install
#mkdir–p /etc/lighttpd,配置文件目录
#mkdir–p/var/log/lighttpd,日志文件目录
#mkdir–p /usr/local/www,界面程序文件目录
#mkdir -p /var/run/lighttpd,运行启动文件保存目录
#cp doc/initscripts/rc.lighttpd.redhat /etc/init.d/ipshotweb,web服务器启动文件
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
#wgethttp://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.28.tar.gz
#tar zxfv lighttpd-1.4.28.tar.gz
#cd lighttpd-1.4.28
#./configure --prefix=/usr/local/lighttpd --sysconfdir=/etc/lighttpd --with-openssl --with-pcre --with-zlib
2.4
如果需要升级内核,请按照下面的方式。
#wgethttp://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.tar.bz2
#tar jxfvlinux-2.6.37.tar.bz2
#cdlinux-2.6.37
#cp/boot/config-2.6.18-194.32.1.el5.config
#url.redirect = ( "^/wishlist/(.+)" => "http://www.example.com/$1" )
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
)
url.access-deny = ( "~", ".inc", ".htpasswd" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
#url.rewrite = ( "^/$" => "/server-status" )
#make oldconfig
#vi .config,找到CONFIG_SYSFS_DEPRECATED=y,CONFIG_SYSFS_DEPRECATED_V2=y
#make
#make modules_install
#make install
#cd /boot
#mkdir newinit
#cd newinit
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
#server.errorlog-use-syslog = "enable"
#include "conf.d/debug.conf"
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.max-fds = 2048
)
server.port=8081
server.use-ipv6 = "disable"
#server.bind = "localhost"
#server.username = "lighttpd"
#server.groupname = "lighttpd"
#server.core-files = "disable"
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" 来自百度文库> "text/plain",
".log" => "text/plain",
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=http://mirror.its.sfu.ca/mirror/CentOS/5/os/$basearch
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#server.max-read-idle = 60
#server.max-write-idle = 360
#server.kbytes-per-second = 128
#connection.kbytes-per-second = 32
index-file.names += (
"index.php", "index.html", "index.htm", "default.htm", "default.php"
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
#vigrub/grub.conf,修改initrd /boot/initrd-2.6.37.img为initrd-2.6.37.jethely.img
#vi /boot/grub/grub.conf
#修改default=0
#reboot
3
#mkdir–p/iphost/env,此目录为内核升级,web,php源代码目录,开发系统不用删除。
server.stat-cache-engine = "simple"
server.max-connections = 1024
#server.max-keep-alive-idle = 5
#server.max-keep-alive-requests = 16
#server.max-request-size = 0
#zcat ../initrd-2.6.37.img |cpio–i
#vi init
#编辑init文件,删除重复的部分” insmod /lib/dm-region-hash.ko”。
重新打包initrd
#find . | cpio -c -o > ../initrd
#cd ..
#gzip -9 < initrd >initrd-2.6.37.jethely.img
server.document-root = server_root
accesslog.filename = log_root + "/access.log"
server.tag = "oneplat"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"
"mod_access",
"mod_auth",
"mod_accesslog",
"mod_fastcgi",
"mod_cgi" )
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
j
1
IPSHOT服务器管理系统采用php+lighttpd+sqlite架构方式,开发系统为REDHAT5.5版本。
2
为了代码编译过程中减少问题,将尽量采用最新包裹。安装的时候请选上development包裹,否则你需要用yum install gcc自行安装。
2.1
1)修改yum升级URL
修改baseurl,enabled和gpgkey三个选项。
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
"" => "application/octet-stream",
var.log_root = "/var/log/lighttpd"
var.server_root = "/usr/local/www"
var.state_dir = "/var/run"
var.home_dir = "/usr/local/lighttpd"
#vi /etc/init.d/ipshotweb
将prog改为"ipshotweb",改lighttpd路径为“/usr/local/lighttpd/sbin/lighttpd”
#cp doc/config/lighttpd.conf/etc/lighttpd/lighttpd.conf
#> /etc/lighttpd/lighttpd.conf
var.conf_dir = "/etc/lighttpd"
var.vhosts_dir = server_root + "/vhosts"
var.cache_dir = "/var/cache/lighttpd"
var.socket_dir = home_dir + "/sockets"
server.modules = (
rpm --importhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
2.2
条件:设置好yum镜像网站”2.1部分”,注意,两次update.
#yum update
#yum update
#reboot
2.3
#yum install openssl-develpcre-develpcre
#make
#make install
#mkdir–p /etc/lighttpd,配置文件目录
#mkdir–p/var/log/lighttpd,日志文件目录
#mkdir–p /usr/local/www,界面程序文件目录
#mkdir -p /var/run/lighttpd,运行启动文件保存目录
#cp doc/initscripts/rc.lighttpd.redhat /etc/init.d/ipshotweb,web服务器启动文件
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
#wgethttp://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.28.tar.gz
#tar zxfv lighttpd-1.4.28.tar.gz
#cd lighttpd-1.4.28
#./configure --prefix=/usr/local/lighttpd --sysconfdir=/etc/lighttpd --with-openssl --with-pcre --with-zlib
2.4
如果需要升级内核,请按照下面的方式。
#wgethttp://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.tar.bz2
#tar jxfvlinux-2.6.37.tar.bz2
#cdlinux-2.6.37
#cp/boot/config-2.6.18-194.32.1.el5.config
#url.redirect = ( "^/wishlist/(.+)" => "http://www.example.com/$1" )
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
)
url.access-deny = ( "~", ".inc", ".htpasswd" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
#url.rewrite = ( "^/$" => "/server-status" )
#make oldconfig
#vi .config,找到CONFIG_SYSFS_DEPRECATED=y,CONFIG_SYSFS_DEPRECATED_V2=y
#make
#make modules_install
#make install
#cd /boot
#mkdir newinit
#cd newinit
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
#server.errorlog-use-syslog = "enable"
#include "conf.d/debug.conf"
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.max-fds = 2048
)
server.port=8081
server.use-ipv6 = "disable"
#server.bind = "localhost"
#server.username = "lighttpd"
#server.groupname = "lighttpd"
#server.core-files = "disable"
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" 来自百度文库> "text/plain",
".log" => "text/plain",
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=http://mirror.its.sfu.ca/mirror/CentOS/5/os/$basearch
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#server.max-read-idle = 60
#server.max-write-idle = 360
#server.kbytes-per-second = 128
#connection.kbytes-per-second = 32
index-file.names += (
"index.php", "index.html", "index.htm", "default.htm", "default.php"
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
#vigrub/grub.conf,修改initrd /boot/initrd-2.6.37.img为initrd-2.6.37.jethely.img
#vi /boot/grub/grub.conf
#修改default=0
#reboot
3
#mkdir–p/iphost/env,此目录为内核升级,web,php源代码目录,开发系统不用删除。
server.stat-cache-engine = "simple"
server.max-connections = 1024
#server.max-keep-alive-idle = 5
#server.max-keep-alive-requests = 16
#server.max-request-size = 0
#zcat ../initrd-2.6.37.img |cpio–i
#vi init
#编辑init文件,删除重复的部分” insmod /lib/dm-region-hash.ko”。
重新打包initrd
#find . | cpio -c -o > ../initrd
#cd ..
#gzip -9 < initrd >initrd-2.6.37.jethely.img
server.document-root = server_root
accesslog.filename = log_root + "/access.log"
server.tag = "oneplat"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"
"mod_access",
"mod_auth",
"mod_accesslog",
"mod_fastcgi",
"mod_cgi" )
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
j
1
IPSHOT服务器管理系统采用php+lighttpd+sqlite架构方式,开发系统为REDHAT5.5版本。
2
为了代码编译过程中减少问题,将尽量采用最新包裹。安装的时候请选上development包裹,否则你需要用yum install gcc自行安装。
2.1
1)修改yum升级URL
修改baseurl,enabled和gpgkey三个选项。
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
"" => "application/octet-stream",