Liunx添加硬盘

新加一块SCSI硬盘,需要将其分区挂载到Linux系统上:
#fdisk /dev/sdb
进入fdisk模式:
Command (m for help):p –查看新硬盘的分区
Command (m for help):n –创建新分区
可以用
m命令来看fdisk命令的内部命令;
n命令创建一个新分区;
d命令删除一个存在的分区;
p命令显示分区列表;
t命令修改分区的类型ID号;
l命令显示分区ID号的列表;
a命令指定启动分区;
w命令是将对分区表的修改存盘让它发生作用。
Command action
e extended –输入e为创建扩展分区
p primary partition (1-4) –输入p为创建主分区,这里我们选择p
Partion number(1-4):1 –第一个扩展分区,按你需求可以最多分4个主分区
First Cylinder(1-1014,default 1): 1 –第一个主分区起始的磁盘块数
Last cylindet or +siza or +sizeM or +sizeK: +1024MB –可以是以MB为单位的数字或者以磁盘块数,这里我们输入+1024MB表示分区大小为1G。
这样我们就创建完一个分区,如果要创建更多分区可以照上面的步骤继续创建。
创建完后用w保存分区。
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
这样就分区完,我们还要进行格式化
#mkfs -t ext3 -c /dev/sdb1 –如果有多个分区,则分区修改为sdb2这样格式化完后我们需要进行挂载分区
#parted -l –查看分区情况
#mkdir www –创建/www目录,我们将把新的分区挂到www下
#mount /dev/sdb1 /www –将/dev/sdb1挂载到/www
# df –用df命令进行查看
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 3771316 1388956 2190788 39% /
/dev/sda1 101089 9463 86407 10% /boot
none 62988 0 62988 0% /dev/shm
/dev/sdb1 485906 8239 452580 2% /www –看到了,这就是我们刚才新挂载的分区
到这里我们工作已接近尾声了,不过我们如果这样就结束的话,我们每次重新启动服务器后都要进行手工挂载,这样很麻烦,我们需要修改/etc/fstab文件来进行自动挂载。
#vi /etc/fstab
在文件的末尾填加如下内容:
/dev/sdb1 /www ext3 defaults 1 2
如有多个分区可修改sdb1和/www,修改完后保存,重启系统,或者mount /dev/sdb1 /www 先挂载使用

发表在 Linux | 评论关闭

redhat 4 安装 Oracle 10g

必须安装包
binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1

用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle

创建文件夹
mkdir -p /u01/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01

修改系统参数
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so

vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

设置环境变量
vi ~/.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=orcl
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$PATH:$ORACLE_HOME/bin
export PATH NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID

发表在 Oracle安装升级 | 3 条评论

CONTROL_FILE_RECORD_KEEP_TIME和LOG_ARCHIVE_LOCAL_FIRST

CONTROL_FILE_RECORD_KEEP_TIME
表示控制文件里可重复使用的记录所能保存的最小天数。如果新增加一条记录到控制文件可以重复使用的部分,这时最老的记录尚没有超出最小保留天数,那么记录将控制文件的这一部分将扩展。如果将该参数设置为0,那么控制文件可以重复使用的部分将永远不会扩展。
注意,这个参数只应用于控制文件中可循环利用的部分,如归档日志文件,各种备份记录。不应用于诸如数据文件,表空间,重做线程等,这些内容只有当其从对应的表空间中删除后才能重用。

LOG_ARCHIVE_LOCAL_FIRST
specifies when the archiver processes (ARCn) transmit redo data to remote standby database destinations.(11g中不建议使用)可选值:true/false
true
Directs the ARCn process to transmit redo data after the online redo log file has been completely and successfully archived to at least one local destination. This is the default value.
Because the online redo log files are archived locally first, the LGWR process reuses the online redo log files much earlier than would be possible if the ARCn processes archived to the standby database concurrently with the local destination. This behavior is useful when archiving to remote destinations that use a slow network connection, such as a long-distance wide area network (WAN).
false
Directs the ARCn process to transmit redo data at the same time the online redo log file is archived to the local destinations. This results in redo data being promptly dispatched to the remote standby database destination.
Setting LOG_ARCHIVE_LOCAL_FIRST to false is most useful for faster network connections, such as high-speed local area networks (LAN).

发表在 Oracle | 评论关闭