执着

这是一个真实的故事,它发生在我曾经的高中校园里,一直到今天,它仍涤荡州我的心灵。 一个很天真、又很爱幻想的男孩迷迷糊糊进了高中,他很希望自己心中能有一份真爱,很美的那种爱,不需要让别人知晓。后来男孩找到了——他喜欢上了同班的一个女孩。此后,每当看到哪个女孩,男孩就会非常高兴,尤其是看到女孩的微笑。为了引起女孩的注意,男孩总找机会出风头,尽管收获的仅是失落。 爱会随着时间加深的,男孩感到很孤独,可男孩一直认为情到深处,爱不孤独,他宁愿让自己痛苦,也不愿让自己对爱感到麻木。 有一天男孩看到女孩写的一篇文章——〈〈爱,就是走在左边〉〉,不知是为什吗?他认为文章里所写的那个男孩就是自己,为此,男孩乐了好长一阵子。 每天晚自习课间,女孩都会到操场上散步,男孩也常去,但他总不敢停下来和女孩打声招呼,他只是远远的看着女孩,他有点自卑,他的学习和家庭都不如女孩。 男孩打算把这份爱当作一个秘密藏在心里,可是这样做,那这份爱还有存在的意义吗?于是男孩决定向女孩表白,他选的是学期末的最后一天,为的是不影响女孩学习。后来,到了二年级,男孩不能常常看到女孩了,可男孩还是不知疲倦的在人群中搜索,似在漆黑的夜空中寻找一颗星星,日复一日,直到树叶落尽的那一天男孩才发现,女孩转学了,男孩的眼泪打湿了落叶,他体会到了真正的痛苦。可男孩仍然觉得能爱上女孩,是他做过得最好的事。 男孩很想得到女孩的消息,可总是找不到女孩的地址。于是,他不停的寻找,后来男孩找到了,那时,他立即给女孩写了一封信,满怀希望的投进了邮箱。 他希望女孩能给他回些话,不管是什么,他都乐意接受。 可是,总不见回信,于是男孩费劲周折的拿到了班级信箱的钥匙,他想这样便和女孩靠近一些。 从此,男孩每天下午奔跑于教师与信箱之间,可那个信箱似乎装不下他的信,男孩的心总是随着信箱的那门在希望与失望之间荡来荡去。就这样他奔跑着,也许,他会永远这样奔跑下去,也许。。。 。。。 爱,其实就是执著!

2010-01-19 · 1 min · 12 words · admin

wordpress迁移备注

一,修改自动保存 已经发布的WordPress 2.6版有一个很讨厌的功能,就是Post Revisions(文章的版本控制),在默认的情况下,日志的ID将不再连续,使用ID做为Permalink结构的用户将会看到一个地址越来越混乱的WordPress,现在我给一个解决WordPress的ID不连续的方法。 按照此文的方法,在wp-config.php文件中增加一行define(‘WP_POST_REVISIONS’, false),同时安装“禁用WordPress自动保存的插件”,在WordPress后台启用此插件。 请注意这两个操作缺一不可,如果不启用“禁用WordPress自动保存的插件”,那么每篇文章都会出现一个自动保存的记录。 另外,对于数据库有“洁癖”的WordPress用户来说,可能想要删除由于Post Revisions导致的表内的垃圾信息,同时将ID设置为连续,下面是我写的一段SQL脚本,请在phpmyadmin中使用。 删除是Post Revisions垃圾信息,请执行: delete from wp_posts where post_type = ‘revision’; 将ID重新设置为连续,这个比较麻烦,设置一个ID就要4条SQL语句,我仅仅举一个例子,将ID为59的文章修改为ID为58,需要执行以下语句。 update wp_posts set id = 58 where id = 59; update wp_term_relationships set object_id = 58 where object_id = 59; update wp_postmeta set post_id = 58 where post_id = 59; update wp_comments set comment_post_ID = 58 where comment_post_ID = 59; 如果用户需要修改的文章较多,需要批量复制、修改和执行上面四行。

2010-01-19 · 1 min · 60 words · admin

linux下的无盘工作站配置(centos)

 需求:需要多个系统同运行同样的服务,如j2ee模块、memcached等,这些服务不与硬盘相关,只运行在内存中,并且多个系统同时运行,为了规避单点故障以及实现高效。 下面步骤是centos5.4系统的无盘服务端配置步骤,客户端只要选择从网络启动,即可在无干预情况下启动系统。 一,新建主要目录 mkdir -p /diskless/x86_64/centos5.4/root mkdir /diskless/x86_64/centos5.4/snapshot 二,拷贝预置模板到/diskless/x86_64/centos5.4/root目录 rsync -auv -e ssh --delete --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*'--exclude='/var/log/*' root@10.0.70.72:/ /diskless/x86_64/centos5.4/root/ 三,配置所需tftp服务 yum -y install tftp tftp-server yum -y install busybox vi /etc/xinetd/tftp diskable=no chkconfig --level 345 xinetd on chkconfig --level 345 tftp on service xinetd start 四,配置dhcp服务 yum -y install dhcp-server chkconfig --level 345 dhcpd on vi /etc/dhcpd.conf allow booting; allow bootp; class “pxeclients” { match if substring(option vendor-class-identifier, 0, 9) = “PXEClient”; next-server <server-ip>; filename “linux-install/pxelinux.0”; } service dhcpd start ...

2009-12-29 · 2 min · 328 words · kevin

Ubuntu amd64 下安装 QQ for Linux

从http://im.qq.com/qq/linux/下载 QQ for Linux deb 安装包: linuxqq_v1.0.2-beta1_i386.deb 获取32位支持 sudo apt-get install ia32-libs* 安装 sudo dpkg -i –force-all linuxqq_v1.0.2-beta1_i386.deb

2009-12-14 · 1 min · 18 words · kevin

Oracle 11g Software Installation on Linux—CentOS-5

Introduction This paper takes a look at installing oracle 11g (11.1) on Linux (CentOS-5).You can read about CentOS at www.centos.org and be assured of its’ Enterprise-class quality. This paper will use oracle’s Quick Installation Guide for Linux x86 as its’ guide—noting where additional information may be obtained but getting oracle installed on Linux as fast as possible. We at thecheapdba.com have years of experience installing oracle—starting back with oracle 7. We will point out best practices so that you end up with a reliable database that provides exceptional performance. We will occasionally re-visit, edit, and post additions to this paper as we find further configuration best practices. This paper will not cover the installation of CentOS-5 as that can be acquired through the CentOS website and additional Linux guides. We will however point out those alterations to the Linux environment that pertains to getting oracle installed. Our goal is to provide you with the steps to properly install the oracle 11g software without having to read oracle’s installation guide from front to back cover. We will provide you the commands to execute (just cut-n-paste) and the desired outcome of those commands. If you get something other than what is expected it would be time for you to re-visit earlier steps in this process. So hold on, here we go. It is assumed that the installer of oracle software has access and is running on an X Window System workstation. Please consult X Server documentation if you need help. We at thecheapdba.com typically will use cygwin ( www.cygwin.com ) for all interfacing with our Linux distribution. It has an X Window System that works quite well—and as we always like is free. Checking Hardware Requirements Log into the CentOS-5 system as the root user. For setting up the system to be used by oracle there are a few prerequisites that must be checked and possibly changed by the root user. Log in as the root user and this document will tell you when it is time to switch from the root user to someone else. How much memory command: grep -i memtotal /proc/meminfo results: should be at least 1GB How much swap command: grep -i swaptotal /proc/meminfo results: should be 1.5 the size of memtotal if memtotal < 2GB should be equal to memtotal if memtotal is between 2GB and 8GB should be .75 the size of memtotal if memtotal > 8GB What processor type command: grep “model name” /proc/cpuinfo results: informational How much available RAM and swap command: free results: informational How much shared memory available command: df -k /dev/shm results: informational purpose: The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each oracle instance on the computer. How much disk space in /tmp command: df -k /tmp results: should have at least 400MB available How much disk space for oracle binaries command: df -k results: Depending on installation type you should have between 1.5GB and 3.5GB Checking Software Requirements What distribution and version of Linux is installed command: cat /proc/version results: Linux version 2.6.18-8.1.15.el5 (mockbuild@builder6.centos.org) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Mon Oct 22 08:32:04 EDT 2007 What version of the kernel is installed command: uname -r results: 2.6.18-8.1.15.el5 Are the following packages installed (assumes CentOS-5 and above distribution) command:rpm -q binutils \ compat-libstdc++ \ elfutils-libelf \ elfutils-libelf-devel \ glibc \ glibc-common \ glibc-devel \ glibc-headers \ gcc \ gcc-c++ \ libaio-devel \ libaio \ libgcc \ libstdc++ \ libstdc++ \ make \ sysstat \ unixODBC \ unixODBC-devel results: you will probably get quite a few packages that are not installed with a typical installation. You can investigate missing packages with the following command making sure you add/subtract from this list if necessary. yum list available “compat*” \ “elfutils*” \ “glibc*” \ “gcc*” \ “libaio*” \ “sysstat*” \ “unixODBC*” action : Our base installation left us needing to issue the following command to install missing packages. yum -y install compat-libstdc++-296.i386 \ compat-libstdc++-33.i386 \ elfutils-libelf-devel.i386 \ glibc-devel.i386 \ glibc-headers.i386 \ gcc.i386 \ gcc-c++.i386 \ libaio-devel.i386 \ sysstat.i386 \ unixODBC.i386 \ unixODBC-devel.i386 Create oracle user and group Create groups oinstall & dba command: /usr/sbin/groupadd oinstall /usr/sbin/groupadd dba Create the oracle and change password command: /usr/sbin/useradd -g oinstall -G dba -s /bin/bash oracle /usr/bin/passwd oracle Validate the nobody user exists command: /usr/bin/id nobody results: this user is almost always created on a base CentOS installation action : if this user is not created use the following command to create /usr/sbin/useradd nobody Configuring kernel parameters The following kernel parameters must be validated and possibly changed. Use the commands given below to view a particular kernel setting and then change if the setting is lower than the recommendation given in the following table. You can make the changes by editing the /etc/sysctl.conf file and then rebooting the server. The following results are what we observed on our server and should not be expected on yours. shmmni 4096 shmall 2097152 shmmax 2147483648 semmsl 250 semmns 32000 semopm 100 semmni 128 file-max 65536 ip_local_port_range 1024 - 65000 rmem_default 1048576 rmem_max 1048576 wmem_default 262144 wmem_max 262144 command: /sbin/sysctl -a | grep kernel.sem results: kernel.sem = 250 32000 100 128 command: /sbin/sysctl -a | grep kernel.shm results: kernel.shmmni = 4096 kernel.shmall = 268435456 kernel.shmmax = 4294967295 command: /sbin/sysctl -a | grep file-max results: fs.file-max = 102440 command: /sbin/sysctl -a | grep ip_local_port_range results: net.ipv4.ip_local_port_range = 32768 61000 command: /sbin/sysctl -a | grep rmem_default results: net.core.rmem_default = 109568 command: /sbin/sysctl -a | grep rmem_max results: net.core.rmem_max = 131071 command: /sbin/sysctl -a | grep wmem_default results: net.core.wmem_default = 109568 command: /sbin/sysctl -a | grep wmem_max results: net.core.wmem_max = 131071 sample /etc/sysctl.conf file. This is given as an example only and does not reflect the results obtained above by the /sbin/sysctl commands. Only add lines that are needed and do not change any values to be lower than the base installation might have assigned. 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 = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144 Setting shell limits for the oracle user Add the following lines to /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 Add the following lines to /etc/pam.d/login session required /lib/security/pam_limits.so session required pam_limits.so Add the following lines to /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 Creating Directories to Install the oracle Software Validate you have enough space on disk and choose a directory to install command: df -k results: pick a mount point that has enough space—we have chosen /opt for the our. Create subdirectories and give permissions to the oracle user The following directory used is common for oracle installations. Note that we are creating all directories under /opt and that there are no other applications using /opt/app and below. This is very important as we are changing permissions with the following commands. command: mkdir -p /opt/app/oracle/product/11.1.0 chown -R oracle:oinstall /opt/app chmod -R 775 /opt/app Switch to the oracle user Up to know we have been doing everything as the root user. It is now time to switch to the oracle user to actually install the oracle software. command: su – oracle Add the following line to $HOME/.bash_profile umask 022 Execute oracle’s bash_profile to use new setting command: . ./.bash_profile Make sure the oracle user is using an X Windows System It is assumed you know how to set up an X Windows System as stated earlier in the document. Please verify it is working by issuing the xterm command and validating an X Terminal comes up. You may close the X Terminal if you wish. Set oracle environment for the installation Issue the following commands to set/unset particular oracle environments in preparation for the installation. command: export orACLE_BASE=/opt/app/oracle export orACLE_SID=orcl unset orACLE_HOME unset TNS_ADMIN Start oracle Installer This paper assumes you have downloaded the oracle software from the net and have unzipped the files. We have unzipped our software into /opt and the following commands will take you through starting the oracle installer form that mount point. command: cd /opt/database ./runInstaller From this point, oracle will do a few minor checks on the operating system and then put up the oracle Installation screen. Our particular configuration did not throw any errors at this point but it should be noted, as it can be helpful, that sometimes the oracle installer will complain at this very early stage about various Linux system configurations. If this is the case you might be able to bypass them by adding an additional argument to the runInstaller command. Please only use this as a last resort to the normal installation path. command: ./runInstaller -ignoreSysPrereqs From this point on we will walk through each of the prompts one at a time to give you a simple feel for a full installation of the oracle software. Select installation method This screen is very busy to say the least. We are not going to create any databases at this point as it is not required nor is it suggested to do at this point. We like to create databases separately through the Database Creation Assistant (DBCA) and not confuse the software installation process. 1. Choose basic installation 1. verify oracle Base of ‘/opt/app/oracle’ 2. verify oracle Home of ‘/opt/app/oracle/product/11.1.0/db_1’ 3. verify installation type of ‘Enterprise Edition’ 4. verify dba group of ‘dba’ 2. Un-check “Create Starter Database” 3. Un-check “Advanced Installation” 4. Click Specify Inventory directory and credentials 1. verify path of inventory directory of ‘/opt/app/oraInventory’ 2. verify group name for install of ‘oinstall’ 3. Click Product-Specific Prerequisite Checks This screen, the installer will verify the system environment and report on any issues it may find. If all goes well you will get the status of ‘Succeeded’ for every check. Scroll through and make sure nothing has failed or look at the status box at the bottom of the screen and verify you get the following: ‘Check complete. The overall result of this check is: Passed’ 1. verify all statuses 2. Click Summary This screen give a summary of the installation you are about to perform. It can be interesting to click and expand the products being installed to give you an idea of the what product and version is going to be installed. 1. validate ‘Global Settings’ for directories 2. validate ‘Space Requirements’ 3. Click Install This screen gives a status of what is being installed. If all system settings have been properly set and all packages been installed properly then this should proceed without error. The status bar gives some indication of what is being installed at a particular point and the amount of work to be performed. But as all status bars you never really know how long in the process it is. 1. Note the time it takes for specific products. If you notice one hanging or taking a long amount of time (greater than 10 minutes) you could have a condition that requires a pre-installation patch. Don’t stop the installer yet but instead start looking for a bug / patch for the oracle 11g installation process and the actual product being installed. 2. Execute Configuration scripts 1. open up a different terminal window 2. login as the root user 3. run /opt/app/oraInventory/orainstRoot.sh 4. run /opt/app/oracle/product/11.1.0/db_1/root.sh 1. accept default of /usr/local/bin 5. Click 3. Click 4. Click Cleanup 1. If you downloaded the software from the net you can now remove .zip file and the complete directory structure you unzipped it to. That particular command is not given here as it can be quite disastrous if executed from the wrong directory. 2. Add the following lines to oracle’s $HOME/.bash_profile file. This will allow you to execute various oracle binaries to create databases, configure network settings, and generally manage the oracle database environment. export orACLE_HOME=/opt/app/oracle/product/11.1.0/db_1 export PATH=$ORACLE_HOME/bin:$PATH Installation is complete Congratulations on a successful installation of the oracle software. This paper hopefully was also successful in its attempt to guide you down a more simplistic path—giving you the commands to execute and working past the minor hurdles encountered during installation. Obviously this paper can not predict all the issues that you may encounter but if you have a relatively current system with ample memory and disk space there is no reason not to believe your installation wouldn’t run smoothly.

2009-12-07 · 10 min · 2083 words · kevin

ubuntu 9.10 安装ibus

首先清理所有scim相关包和安装中文字体: sudo aptitude purge ~nscim sudo aptitude install language-support-fonts-zh 然后检查源的配置: sudo gedit /etc/apt/sources.list 检查一下有没有这行: deb http://archive.ubuntu.com.cn/ubuntu-cn/ intrepid main restricted universe multiverse 如果没有就添加进去,然后保存退出。并更新软件源列表[sudo aptitude update] 安装ibus拼音输入法: sudo aptitude install ibus ibus-pinyin 编辑配置文件: gedit ~/.profile 在文件末尾添加: # Start Input Bus export XMODIFIERS="@im=ibus" export GTK_IM_MODULE=“ibus” export QT_IM_MODULE=“ibus” # qt3 is not supported currently ibus & 保存退出后,重新启动或者退出重新登录一下

2009-12-05 · 1 min · 53 words · kevin

ORA-27101 Shared memory realm does not exist 之解決

在试图登录pl/sql时,输入用户名(system/pwd)后,Oracle报告下列错误: ERROR: orA-27101 Shared memory realm does not exist orA-01034 orACLE not available 或者在em登录的时候报告下列错误: 错误: NMO 未 setuid-root (只适用于 Unix) 查阅了相关 orA-27101 Shared memory realm does not exist orA-01034 orACLE not available 的说明,解释为ORACLE_HOME或者ORACLE_SID设置不正确。 但检查bash_profile以后没有发现错误; 錯誤點,沒有開啟oracle服務; 解決辦法,直接開啟oracle相關數據庫的服務; 或按照下面的步驟操作: lsnrctl start sqlplus ‘/as sysdba’ sql> startup emctl start dbconsole isqlplusctl start

2009-12-04 · 1 min · 49 words · kevin

vnc安装oracle 11g报错

[oracle@test database]$ ./runInstaller 正在启动 oracle Universal Installer… 检查临时空间: 必须大于 120 MB。 实际为 117329 MB 通过 检查交换空间: 必须大于 150 MB。 实际为 1983 MB 通过 检查监视器: 监视器配置至少必须显示 256 种颜色 »> 无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了 DISPLAY 变量。 未通过 «« 未通过某些要求检查。必须先满足这些要求, 然后才能继续安装,那时将重新检查这些要求。 是否继续? (y/n) [n] y 原因: 当时是通过vnc登录的root,然后通过root切换到oracle用户的,注销通过oracle登录就可以!

2009-12-03 · 1 min · 43 words · kevin

Xlib: connection to “:0.0” refused by server的解决方法

Xlib: connection to “:0.0” refused by server的解决方法 在我的linux下安装的Oracle,我用平常用的账户登录系统后,再su oracle切换到oracle账户。 运行很多X程序都提示Xlib: connection to “:0.0” refused by server。 解决办法: 用平时用的账户登录,然后在终端输入以下命令,就可以搞定了! xhost local:oracle non-network local connections being added to access control list 再试试su oracle 进去后随便运行个X程序,比如:nautilus

2009-12-02 · 1 min · 32 words · kevin

oracle 10g 乱码解决

操作系统:Red Hat Enterprise Linux AS release 4 语言安装的为英文,安装完数据库后,通过企业管理器登陆,点击的按钮显示乱码。 1,重新安装中文支持 [root@tonykorn97 ~]# rpm -ivh ttfonts-zh_CN-2.14-6.noarch.rpm warning: ttfonts-zh_CN-2.14-6.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing… ########################################### [100%] 1:ttfonts-zh_CN ########################################### [100%] [root@tonykorn97 ~]# 2,安装如下步骤操作: 企业管理器已经关闭了 [root@tonykorn97 ~]# su - oracle [oracle@tonykorn97 ~]$ cd $ORACLE_HOME/jdk/jre/lib [oracle@tonykorn97 lib]$ ls -al font*zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 20 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 20 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 20 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 20 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/ [oracle@tonykorn97 lib]$ ls -al font*.zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 6 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 6 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 6 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 6 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs [oracle@tonykorn97 zhs]$ rm -rf *.gif [oracle@tonykorn97 zhs]$ emctl start dbconsole TZ set to PRC oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 oracle Corporation. All rights reserved. http://tonykorn97:1158/em/console/aboutApplication Starting oracle Enterprise Manager 10g Database Control …….. started. —————————————————————— Logs are generated in directory /oracle/app/oracle/product/10.2.0/Database/tonykorn97_szrrlcw/sysman/log [oracle@tonykorn97 zhs]$ 参考: http://www.eygle.com/archives/2006/03/oracle10g_em_font_change.html 我当时操作的时候如果是先覆盖font.properties文件,然后关闭em,再启动em。好像不行。不知道是不是当时操作的问题。 当时先安装了中文字体,然后发现了eygle的文章,最后发现应该是不需要安装中文字体的。 后来发现如果不安装中文字体的时候,显示还是不正常,重新安装中文字体后重新操作正常。应该是需要安装中文字体的。

2009-12-01 · 1 min · 197 words · kevin