Linux c 数据类型
当Linux内核在体系结构差异较大的平台之间移植时,会产生与数据类型相关的问题。
.在编译内核时使用 -Wall -W strict-prototypes 选项, 可以避免很多错误的发生
.内核使用的基本数据类型主要有:
int 标准C语言整数类型
u32 32位整数类型
pid_t 特定内核对象pid的类型
.在不同的CPU体系结构上,C语言的数据类型所占空间不一样。
arch
char
short
int
long
ptr
long-long
u8
u16
u32
u64
i686
1
2
4
4
4
8
1
2
4
8
i386
1
2
4
4
4
8
1
2
4
8
alpha
1
2
4
8
8
8
1
2
4
8
armv41
1
2
4
4
4
8
1
2
4
8
ia64
1
2
4
8
8
8
1
2
4
8
m68k
1
2
4
4
4
8
1
2
4
8
mips
1
2
4
4
4
8
1
2
4
8
ppc
1
2
4
4
4
8
1
2
4
8
sparc
1
2
4
4
4
8
1
2
4
8
sparc64
1
2
4
4
4
8
1
2
4
8
.内核中的地址是unsigned long类型, 指针大小和long类型相同
.内核提供下列数据类型, 所有类型在头文件<asm/types.h>中声明, 这个文件又被头文件<Linux/types.h>所包含, 下面是 include/asm/typs.h文件
[File] /usr/src/kernels/2.6.9-22.EL-i686/include/asm-i386/types.h
#ifndef _I386_TYPES_H
#define _I386_TYPES_H
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __sig
相关文档:
总览
用iptables -ADC 来指定链的规
则
,-A添加 -D删除 -C 修改
iptables - [RI] chain rule num rule-specification[option]
用iptables - RI 通过规则的顺序指定
iptables -D chain rule num[option]
删除指定规则
iptables -[LFZ] [chain][option]
用iptables -LFZ 链名 [选项]
iptables -[NX] chain
用 -NX ......
Centos redhat ,oracle10g,oracle11g均适用
1. 编写脚本:
# vi startoracle.sh
#11g的话只是这个目录有所区别
ORACLE_HOME=/home/oracle/product/10.2.0/db_1;export ORACLE_HOME
ORACLE_SID=orcl;export ORACLE_SID #这里配上你的本地示例名
&nbs ......
在命令模式下设置IP地址,有两种方式,一种是本次开机有效,即使用ifconfig eth0 IP netmask 的方式,系统一旦关机重启需要重新设置IP;另一种直接更改配置文件。在这里采用直接修改配置文件的方式进行设置IP。
LINUX IP配置文件为ifcfg-eth0,该文件存放在/etc/sysconfig/network-scripts路径下,
采用V ......
由于第一接触linux系统的安装,安装过程特别郁闷。现在的机器都是集成网卡,导致linux服务器版都无法识别。要我们自己手动更新驱动。
我装的机器网卡型号是82567LM-3 ,这个驱动程序可以从intel官网上下载,版本内核是2.6的。
http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Ethernet+Co ......
# cd /home/tmp (进入压缩包所在目录)
# groupadd mysql (建立mysql组)
# useradd -g mysql mysql (在mysql组中建立mysql用户)
# tar -zxvf mysql-5.0.37.tar.gz (解压mysql源码,bz2压缩包请用“tar -jvxf 文件名”指令)
# cd mysql-5.0.37 (进入解压目录)
# ./configure --prefix=/usr/local/mysql (p ......