安装 Suse 10.3 及 Linux 笔记
This is a memo of setting up Suse 10.3 on Mon Mar 17, 5:18 PM
Download Open Suse: http://en.opensuse.org and see http://en.opensuse.org/Download_Help
Summary - These tools were configured to use:
Apache 2.2 web server
Bison 2.3
Flex 2.5.33
Ftp server
Gcc 4.2.1 (C/C++)
Java 1.5.0
Mono (C# cross compiler)
MySQL (Ver 14.12 Distrib 5.0.45, for suse-linux-gnu (i686) using readline 5.2)
Perl (v5.8.8 built for i586-linux-thread-multi)
Php (PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 23 2007 14:12:53))
phpBB 3.0.1
Python 2.5.1
SSH server
Demos
cgi-bin/hi.cgi
(cgi written in Perl)
cgi-bin/hi.pl
(cgi written in Perl)
cgi-bin/chi.cgi
(cgi written in C)
php/index.php
(PHP)
cgi-python/hi.py?user_name=me
(Python as cgi, use mod_python.cgihandler as handler)
python/index.py (with a function hello(req, who))
(Python, use mod_python.publisher as handler, the better way)
Perl using MySQL database
Apache
www root is /srv/www/htdocs/
config files are in /etc/apache2/
See apache.txt
for configuration change.
Crontab
crontab.txt
MySQL
Install notes
See Setup guide
The Perl-DBD-MySQL module was missing. So download and install using YaST.
DBD::mysql module note
DBD modules download
Database auto-backup using crontab
Menhir
Menhir install records
OCaml
ocaml.txt
phpBB
phpBB website
To install is very easy, follow the instruction guide
. Note that the database needs to be created manually.
(For MySQL, in MySQL shell, type "create DATABASE [database_name]")
Python
Mod_Python - Integrating Python with Apache
Ruby on Rails
RailsOnSUSE on SUSE 10.0
General note
Notes on install CPAN modules
Installing Perl Modules
In Suse, can use YaST --> Software Management to install new package.
More notes
=hi.cgi=
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "<html><head><title>Hello World!
相关文档:
关于linux内核中的"__attribute__ ((packed))"
来源:
http://jimmy-lee.blog.hexun.com/8001013_d.html
__attrubte__ ((packed)) 的作用就是告诉编译器取消结构在编译过程中的优化对齐,按照实际占用字节数进行对齐。
#define __u8 unsigned char
#define __u16 unsigned short
......
前 言
随着各种便携嵌入式设备性能的日益提高,功能日益丰富,其电源紧张的问题也日益突出,国内新推出的某些具有PDA等多种功能的智能电话在密集使用下只能维持半天,多数摄像机
和数码相机
在
一次充电后都只有一个小时左右的累积工作时间。Linux作为一个开放源代码的操作系统,拥有非常丰富的软件 ......
网络截包是一项很有意思的课题,可以有数据过滤,防火墙,流量控制,报文篡改等诸多应用,按照内核分层架构将一些截包方法不完全整理如下,欢迎补充。
1、 L1层驱动截包法
在驱动中下手应该可以说是最贴近底层的,网卡驱动中总有rx接收和xmit发送函数,参数总是sk_buffer,在这里修改很黄很暴力,而且 ......
并发与竞态
解决竞态问题的途径是保证对共享资源的互斥访问。
访问共享资源的代码区域称为临界区,临界区需要以某种互斥机制加以保护。中断屏蔽、原子操作、自旋锁和信号量等是Linux设备驱动中可采用的互斥途径。
中断屏蔽
中断屏蔽将使得中断与进程之间的并发不再发生,而且,由于Linux内核的进程调度等操作都依赖 ......
include/linux/sched.h
384 struct task_struct {
385 volatile long state;
386 struct thread_info *thread_info;
387 atomic_t usage;
388 unsigned long flags;
389 &nbs ......