易截截图软件、单文件、免安装、纯绿色、仅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

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 ......

linux 0.11 内核学习 pipe.c


/*
 * 该文件中的两个函数read_pipe和write_pipe是上层函数
 * read和write的底层实现
 */
/*
 *  linux/fs/pipe.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <signal.h>
#include <linux/sched.h>
// 内存管理头文件。含有页面大小定义和一些页面释放函数原型
#include <linux/mm.h> /* for get_free_page */
#include <asm/segment.h>
/* pipe类似于队列,向pipe的尾部写入数据,从pipe的头部读取数据    */
/* 管道读操作函数    */
/* 参数inode 是管道对应的i 节点,buf 是数据缓冲区指针,count 是读取的字节数 */
/*
 * read_pipe()函数用于读取管道中的数据,如果管道中没有数据的话,
 * 唤醒写管道进程,自己睡眠,如果读到数据,并把数据传到用户缓冲区,
 * 当把管道中所有的数据都取走后,也要唤醒等待写管道的进程,并返回
 * 已读数据字节数
 */
int read_pipe(struct m_inode * inode, char * buf, int count)
{
int chars, size, read = 0;
while (count>0) 
{
......
总记录数:5772; 总页数:962; 每页6 条; 首页 上一页 [437] [438] [439] [440] 441 [442] [443] [444] [445] [446]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号