Archive for 七月, 2017


rhel7安装oracle12.2

1、关闭selinux
vi /etc/selinux/config
SELINUX=disabled

2、关闭防火墙等不必要服务
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl disable rhsmcertd.service
systemctl disable postfix.service

3、建立群组和用户
groupadd oinstall; groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

4、修改内核参数
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1987162112
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

应用并生效
sysctl -p

5、修改用户上限值
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240

6、安装所需组件
yum groupinstall -y “X Window System"
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 \
glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 \
libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 \
libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 net-tools.x86_64 smartmontools.x86_64 xclock xeyes wget lrzsz zip unzip

7、创建/u01目录并赋予新权限
mkdir /u01; chown -R oracle:oinstall /u01; chmod -R 775 /u01; chmod g+s /u01

8、解压缩oracle12.2
su – oracle
$ unzip linuxx64_12201_database

9、通过SSH从一台图像化Linux计算机远程登录
ssh -X oracle@x.x.x.x

10、安装oracle12.2
su – oracle
$ /database/runInstaller

11、用root用户执行
# /u01/app/oraInventory/orainstRoot.sh
# /u01/app/oracle/product/12.2.0/dbhome_1/root.sh

12、配置oracle用户环境变量
vi /home/oracle/.bash_profile
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

13、登录数据库
$ sqlplus system@orcl
https://x.x.x.x:5500/em

PS: 如果启用了firewall那么还需要执行,确保1521/tcp 3938/tcp 5500/tcp 5520/tcp这4个tcp端口开放访问
# firewall-cmd –get-active-zones
# firewall-cmd –zone=public –add-port=1521/tcp –add-port=5500/tcp –add-port=5520/tcp –add-port=3938/tcp –permanent
# firewall-cmd –reload
# firewall-cmd –list-ports

通过WIN+xmanager远程,需要设置环境变量
$ export LANG=C
$ export DISPLAY=x.x.x.x:0.0
$ xhost +

如何在CentOS7设置多媒体

安装nux-dextop软件库
yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

安装adobe软件库
yum -y install http://linuxdownload.adobe.com/linux/x86_64/adobe-release-x86_64-1.0-1.noarch.rpm

安装Firefox的flash插件
yum install flash-plugin

安装Firefox的java 插件
yum install icedtea-web

安装 Handbrake、VLC及smplayer
yum install vlc smplayer ffmpeg HandBrake-{gui,cli}

安装播放某类媒体所需的解码器及译码器
yum install libdvdcss gstreamer{,1}-plugins-ugly gstreamer-plugins-bad-nonfree gstreamer1-plugins-bad-freeworld

mount | grep gvfs

sudo umount -fl /run/user/(用户ID数字) gvfs
sudo rm -rf /run/user/(用户ID数字) gvfs

reboot

PS: 用户ID用命令
id xxx
查看数字编号