本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7578640
建立时间:2006年5月29日




[Python]web.py 进阶2,连接 MySQL 数据库,以及其它的一些内容
软件技术

lhwork 发表于 2007/2/6 16:38:18

第一部分在这里 申明一点,这里的例子都是基于 web.py 0.2 版本的。现在网上的 web.py 中文教程是基于 0.1 的,如果你看到的文章一开始说要安装什么 Cheetah,那肯定不适用现在的情况了。 首先说的是 Python 连 MySQL,以及 UTF-8 字符集的事情。我这里假设你的应用是纯 UTF-8 的,而且使用 MySQL 4.1 以上的版本。 Python for MySQL 的连接扩展在 mysql-python,Debian Sarge 的包里面是 1.2.1c2 版,是不支持 4.1 的 Charset 特性的,最新的 1.2.1_p2 版支持的很好,只不过从这个版本开始必须依赖 Python2.4 了。 当使用 mysql-python connect()的时候有两个重要参数,chars


阅读全文(7405) | 回复(0) | 编辑 | 精华 | 删除
 


[Python]Apache 2.2 + web.py + RoR
软件技术

lhwork 发表于 2007/2/6 16:37:08

1. mod_python 非常不主流,所有 Python 的 Web 框架都内置一个 HTTP Server 的实现(在 Python 世界里这样做太简单了),web.py 还包括了 FastCGI/SCGI 的支持。RoR 也同样通过 mongrel 提供了 web server 支撑。 2. lighttpd 支持反向代理,也支持 FastCGI,再加上它确实够轻,性能也不错,而且用 apache httpd 不够酷,于是它成了新潮 web hacker 们的最爱。 3. 其实我很有理由使用 lighttpd,因为我的内存只有 128M。但我想通过 http 端口来跑 svn,没办法,只有用 apache。编译的时候加上 rewrite/proxy 的支持./configure --prefix=/usr/local/apache2 --enable-so -enable-ssl \ --enable-rewrite --enable-proxy --enable-proxy-http mo


阅读全文(3464) | 回复(0) | 编辑 | 精华 | 删除
 


[Python]web.py 进阶例程
软件技术

lhwork 发表于 2007/2/6 16:34:18

web.py 的首页提供了一个 13 行的例子来演示如何开始一个应用,但其网站上似乎就没有别的更进一步的例子了。这两天简短学习了一下,写一个进阶例程。包括:读取 GET/POST 变量,以及模板的使用。 #!/usr/bin/python import web   urls = ( '/sample', 'sample', '/(

阅读全文(3495) | 回复(0) | 编辑 | 精华 | 删除
 


[Python]web.py templating system (codename: templetor)
软件技术

lhwork 发表于 2007/2/6 16:33:50

There are almost as many Python templating systems as there are web frameworks (and, indeed, it seems like many templating systems are adopting web framework-like features), so it is with some trepidation that I work on a new one. Sadly, again I find that my requirements are met by nothing else: The templating system has to look decent. No <%#foo#%> crud. Reuse Python terms and semantics as much as possible. Expressive enough to do real c

阅读全文(4202) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]如何在ISConfig服务器上安装Cacti
软件技术

lhwork 发表于 2007/2/6 12:28:05

这篇教程将指导我们怎样一步一步地在ISPConfig服务器上安装Cacti监测工具。从标准安装好的ISPConfig服务器或者Apache中安装Cacti不是件麻烦人,很容易搞定。 Version: 1.1
Author: Vinicius Martins <vinicius [at] viniciusmartins [dot] eng [dot] br >
Last edited 11/16/2006 In this article I describe how to install and setup the Cacti in a ISPConfig Server. There aren't many differences fro

阅读全文(2777) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]监视并记录Apache网站服务器的运行
软件技术

lhwork 发表于 2007/2/6 11:45:13

在Apache下的日志简介
Apache提供了广泛记录运行时各方面信息的工具。比如有条件性的记录日志,日志循环,确定IP地址等时普遍会遇到的问题。还讲解很多用于检测您的Apache服务器状态以及分析其日志的捆绑的第三方模块和工具。
默认的Apache日志文件
Apache提供很多检测和日志工具来追踪服务器的正确运行。默认的Apache配置提供两个日志文件,放置在安装目录下的日志目录里面。
access_log 这个文件(在windows下对应access.log文件)包含了服务器已经处理过的请求的信息,比如说请求的URL,客户端的IP地址,请求是否被成功完成等。error_log 这个文件(在windows下对应error.log文件)包含了与错误情况相关的信息,以及服务器生命周期中不同的大事件。
创建日志格式

阅读全文(4319) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]如何检测和重启Apache和Lighttpd
软件技术

lhwork 发表于 2007/2/6 11:43:29

Monit是一款功能非常丰富的进程、文件、目录和设备的监测软件,用于Unix平台。它可以自动修复那些已经停止运作的程序,特使适合处理那些由于多种原因导致的软件错误。

When you cannot monitor your server for service availability, it is better to take help of automated monitor and restart utility. Last 4 days I was away from my server as I was enjoying my vacation. During this time due to load my lighttpd webserver died but it was restarted automatically within 2 minutes. I had utility configured for monitoring services on a Linux system called monit. It offers all feat

阅读全文(4182) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]使用Rsync和SSH实现Snapshot型增量备份
软件技术

lhwork 发表于 2007/2/6 11:40:04

Author: Stephan Jau <tutorials [at] roleplayer [dot] org> Based upon the works of: Falko Timme <ft [at] falkotimme [dot] com> & Mike Rubel <webmaster [at] www [dot] mikerubel [dot] org> Introduction As neither human nor computers are perfect (humans err / computers may fail) it is quite obvious that a good backup system will prevent too much damage once the computer may go down. This could be either because the harddrive is failing, because of

阅读全文(2730) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]RSYNC + SSH異地備援
软件技术

lhwork 发表于 2007/2/6 11:39:30

一.前言 自從911事件之後...異地備援這個名稱就常聽人提起...不過就是滿少看到大家在討論...剛好這次因為有需要...不得不研究這個東西...順便看看大家都是怎樣實作異地備援的...底下是個人的一點點心得... 這次主要分成三個部份...單向 Trusted SSH Authorized...Rsync...Crontab....姑且不論傳輸速度為何...以及無時差的異地備援...相信這樣的Solutions應該可以滿足一般人的需求吧... 二.準備 測試系統: Red Hat Linux 7.3 to Red Hat 7.3 ...Local 端需要啟動 Rsync...套件 openssh-3.4p1

阅读全文(1616) | 回复(0) | 编辑 | 精华 | 删除
 


[网络与系统管理]Using Rsync and SSH
软件技术

lhwork 发表于 2007/2/6 11:37:26

Keys, Validating, and Automation This document covers using cron, ssh, and rsync to backup files over a local network or the Internet. Part of my goal is to ensure no user intervention is required when the computer is restarted (for passwords, keys, or key managers). I like to backup some logging, mail, and configuration information sometimes on hosts across the network and Internet, and here is a way I have found

阅读全文(2888) | 回复(0) | 编辑 | 精华 | 删除
 





站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.125 second(s), page refreshed 144766472 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号