2009年3月11日星期三

Oracle11g在RHEL 5.3上安装步骤

这个步骤基本上可以直接复制在命令行界面里直接执行的,除了某些步骤的路径需要自己确定。

#检查系统硬件是否符合要求
grep MemTotal /proc/meminfo #内存>1G
grep SwapTotal /proc/meminfo #交换分区>2G(有根据内存大小的建议值,但是至少都要大于2G才符合要求)
#df -k /dev/shm/
df -k /tmp #临时目录空间>400M

df -k #硬盘空间>5G
#cat /proc/version #获取操作系统的版本,官方只支持:Asianux 2.0/3.0 Oracle Enterprise Linux 4.0/5.0 Red Hat Enterprise Linux 4.0/5.0 SUSE Enterprise Linux 10.0

#uname -r #获取Linux内核版本号

#安装Oracle所需要的包(应该全了)

cd /media/RHEL_5.3_i386_DVD/Server/ #RHEL_5.3_i386_DVD,是RHEL5.3的光盘,依实际情况而定
rpm -Uvh kernel-headers-2.6.18-128.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm elfutils-libelf-devel-0.137-3.el5.i386.rpm glibc-devel-2.5-34.i386.rpm libaio-devel-0.3.106-3.2.i386.rpm glibc-headers-2.5-34.i386.rpm libgomp-4.3.2-7.el5.i386.rpm gcc-4* sysstat-7* compat-libstdc++-33* libstdc++-devel-4* unixODBC-2* unixODBC-devel-2*

#修改内核参数
echo '# Kernel paramaters required by Oracle 11gR1
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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'>>/etc/sysctl.conf

#使 /etc/sysctl.conf 更改立即生效
/sbin/sysctl -p

#编辑 /etc/security/limits.conf
echo '
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536'>>/etc/security/limits.conf

#编辑 /etc/pam.d/login
echo '
session required /lib/security/pam_limits.so
session required pam_limits.so'>>/etc/pam.d/login

#编辑 /etc/profile
echo '
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi'>>/etc/profile

#创建软件安装用户、支持组,给新用户oracle设置密码
groupadd oinstall
groupadd dba
groupadd oper
useradd oracle
usermod -g oinstall -G dba,oper,oracle oracle
passwd oracle


#编辑/home/oracle/.bash_profile
#这里的ORACLE_BASE ORACLE_HOME根据具体情况来设定
echo '
umask 022
ORACLE_BASE=/home/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
export PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID'>>/home/oracle/.bash_profile
#创建安装目录并修改用户权限等
mkdir -p /home/u01/app
chown oracle:oinstall /home/u01/app
chmod -R 775 /home/u01
#运行安装脚本runInstaller
/mount_point/db/runInstaller


这个步骤是参考:Oracle 安装包里面文档目录里面的b32280:Database Quick Installation Guide这份文档。

2009年3月10日星期二

看到一篇很...的关于《阿甘正传》的影评

这是我最喜欢的影片了,今天偶然看到这么一篇影评,不敢专美,分享之。

《阿甘正传》:深刻控诉资本主义


《阿甘正传》到底是部什么电影?

  有人看到第十三遍,说这是部爱情电影。

  我看第一遍的时候,就非常清楚:这是一部深刻控诉资本主义社会的电影。

  羽毛飞啊飞,电影开始了。憨厚的阿甘坐在长椅上等九路公交车。对着身边来来去去的人,他讲述他的故事:

  幼小的阿甘,戴上背撑,两脚有那些金属支架,他无法走路。如果在我们社会主义社会,会有同学背着他上学,风雨无阻,团结友爱。阿甘的同学们干了什么呢?他们不给他让座,拣石头扔他,他夺路狂奔。

  对,那个校长,居然因为阿甘智商75,想不让他上学。在我们社会主义社会,我们有九年义务教育,绝不允许、也不会发生这样的事!

  有一个小姑娘,珍尼,她是资本主义社会贫农出身,有着善良的天性,她给阿甘让了个座位,不在意他是出租房屋食利阶层的孩子。万恶的警察,资本家的走狗们干了些什么?他们拆散这个贫农家庭,不许父亲和孩子住在一起。

  阿甘和珍尼在大树上培养着他们深厚的友谊,如果在我们社会主义社会,一定会是他们俩一起做功课,互学互帮,先进带后进,先后带上红领巾、入团、成为积极分子!

  是的,多么遗憾呀,在他们年少的美好时光,他们没有好好学习,甚至阿甘进了大学,也是天天不务正业,抱着个球猛跑,跑上四年就毕业了,带上学士帽。我们的大学生,一定要过英语四级、所有学科都及格才能毕业进入社会,成为栋梁之材。

  这样的大学毕业生,只能去当兵。在资本主义国家,当兵就是当炮灰,阿甘所在的纵队在英勇的北越社会主义军队AK47的猛烈打击下,溃不成军,纵队的头儿中尉,也丢下双腿。阿甘的屁股上也挨了一枪。他冒着炮火,只为抢救回那个黑人奴隶的后代,他的心,和劳动人民站在一起。

  如果是人民军队士兵,受这点轻伤,肯定是要从医院跑掉,跑回前线。阿甘并没有继续为资本家卖命,他在医院里打兵乓球,消极抵抗越战。

  恶毒的是,美国居然派一个智商75的人和我们打兵乓球,这不是愚弄我们吗?大家都知道,我们的运动员战胜了阿甘,狠狠地打击了美国嚣张的气焰。阿甘只输过一次,唯一的一次,就是这一次。

  尼克松接见了他,但阿甘的信念坚定,没有因此而投入资本家阵营,他勇敢机智地揭露了水门事件,把资本主义所谓民主政治暴露在天下人面前,暴露它的丑恶面目。

  丢了双腿的头儿,象个流浪汉,酗酒,他为什么没有到全国各地,给政府公务员、给学生、给人民做英雄事迹报告呢?因为那是万恶的资本主义社会。

  阿甘也退伍了。他们没有给他安排工作,在我们这里,他可以当法官、公务员、银行保卫、老师,总之会有一个很好的工作,而他没有,什么都没有,被抛弃了,在用过他之后冷酷地抛弃他……对不起,我忘了,阿甘是农村兵,他不享受这些政策。

  好,说说他被欺骗的事。他拿了二万多美圆去买捕虾船,那个老头,明知道那船不值那么多钱,海里也没什么虾,却还是把船卖给他。这是欺诈性交易,在我们诚信的社会主义社会,绝不会发生这样的事,我们甚至不会给他机会被骗——街道办事处会给他安排一个工作,还有许多残疾人小厂,都可以接收他。制度的不同,导致命运的不同。

  阿甘和没了双腿的中尉,悲惨地遭遇风暴,台风来了,却没有人通知他们。是那个地方的人排外,是那个地方的政府失职,但是,你能要求资本家的政府做些什么呢?他们可不是人民的公仆。

  很难相信,阿甘发财了,他有了十几条船和公司。但,他不愿意做资本家,他离开了公司,给教堂、医院、学校捐了许多钱,遗憾的是,他没有把钱捐给青基会这样的组织,离开了组织,资金运用效果差很多啊。但没办法,谁让他在资本主义社会呢?命运。

  说说珍尼。她被资产阶级腐朽堕落的社会吞噬,被大学开除、上花花公子杂志、跳脱衣舞、吸毒……顺便说一下,在我们社会主义社会,我们根本不会让她有拍裸照的机会,我们没有那样的色情杂志,绝不允许,所以,要是在我们这,她堕落的第一步就不会迈出。就算迈出那一步,也多的是劳教所、戒毒所等着帮助迷途的小羊羔。

  阿甘的妈妈死了,癌症。因为她没有医疗保障,没有高超技术的医生给她做手术,没有白衣天使照顾她,她靠出租小房子为生,她也没什么钱,看不起病。我们,我们为了六十一个兄弟干了些什么,谁能忘记?制度不同,命运不同,影片在细节处也在阐述这个道理。

  阿甘在路上跑了三年多。他为什么跑?是追寻理想?追寻一个乌托邦社会?逃避那个让人窒息的社会制度?但是,他最后无奈地停下,因为追随他的人太少。悲哀,二亿多人,只有那么几十个清醒者。

  看看他们的媒体那时候都在干些什么?发生了那么多大事,领导开了那么多会,做了那么多重要讲话,他们不报道,他们追着一个邋遢的长跑者采访个不停。在那种社会制度下,人民被引向低级趣味,这就是没有人引导和把握方向的必然结果。

  写到这里,很悲伤,悲伤得写不下去,还是收尾吧。阿甘在椅子上坐了那么久,才有一个人告诉他可以不用坐车,直接走过去就到珍尼的家。人情冷漠的社会……

  珍尼死了,死于爱滋病。小福利没有了妈妈,资本主义社会又制造了一个单亲家庭。

  羽毛飘啊飘,在那个社会,每个人都如一根飘在空中的羽毛,随时会改变方向和命运。幸运的是,我们不会轻如羽毛飘在天空,我们都是社会主义的螺丝钉。

2009年3月5日星期四

转旧文章记录

忙了大半天,终于将原来比较重要的文章转过来了

Mysql 备份解决方案的10点注意事项

Are you using someone else’s backup solution for your MySQL data? Do you care a lot about your data? Are you sure you’re getting a reliable, recoverable backup that’ll work for your business and your application, and won’t impact your critical processes while it runs? Here are ten questions you need to be able to answer:


1.是否是热备份?是的话,备份时服务器运行状态阻塞、I/O、缓存等对备份有什么影响?(Does the backup require shutting down MySQL? If not, what is the impact on the running server? Blocking, I/O load, cache pollution, etc? )
2.使用什么技术来备份,是mysqldump或者类似的方法,还是直接备份数据文件的方法?(What technique is used for the backup? Is it mysqldump or a custom product that does something similar? Is it a filesystem copy? )
3.InnoDB 引擎的数据库是不可以通过直接备份数据文件的方式来备份的(Does the backup system understand that you cannot back up InnoDB by simply copying its files? )
4.FLUSH TABLES, LOCK TABLES, or FLUSH TABLES WITH READ LOCK等操作都需要中断数据库的正常进程(Does the backup use FLUSH TABLES, LOCK TABLES, or FLUSH TABLES WITH READ LOCK? These all interrupt processing. )
5.对数据库还有其他的影响吗?(What other effects are there on MySQL? I’ve seen systems that do a RESET MASTER, which immediately breaks replication. Are there any FLUSH commands at all, like FLUSH LOGS? )
6.恢复备份的可靠性怎么样?(How does the system guarantee that you can perform point-in-time recovery? )
7.怎么样保证恢复后在二进制日志、InnoDB日志和主从复制之间数据的一致性?(How does the system guarantee consistency with the binary log, InnoDB logs, andreplication? )
8.可以使用这个系统来建立一个主从复制的从服务器吗?(Can you use the system to set up new MySQL replication slaves? How? )
9.此系统可验证备份是可恢复的吗?如:InnoDB 的恢复(Does the system verify that the backup is restorable, e.g. does it run InnoDB recovery before declaring success? )
10.对这个备份有系统的标准、保险和可恢复执行什么样的要求?它的强壮性如何?它的可靠性如何?(Does anyone stand behind it with support, and guarantee working, recoverable backups? How strong is the legal guarantee of this and how much insurance do they have? )


There are a lot of other things a backup solution needs to provide, but these are some of the things I’d require specifically for MySQL, or more so for MySQL than for other types of backups.

Where is this post coming from? Well, I’ve had a couple of frustrating encounters with vendors who sell backup products with some kind of agent for MySQL backup. I am almost never able to get any significant technical detail on how their backups are implemented, and often I can’t even get the most basic information such as “dump or file copy.” Sometimes they tell me to register and download a whitepaper that just has a bullet point “Support for MySQL Databases”. Or “I have to transfer you to the salesperson who covers your region” and I never get to talk to anyone.

Some of them even use the word “proprietary” as if it’s a good thing. In reality, a proprietary, secret backup black-box is unacceptable. MySQL backups are complex and difficult to get right. It is very application-dependent and technology-dependent. Unless I know exactly how it works, I cannot tell the client whether it’ll work for them at all.

So I offer the above list as a way to evaluate your backup provider’s suitability for enterprise-ready backup uses. If you can’t answer these questions, it’s a system that you can’t evaluate seriously, in my opinion.

翻译的不准确请大家谅解。
原文地址:http://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/

Mysql 5.1.32发布

更新日志:http://dev.mysql.com/doc/refman/5.1/en/news-5-1-32.html

服务器及数据库网址集合


MySQL相关网站



 


mysql-master-master - Google Code
MySQL AB -- MaxDB?
MySQL Backup: Zmanda Recovery Manager for MySQL
Hack MySQL :: Scripts and documents for hacking MySQL
ndbinstaller (install MySQL Cluster) – Trac
MySQL Performance Blog
MySQL Sandbox in Launchpad
Maatkit: a toolkit of utilities and tools for MySQL
Xaprb
High Performance MySQL ? Home
google-mysql-tools - Google Code
The Data Charmer
Scalable BLOB Streaming Infrastructure for MySQL

SQL相关网站



 


Apache Derby
EnterpriseDB - Postgres Plus
Firebird - Relational Database for the New Millenium
Firebird中文社区
flamerobin.org
HG SQL
HSQLDB
Hypertable- An Open Source, High Performance, Scalable Database
IBM Software - Cloudscape - Product Overview
Oracle 公司
PostgreSQL The world's most advanced open source database
PostgreSQL 中文网 - PgSQL - PostgreSQL 中文网 中国
Sleepycat Software- Berkeley DB Database, XML Database, Native Java Database
Taffy DB : A JavaScript database for your browser
db4o -- Native Java & .NET Object Database -- Open Source
BNF Grammars for SQL-92, SQL-99 and SQL-2003
SQLite home page
Hypertable: An Open Source, High Performance, Scalable Database
protobuf - Google Code
Tokyo Cabinet: a modern implementation of DBM
FREE Databases from Database Answers.org
ConnectionStrings.com - Forgot that connection string? You will find it right here!

 



WEB Server相关网站:


:: bind ::
Apache 2 on Windows - W32 binaries download
dolphin - lightweight, high performance, HTTP proxy
HAProxy - The Reliable, High Performance TCP/HTTP Load Balancer
http://www.caucho.com/download/
http://www.pyxer.net/
IIPImage :: IIPImage
memcached: a distributed memory object caching system
memcached for Win32
Mod_python - Apache-Python Integration
SmartFoxServer- Socket server for Flash multiplayer games and applications
Varnish - Trac
web2py Enterprise Web Framework
AppWeb Embedded Web Server Software and Solutions
squid : Optimising Web Delivery
Kevin Worthington
lighttpd fly light
nginx
NginxChs - Nginx Wiki
Ziproxy homepage
WWWOFFLE Homepage
WikiStart.zh - XCache - Boost PHP Performance - Trac
Main Page - Fail2ban
Inlab Software GmbH - Balance
Home - Continuent


一些中文博客:


Taobao DBA Team
架构研究室
DBA notes - Web 2.0 网站架构、优化 数据库架构
Alibaba DBA Team
我的文章 - 月亮他哥

还是使用现成的空间吧

上一个合租的空间被取消了,丢失数据若干,唉!
最近还准备再买个合租的空间呢,但是这个竟然还没有被和调,很不错。
所以决定以后还是在这个空间吧。