易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

linux 0.11 内核学习 truncate.c


/*
 * 该文件主要实现的是truncate函数,该函数是释放指定i 
 * 节点在设备上占用的所有逻辑块,包括直接块、一次间
 * 接块和二次间接块
 */
/*
 *  linux/fs/truncate.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <linux/sched.h>
#include <sys/stat.h>
/* 释放一次间接块,参数int dev, int block指明一次间接块的设备号 */
static void free_ind(int dev,int block)
{
struct buffer_head * bh;
unsigned short * p;
int i;
// 如果逻辑块号为0,则返回
if (!block)
return;
// 读取一次间接块,并释放其上表明使用的所有逻辑
// 块,然后释放该一次间接块的缓冲区
if (bh=bread(dev,block)) {
p = (unsigned short *) bh->b_data;
for (i=0;i<512;i++,p++)
if (*p)
free_block(dev,*p);
brelse(bh);
}
free_block(dev,block);
}
/* 释放二次间接块,int dev, int block指明二次间接块的逻辑号 */
static void free_dind(int dev,int block)
{
struct buffer_head * bh;
unsigned short * p;
int i;
if (!bl ......

linux 0.11 内核学习 read_write.c


/*
 * 该文件实现系统调用read,write和lseek。
 */
/*
 *  linux/fs/read_write.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <sys/stat.h>
#include <errno.h>
#include <sys/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <asm/segment.h>
/* 字符设备读写函数 */
extern int rw_char(int rw,int dev, char * buf, int count, off_t * pos);
/* 读管道操作函数 */
extern int read_pipe(struct m_inode * inode, char * buf, int count);
/* 写管道操作函数 */
extern int write_pipe(struct m_inode * inode, char * buf, int count);
/* 块设备读操作函数 */
extern int block_read(int dev, off_t * pos, char * buf, int count);
/* 块设备写操作函数 */
extern int block_write(int dev, off_t * pos, char * buf, int count);
/* 读文件操作函数 */
extern int file_read(struct m_inode * inode, struct file * filp,
char * buf, int count);
/* 写文件操作函数 */
extern int file_write(struct m_inode * inod ......

linux 0.11 内核学习 char_dev.c


/*
 *  linux/fs/char_dev.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <errno.h>
#include <sys/types.h> // 定义了基本的系统数据类型
#include <linux/sched.h>
#include <linux/kernel.h> // 含有一些内核常用函数的原形定义
#include <asm/segment.h>
#include <asm/io.h>
/* 中断读 */
extern int tty_read(unsigned minor,char * buf,int count);
/* 中断写 */
extern int tty_write(unsigned minor,char * buf,int count);
/* 定义字符设备读写函数指针类型 */
typedef (*crw_ptr)(int rw,unsigned minor,char * buf,int count,off_t * pos);
/* 串口终端读写操作函数。参数 : rw读写命令,minor中断子设备号,buf缓冲区 */
/* count读写的字节数,pos读写操作当前指针,返回实际读写的字节数  */
static int rw_ttyx(int rw,unsigned minor,char * buf,int count,off_t * pos)
{
return ((rw==READ)?tty_read(minor,buf,count):
tty_write(minor,buf,count));
}
/* 终端读写操作函数,只是增加了对进程是否有控制终端的检测 */
static int rw_ ......

Linux下启动oracle

1. linux下启动oracle
su - oracle
sqlplus /nolog
conn /as sysdba
startup
exit
lsnrctl start
exit
2. linux下关闭oracle
su - oracle
sqlplus /nolog
conn /as sysdba
shutdown immediate
exit
lsnrctl stop
exit
可以使用lsnrctl 进去后用status查看状态,类似:
lsnrctl
status
http://hi.baidu.com/qqlaputa/blog/item/87123ca434d4e6f19152ee33.html ......

linux 0.11 内核学习 buffer.c


/*
 * buffer.c 程序用于对高速缓冲区(池)进行操作和管理。高速缓冲
 * 区位于内核代码和主内存区之间。
 *
 *  |---|---|------------------|---------------------|-------------------|
 *  |   |   |    *   *    *    |       buffer        |                   |
 *  |---|---|------------------|---------------------|-------------------|
 *    |                                   /|\
 *    |------------------------------------|
 *   \|/
 *  buffer_head (list)
 */
/*
 *  linux/fs/buffer.c
 *
 *  (C) 1991  Linus Torvalds
 */
/*
 *  'buffer.c' implements the buffer-cache functions. Race-conditions have
 * been avoided by NEVER le ......

linux设置 让oracle10g自启动


在/etc/rc.d/init.d/ 创建oracle10g文件
touch oracle10g
chmod a+x oracle10g
[root@test~]# vi /etc/rc.d/init.d/oracle10g
#!/bin/bash
#chkconfig:345 51 49
#description:starts the oracle database deamons
#
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
case "$1" in
start)
echo -n "Starting oracle10g:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
touch /var/lock/subsys/oracle10g
echo
;;
stop)
echo -n "shutting down oracle10g:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
rm -f /var/lock/subsys/oracle10g
echo
;;
restart)
echo -n "starting oracle10g:"
$ stop
$ start
echo
;;
*)
echo "usage: oracle10g{start|stop|restart}"
exit
;;
esac
exit
保存文件(按Esc,":wq"),退出以后,添加并启动察看服务。
/sbin/chkconfig --add oracle10g
/sbin/chkconfig --list oracle10g
在su下
service oracle10g start //启动oracle服务
service oracle10g sto ......

linux设置 让oracle10g自启动


在/etc/rc.d/init.d/ 创建oracle10g文件
touch oracle10g
chmod a+x oracle10g
[root@test~]# vi /etc/rc.d/init.d/oracle10g
#!/bin/bash
#chkconfig:345 51 49
#description:starts the oracle database deamons
#
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
case "$1" in
start)
echo -n "Starting oracle10g:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
touch /var/lock/subsys/oracle10g
echo
;;
stop)
echo -n "shutting down oracle10g:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
rm -f /var/lock/subsys/oracle10g
echo
;;
restart)
echo -n "starting oracle10g:"
$ stop
$ start
echo
;;
*)
echo "usage: oracle10g{start|stop|restart}"
exit
;;
esac
exit
保存文件(按Esc,":wq"),退出以后,添加并启动察看服务。
/sbin/chkconfig --add oracle10g
/sbin/chkconfig --list oracle10g
在su下
service oracle10g start //启动oracle服务
service oracle10g sto ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [2929] [2930] [2931] [2932] 2933 [2934] [2935] [2936] [2937] [2938]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号