今天接到通知,下周去一个新客户那边部署新环境,问题是时间还很紧,让下周一就去,时间紧还不是大问题,问题是产品的中间件Weblogic跟数据库Oracle我都好久没玩
今天接到通知,下周去一个新客户那边部署新环境,问题是时间还很紧,让下周一就去,时间紧还不是大问题,问题是产品的中间件weblogic跟数据库oracle我都好久没玩了,没得办法,只能提前演练一下了,为了下次找起来更加方便,就把过程整理到本博客上面来,也可以方便其他童鞋的查询吧。
谁要是跟我纠结时间这么紧,哪来的时间写博客的,我跟谁急哦!方便自己,也方便大家嘛!
华丽分割线
一.查看系统配置信息
[root@web-db ~]# hostname –fqdn //查看主机名web-db[root@web-db ~]# ifconfig eth0 //查看本机IP地址eth0Link encap:Ethernet HWaddr 06:F1:96:00:00:C0inet addr:192.168.153.153 Bcast:192.168.153.255 Mask:255.255.255.0inet6 addr: fe80::4f1:96ff:fe00:c0/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:1706513 errors:0 dropped:0 overruns:0 frame:0TX packets:877952 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:2565533900 (2.3 GiB) TX bytes:59768622 (56.9 MiB)[root@web-db ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.153.153 web-db[root@web-db ~]# cat /etc/redhat-release //查看RHEL发行版本Red Hat Enterprise Linux Server release 6.3 (Santiago)[root@web-db ~]# uname -m //查看本机CPU架构x86_64[root@web-db ~]# free -m //查看内存跟交换分区信息totalusedfreeshared bufferscachedMem:7870287649930122609-/+ buffers/cache:2547616Swap:576005760[root@web-db ~]# df -H //查看分区挂载信息FilesystemSize Used Avail Use% Mounted on/dev/mapper/VolGroup-lv_root9.1G 3.6G 5.1G 41% /tmpfs4.2G0 4.2G 0% /dev/shm/dev/vda1508M 33M 449M 7% /boot/dev/vdb530G 181M 28G 1% /u01
当然,有朋友会问:你用的是物理机还是虚拟机?
我这么有钱,想想就知道我用的是什么了,是不是?
[root@web-db ~]# lscpuArchitecture:x86_64CPU op-mode(s):32-bit, 64-bitByte Order:Little EndianCPU(s):8On-line CPU(s) list: 0-7Thread(s) per core: 1Core(s) per socket: 1CPU socket(s):8NUMA node(s):1Vendor ID:GenuineIntelCPU family:6Model:13Stepping:3CPU MHz:2393.998BogoMIPS:4787.99Hypervisor vendor:KVMVirtualization type: fullL1d cache:32KL1i cache:32KL2 cache:4096KNUMA node0 CPU(s):0-7
咦? 怎么不是物理机,我说我什么时候这么有钱的呢?用的还是KVM虚拟机。
呵呵,开个玩笑,我们继续技术交流,禁止鄙视使用虚拟机的屌丝!
二.配置系统YUM源,安装依赖包
Typewise.app
面向客户服务和销售团队的AI写作解决方案。
39 查看详情
[root@web-db ~]# mount /dev/sr0 /media/mount: block device /dev/sr0 is write-protected, mounting read-only[root@web-db ~]# cat /etc/yum.repos.d/rhel-source.repo[rhel6u3-core]name=rhel6u3-corebaseurl=file:///mediaenabled=1gpgcheck=0[root@web-db ~]# yum clean allLoaded plugins: product-id, subscription-managerUpdating certificate-based repositories.Unable to read consumer identityCleaning repos: rhel6u3-coreCleaning up Everything[root@web-db ~]# cat package.list //需要安装的依赖包信息列表binutilscompat-libcap1compat-libstdc++-33compat-libstdc++-33*.i686elfutils-libelf-develgccgcc-c++glibc*.i686glibcglibc-develglibc-devel*.i686kshlibgcc*.i686libgcclibstdc++libstdc++*.i686libstdc++-devellibstdc++-devel*.i686libaiolibaio*.i686libaio-devellibaio-devel*.i686makesysstatunixODBCunixODBC*.i686unixODBC-develunixODBC-devel*.i686[root@web-db ~]# yum install `cat package.list` -y //安装依赖包
三.修改内核参数
[root@web-db ~]# cp /etc/sysctl.conf /etc/sysctl.conf_20131016.bak//备份文件[root@web-db ~]# cat /etc/sysctl.conf //在文件爱呢最后添加如下##==========Setting For Oracle 11G R2============##kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744fs.aio-max-nr = 1048576net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.wmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_max = 1048576[root@web-db ~]# sysctl -p //让修改立即生效net.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1error: “net.bridge.bridge-nf-call-ip6tables” is an unknown keyerror: “net.bridge.bridge-nf-call-iptables” is an unknown keyerror: “net.bridge.bridge-nf-call-arptables” is an unknown keykernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 68719476736kernel.shmall = 4294967296kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 6815744fs.aio-max-nr = 1048576net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 4194304net.core.wmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_max = 1048576
四. 创建Oracle用户以及相关权限修改
1. 创建oracle 用户组跟用户
[root@web-db ~]# groupadd oinstall[root@web-db ~]# groupadd dba[root@web-db ~]# useradd -g oinstall -G dba -m oracle[root@web-db ~]# echo oracle |passwd –stdin oracle //创建密码Changing password for user oracle.passwd: all authentication tokens updated successfully.
2. 修改限制
[root@web-db ~]# cp /etc/security/limits.conf /etc/security/limits.conf.20131016.bak##=============Setting For Oracle 11G R2=============##oraclesoft nproc 2047oraclehard nproc 16384oraclesoft nofile 1024oraclehard nofile 65536oraclesoft stack 10240[root@web-db ~]# cat /etc/pam.d/login##======Setting For Oracle 11G R2========##session requiredpam_limits.so[root@web-db ~]# cat /etc/profile##===Setting For Oracle 11G R2=====##if [ $USER = “oracle” ]; thenif [ $SHELL = “/bin/ksh” ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi[root@web-db ~]# source /etc/profile
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/840326.html
微信扫一扫
支付宝扫一扫