Oracle Cloud合作伙伴-上海同富信息科技有限公司

ORACLE-BASE – Oracle Database 11g Release 2 (11.2) Installation On Oracle Linux 6

最完整的在OEL上安装Oracle Database的文章,装OEL为了什么,不就为了方便么。

ORACLE-发布帖子BASE – Oracle Database 11g Release 2 (11.2) Installation On Oracle Linux 6

Oracle ADF Mobile学习笔记 0:先给自己下套

从ADF Mobile发布第一版时就想写一个入门的课程,期间由于杂事繁多,就把这个计划搁置了。端午节假期刚好没外出,宅在家里把半年来欠下的债一个个的还,帮朋友写完一个跳票N久的程序后,想着ADF Mobile也出了第二版,加上官方都出了完善的视频向导,再写向导好象有画蛇添足之嫌。不过本着还自己心愿的态度,就算拾人牙慧,做Oracle官网的搬运工也要把简单的教程写出来。

计划写5篇的向导文章,大纲分列如下:

1. ADF Mobile开发环境的安装及配置;

2. 第一个ADF Mobile程序;

3.ADF Mobile微博客户端的实现(主要演示如何用ADF Mobile调用开放平台的接口,还没决定是用新浪微博还是腾讯微博);

4.WebCenter Content的ADF Mobile客户端实现;

5.WebCenter Portal的ADF Mobile客户端实现;

先挖个坑,给自己下套,希望能有时间把这一系列文章写完。

Installing RHEL EPEL Repo on Centos 5.x or 6.x

习惯了用yum来安装东西,试了下这篇文章提到的做法workable,再做一次搬运工。
原文出处: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x

  • Authored by: Rackspace Support

How to install RHEL EPEL repository on Centos 5.x or 6.x

The following article will describe how to configure a CentOS 5.x-based or Centos 6.x-based system to use Fedora Epel repos and third party remi package repos. These package repositories are not officially supported by CentOS, but they provide much more current versions of popular applications like PHP or MYSQL.

Install the extra repositories

The first step requires downloading some RPM files that contain the additional YUM repository definitions. The instructions below point to the 64-bit versions that work with our Cloud Server instances.

Centos 5.x

wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Centos 6.x

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Once installed you should see some additional repo definitions under the /etc/yum.repos.d directory.

$ ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo
/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/remi.repo

Enable the remi repository

The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services. That means it generally is not a bad idea to enable the remi repositories by default.
First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:

sudo vim /etc/yum.repos.d/remi.repo

Edit the [remi] portion of the file so that the enabled option is set to 1. This will enable the remi repository.

name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

You will now have a larger array of yum repositories from which to install.

    How to Convert a VMware Pre-allocated Virtual Disk to a Growable Virtual Disk

    受不了动辄几百G的虚机,记给自己看,只是在网络上搬运,来源在这里:http://www.virtuatopia.com/index.php/How_to_Convert_a_VMware_Pre-allocated_Virtual_Disk_to_a_Growable_Virtual_Disk

    he vmware-vdiskmanager tool

    The VMware Disk Management Tool is a command line tool which is installed by default with VMware Server. The executable file is named vmware-vdiskmanager and is located in \Program Files\VMware\VMware Server on Windows hosts, and /usr/bin on Linux systems.
    The tool accepts a number of command-line arguments, a full listing of which can be obtained by running vmware-vdiskmanager with no options.
    vmware-vdiskmanager

    Virtual Disk Types

    The type to which a virtual disk is to be converted is specified using the -t flag, together with the target disk type. This is represented by a number as outlined in the following table:
    Type Identifier
    Description
    0
    Growable (single .vmdk file)
    1 Growable (multiple 2GB files)
    2 Pre-allocated (single file)
    3
    Pre-allocated (multiple 2GB files)
    4 Pre-allocated ESX
    5 Compressed for streaming

    Performing the Virtual Disk Type Conversion

    The vmware-vdiskmanager command requires a number of arugments perform a virtual disk type conversion. The syntax for a type conversion is as follows:
    vmware-vdiskmanager -r .vmdk -t  .vmdk
    where .vmdk is the name of the virtual disk image file to be converted,  is the number from the above table indicating the target virtual disk type, and .vmdk is the name of the new, converted file.
    For example, to convert a virtual disk image file called win2008-1_2.vmdk to a growable disk called new.vmdk the following command would need to be executed:
    vmware-vdiskmanager -r  win2008-1_2.vmdk -t 0 new.vmdk

    Creating disk 'new.vmdk'
    Convert: 100% done.
    Virtual disk conversion successful.
    Once the conversion is completed, the virtual machine will need to be configured to use the converted disk, or the new disk renamed to have the name of the original disk.

    使用WebCenter Content不可不知的索引碎片整理

    很多用户在使用Oracle WebCenter Content一段时间后,会发现系统生成索引的速度越来越慢,影响到用户的使用体验。当使用OracleTextSearch或FullText索引方式的时候,就象我们使用电脑时不时要进行磁盘碎片整理一样,需要定时进行索引的碰片整理。

     在默认情况下,当WebCenter Content每索引5000个文档会自动进行全文索引优化,但在实际使用过程中,往往需要我们在使用过程中人工进行干预。 下面是我们公司实际生产环境中的WebCenter Content,长时间没有进行索引整理,从下图可以看到有超过75%的索引碎片。

    进行碎片整理优化后,索引文件大小降低,碎片降低到零。
    begin 
    ctx_ddl.optimize_index(‘FT_IDCTEXT1′,’FULL’, parallel_degree =>’1′); 
    end;
     

    注意:当动活动的索引不同索引名称有可能不同,具体请参考WebCenter Content在线文档。

    当然,我们也可以设置数据库的调度程序作业来定时进行索引优化,打开SQL Developer,以SYS用户连接数据库,运行脚本以创建调度作业。

    WebCenter Content安装实施后,只有进行持续的优化才能保证以最佳的性能运行。上海同富能为您提供包括Weblogic\WebCenter Conter\WebCenter Portal的整体优化方案。
     

    Linux增加swap空间

    为了测试Oracle的虚拟化解决方案,随便装了一台新的Linux虚拟,安装时报swap空间不够,通过以下步骤增加swap空间:

    修改/etc/fstab文件,增加如下一行:

    /opt/swap              swap                    swap    defaults        0 0

    使系统重启后swap设置生效。

    Install JDeveloper 11g on Mac OS 10.7

    让W510折腾得每天老是肩膀疼,而且觉得总不能老是把Mac Air当成在StarBucks装13工具,总得把它用起来吧。周末开始在Mac上折腾开发环境,Eclipse解压后就能运行,但是装JDeveloper还是费点劲才弄好。。
    1. 首先确认JDK已正确安装,在终端窗口运行”java -version“,如果没有安装可按系统向导步骤进行安装;
    2.确认Java 1.6是默认的JDK,打开实用工具—>Java 偏好设置,Java SE 6 64位应该在第一位,如果否调整64位JDK至第一位。
    3.创建Symbol Link

    cd /SystemLibrary/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
    sudo mkdir jre
    cd jre
    sudo mkdir lib
    cd lib
    sudo ln -s ../../../Classes/classes.jar rt.jar

    3. 现在在终端窗口运行Java -version,提示信息类似如下:

    java version “1.6.0_31”
    Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3635)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_31-b01-415, mixed mode)

    4.到OTN网站http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html 下载JDeveloper 11g 11.1. 1.6.0的通用版本jdevstudio11116install.jar。

    5. 运行jdevstudio11116install.jar,安装程序正确找到本地JDK,下一步下一步即可完成安装。

     更详尽的信息可以在https://blogs.oracle.com/shay/entry/installing_jdeveloper_on_mac_os 找到, thanks Shay。

    Rollup WebCenter Site(Fatwire) to 7.6

    有个客户很羡慕传说中WebCenter Site的功能,准备在一项目在使用这产品。为了能评估工作量加上不被各色人等忽悠,只能自己装一次评估。在eDelivery上下载了安装程序,真坑爹,一点都不象以前O记的产品,居然安装说明的文档都没有。在Weblogic上安装,以手工部署的方式很顺利就完成了应用的安装,但在升级到7.6时就卡住了,测试时出现以下错误:

    HelloCS has failed.
    Ping DB has failed.
    DB Permissions has failed. 

    在服务器启动时报Caused By: java.lang.IllegalAccessError: tried to access field
    org.slf4j.impl.StaticLoggerBinder.SINGLETON from class

    org.slf4j.LoggerFactory

     的错。折腾了老半天,鬼就出在slf4j-api-1.5.8.jar和slf4j-jdk14-1.5.8.jar两个文件上,干掉后继续安装成功。

    两天的试用,觉得O记要完全实现Fatwire与Webcenter Content整合明显需要一段时间。拿这玩意来做外网应用的还是值得探讨的。

    比较赞同这篇文章上的话:http://shishank.info/pcm/wordpress/2011/11/10/oracle-web-centre-fatwire-is-it-an-old-generation-cms/
    Not so good

    • Some of the basic changes within the implementation requires quite a lot of work. A good example is vanity URLs. Most of the clients now a days have this basic requirement especially around blobs but there is none out of the box URL assembler available
    • Deployment is one of the most painful area. Even with CSDT, which is just the recent addition to product, there are many area’s which it lacks. The basic use cases are not covered by CSDT
    • With CS 761, there are headless installs which is welcome change through if you are upgrading to CS 761 from version below CS 75 there is no other way apart from GUI based installers
    • Product customisation is one of the pain area’s. There is no concept of extending the existing elements into your project elements and apply changes. Which means each time you run an upgrade, there is an activity to reapply all the changes again which makes upgrades sooo much error prone and time consuming
    • CS Engage, for providing personalised content, has never been an easy product to work with and get your head around it
    • There are number of modules on top of core content server but its been utilised scarcely across the globe and tough to find a single case study when in need
    • Rollbacks are still is old 90′s fashion way of taking file system and database dump and restoring them back. Cold dumps needs to be taken to get an exact snapshot of the system at that point in time
    • Lots of documentation is there but they cover basic information and for anything beyond basic changes require folow-up on yahoo groups or through support
    • Support centre has not been supportive. It sometimes feel, just to meet their SLA’s, there are responses which doesn’t even relate back to the actual query
    • etc. etc.

    64位OEL 6.1下UCM 11g OracleTextSearch的Text Conversion错误

    客户系统上线前,发现在生产环境的Oracle Enterprise Linux 6.1上的UCM 11gR5打开文件时,一直显示索引错误,信息“Text conversion of  the file …… failed. Content has been indexed with Info only. Resubmit should only be performed if the problem has been resolved.”如下图所示:

    打开indexer的trace,点击重新提交后,得到以下信息,初步判断是因为textexport找不到必要的库文件导致。

    >indexer/7 01.13 14:10:03.450   index update work InputFilePath is:   indexer/7  01.13 14:10:03.450   index update work OutputFilePath is: >indexer/7    01.13 14:10:03.450   index update work Sending document to conversion >(internal)/7  01.13 14:10:03.496  TextExport #7531#8FDB#7A0B ‘TextExport’ #610F#5916#4E2D#6B62#3002 intradoc.common.ServiceException: !csErrorReturnedByProcess,TextExport!$/u01/app/oracle/Middleware/Oracle_ECM1/ucm/idc/components/ContentAccess-linux/linux/lib/contentaccess/textexport: error while loading shared libraries: libz.  (internal)/7   01.13 14:10:03.496   TextExport         at intradoc.taskmanager.TaskLauncher.launchExe(TaskLauncher.java:381)  (internal)/7  01.13 14:10:03.496  TextExport         at intradoc.taskmanager.TaskMonitor$1.run(TaskMonitor.java:116)  (internal)/7  01.13 14:10:03.496   TextExport         at java.lang.Thread.run(Thread.java:662)

    没有仔细看trace信息内容,开始在网上和oracle support网站找text conversion相关的信息,相关的解决方案主要是确认textexport的执行权限或者是设置LD_LIBRARY_PATH和ContentAccessExtraLibDir(在intradoc.cfg文件)几种方式,但是试过这几种方式都不奏效,如此试了几次,也只好放弃。

    再一次回到正常分析的路子上来,从trace信息中可以看出是找到到共享库libz.,尝试在/usr/lib和/usr/lib64找libz.so,有64位的文件,但是没有32位的文件。难道象很多程序一样,UCM也是用32位的libz.so来执行text conversion的命令,google了一把,发现libz.so是zlib包里,用yum install zlib.i686实现相关包的安装,确认libz.so存在于相关的文件夹下,重新启动Content Server,再点击重新提交,问题解决。

    Repository Manager重新提交所有文档,再重建索引,完成已检入文件的全文索引支持。