月归档:三月 2011

防火墙和selinux的启动和关闭

1、防火墙简单管理
查看状态:service iptables status
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off

2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop

2、selinux简单管理
1)关闭selinux
#vi /etc/selinux/config
SELINUX=enforcing
改为
SELINUX=disabled
#setenforce 0

2)开启selinux
#vi /etc/selinux/config
SELINUX=disabled
改为
SELINUX=enforcing
#setenforce 1

发表在 Linux | 评论关闭

CentOS 5建立本地源

1、mkdir /media/CentOS

2、mount /dev/cdrom /media/CentOS

3、查看CentOS-Media.repo中内容
[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/ CentOS
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta

3、我们只需编辑下bashurl ,将自己的光盘路径写入

4、可以使用 yum –disablerepo=\* –enablerepo=c5-media [command]
如:yum –disablerepo =* –enablerepo=c5-media install gcc 安装

发表在 Linux | 评论关闭

配置Oracle ASM磁盘

1、确定Linux版本
uname -a
Note:我的系统是redhat 5.5

2、下载asm的lib包

http://www.oracle.com/technetwork/topics/linux/index-101839.html

根据Linux版本,选择合适版本下载(redhat 5.5 32位系统)
oracleasm-support-2.1.4-1.el5.i386.rpm
oracleasm-2.6.18-194.26.1.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm

3、安装ams包(root)
rpm -Uvh oracleasm-support-2.1.4-1.el5.i386.rpm
rpm -Uvh oracleasm-2.6.18-194.26.1.el5-2.0.5-1.el5.i686.rpm
rpm -Uvh oracleasmlib-2.0.4-1.el5.i386.rpm

4、配置ASM的库文件(root)
/etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets (‘[]’). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module “oracleasm”: [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Note:需要实现创建oracle用户和dba组(一般安装oracle的系统上都会创建)

5、创建ASM磁盘(root)
/etc/init.d/oracleasm createdisk XFF1 /dev/sdb1
/etc/init.d/oracleasm createdisk XFF2 /dev/sdc1

6、配置CSS(root)
$ORACLE_HOME/bin/localconfig add

发表在 Oracle ASM | 一条评论