转:http://www.uplook.cn/kbase-Index-show-view10393.html

#!/bin/bash
# BY kerryhu
# MAIL:king_819@163.com
# BLOG:http://kerry.blog.51cto.com
# Please manual operation yum of before Operation.....
#============================ 更新系统时间 ============================
yum install -y ntp
ntpdate time.nist.gov
echo "00 01 * * * ntpdate time.nist.gov" >> /etc/crontab

#============================ Varnish安装 =============================

如果是RedHat/CentOS系统,在安装varnish的时候首先要安装以下软件包
automake
autoconf
libtool
ncurses-devel
libxslt
groff
pcre-devel
pkgconfig

groupadd www
useradd www -g www -s /sbin/nologin
mkdir -p /data/varnish/{cache,logs}
chmod +w /data/varnish/{cache,logs}
chown -R www:www /data/varnish/{cache,logs}
cd /opt
yum install -y automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig
wget http://sourceforge.net/projects/varnish/files/varnish/2.1.3/varnish-2.1.3.tar.gz/download
tar -zxvf varnish-2.1.3.tar.gz
cd varnish-2.1.3
./configure --prefix=/usr/local/varnish
make;make install

yum -y install wget --noplugins
wget freevps.us/downloads/nginx-centos-6.sh -O - | bash

注意安装完成后 php-fpm 默认跑在 apache 用户上。

安装完成后,如果你需要的 PHP 扩展未安装,可输入如下命令查询:

yum list | grep ^php*

找到了扩展的名字,就可以直接安装了:

# 以 php memcache 扩展为例
yum install -y php-pecl-memcached

此外还遇到的问题是 DOMDocument 找不到,直接 yum 安装 php-xml:

yum install -y php-xml

所有扩展 yum 安装完成后都需要重新启动 / 载入 php-fpm。
贴下内容来看看(非最新版本,请直接下载 .sh 文件):

#!/bin/bash

##################
# disable apache #
##################
service httpd stop 
chkconfig httpd off
service xinetd stop
chkconfig xinetd off
service saslauthd stop
chkconfig saslauthd off
service sendmail stop
chkconfig sendmail off
service postfix stop
chkconfig postfix off

#Optimize yum on OpenVZ
if [ -e "/proc/user_beancounters" ]
then
  sed -i 's/plugins=1/plugins=0/' /etc/yum.conf
fi

#remove all current PHP and MySQL, will reinstall later. Also, remove apache 
yum -y remove httpd php mysql rsyslog sendmail postfix

###################
# Add a few repos #
###################
# install the Atomic repo for php and nginx (may use epel for nginx depending on version)
wget -q -O - http://www.atomicorp.com/installers/atomic | sh

# RPMForge for nginx dependencies
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

#EPEL for syslog-ng and nginx (may use atomic for nginx depending on version)
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

################################
# Install PHP, NGINX and MySQL #
################################
#yum install GeoIP libGeoIP.so.1 --enablerepo=repoforge
yum -y install mysql-server php-fpm php-mysql php-gd nginx nano exim syslog-ng

#################
# install MySQL #
#################
#yum -y install mysql-server
cat > /etc/my.cnf <<END
[mysqld]
default-storage-engine = myisam
key_buffer = 8M
query_cache_size = 8M
query_cache_limit = 4M
max_connections=25
thread_cache=1
skip-innodb 
query_cache_min_res_unit=0
tmp_table_size = 4M
max_heap_table_size = 4M
table_cache=256
concurrent_insert=2 
END
echo  Do not worry if you see a error stopping MySQL or NGINX
/etc/init.d/mysqld stop
/etc/init.d/mysqld start

####################
# Set up NGINX PHP #
####################
cat > /etc/nginx/php <<END
index index.php index.html index.htm;

location ~ \.php$ {

   include fastcgi_params;
    fastcgi_intercept_errors on;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
  try_files \$uri =404;
    fastcgi_pass 127.0.0.1:9000;
    error_page 404 /404page.html; #makes nginx return it's default 404 
#	page instead of a blank page

} 
END

cat > /etc/nginx/nginx.conf <<END
user              nginx nginx;
worker_processes  2;

error_log         logs/error.log;

pid               logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    client_max_body_size 64M;
    sendfile        on;
    tcp_nopush      on;

    keepalive_timeout  3;

    gzip  on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types      text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    server_tokens off;

    include /etc/nginx/conf.d/*;
} 
END
rm /etc/nginx/conf.d/*
cat > /etc/nginx/conf.d/default.conf <<END
server {
    listen 80 default;
    server_name _;
    root /var/www/html;
    include php;

  } 
END
mkdir /usr/share/nginx/logs/
service nginx restart
chkconfig nginx on
chkconfig mysqld on

cat > /etc/php-fpm.d/www.conf <<END
; Start a new pool named 'www'.
[www]

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
;                            a specific port;
;   'port'                 - to listen on a TCP socket to all addresses on a
;                            specific port;
;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000

; Set listen(2) backlog. A value of '-1' means unlimited.
; Default Value: -1
;listen.backlog = -1

; List of ipv4 addresses of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
listen.allowed_clients = 127.0.0.1

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. 
; Default Values: user and group are set as the running user
;                 mode is set to 0666
;listen.owner = nobody
;listen.group = nobody
;listen.mode = 0666

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = apache
; RPM: Keep a group allowed to write in log dir.
group = apache

; Choose how the process manager will control the number of child processes.
; Possible Values:
;   static  - a fixed number (pm.max_children) of child processes;
;   dynamic - the number of child processes are set dynamically based on the
;             following directives:
;             pm.max_children      - the maximum number of children that can
;                                    be alive at the same time.
;             pm.start_servers     - the number of children created on startup.
;             pm.min_spare_servers - the minimum number of children in 'idle'
;                                    state (waiting to process). If the number
;                                    of 'idle' processes is less than this
;                                    number then some children will be created.
;             pm.max_spare_servers - the maximum number of children in 'idle'
;                                    state (waiting to process). If the number
;                                    of 'idle' processes is greater than this
;                                    number then some children will be killed.
; Note: This value is mandatory.
pm = dynamic

; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes to be created when pm is set to 'dynamic'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI.
; Note: Used when pm is set to either 'static' or 'dynamic'
; Note: This value is mandatory.
pm.max_children = 5

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers = 1

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 1

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 3

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = 500

; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. By default, the status page shows the following
; information:
;   accepted conn    - the number of request accepted by the pool;
;   pool             - the name of the pool;
;   process manager  - static or dynamic;
;   idle processes   - the number of idle processes;
;   active processes - the number of active processes;
;   total processes  - the number of idle + active processes.
; The values of 'idle processes', 'active processes' and 'total processes' are
; updated each second. The value of 'accepted conn' is updated in real time.
; Example output:
;   accepted conn:   12073
;   pool:             www
;   process manager:  static
;   idle processes:   35
;   active processes: 65
;   total processes:  100
; By default the status page output is formatted as text/plain. Passing either
; 'html' or 'json' as a query string will return the corresponding output
; syntax. Example:
;   http://www.foo.bar/status
;   http://www.foo.bar/status?json
;   http://www.foo.bar/status?html
; Note: The value must start with a leading slash (/). The value can be
;       anything, but it may not be a good idea to use the .php extension or it
;       may conflict with a real PHP file.
; Default Value: not set 
;pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
; that FPM is alive and responding, or to
; - create a graph of FPM availability (rrd or such);
; - remove a server from a group if it is not responding (load balancing);
; - trigger alerts for the operating team (24/7).
; Note: The value must start with a leading slash (/). The value can be
;       anything, but it may not be a good idea to use the .php extension or it
;       may conflict with a real PHP file.
; Default Value: not set
;ping.path = /ping

; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
; Default Value: pong
;ping.response = pong

; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_terminate_timeout = 0

; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_slowlog_timeout = 0

; The log file for slow requests
; Default Value: /var/log/php-fpm.log.slow
;slowlog = /var/log/php-fpm.log.slow

; Set open file descriptor rlimit.
; Default Value: system defined value
;rlimit_files = 1024

; Set max core size rlimit.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0

; Chroot to this directory at the start. This value must be defined as an
; absolute path. When this value is not set, chroot is not used.
; Note: chrooting is a great security feature and should be used whenever 
;       possible. However, all PHP paths will be relative to the chroot
;       (error_log, sessions.save_path, ...).
; Default Value: not set
;chroot = 

; Chdir to this directory at the start. This value must be an absolute path.
; Default Value: current directory or / when chroot
;chdir = /var/www

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Default Value: no
;catch_workers_output = yes

; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment.
; Default Value: clean env
;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp

; Additional php.ini defines, specific to this pool of workers. These settings
; overwrite the values previously defined in the php.ini. The directives are the
; same as the PHP SAPI:
;   php_value/php_flag             - you can set classic ini defines which can
;                                    be overwritten from PHP call 'ini_set'. 
;   php_admin_value/php_admin_flag - these directives won't be overwritten by
;                                     PHP call 'ini_set'
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.

; Defining 'extension' will load the corresponding shared extension from
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
; overwrite previously defined php.ini values, but will append the new value
; instead.

; Default Value: nothing is defined by default except the values in php.ini and
;                specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
php_admin_value[upload_max_filesize] = 32M
END

mkdir /var/www
mkdir /var/www/html/
useradd apache
service php-fpm start
chkconfig php-fpm on
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save

wget freevps.us/downloads/setup-vhost.sh -O /bin/setup-vhost
chmod 755 /bin/setup-vhost
echo "alias nano='nano -w'" >> ~/.bashrc
clear
echo Installation done.
echo to create a vhost, run
echo setup-vhost example.com
echo do not include the www. subdomain.

转:http://www.cnblogs.com/vicowong/archive/2011/12/01/2116212.html

一、CentOS 6安装

1.1 使用VMware 虚拟机进行安装,进行安装界面

(分配内存必须大于1G,否则不会显示图型安装界面,网络设置使用“桥接模式” 即"Bridged"模式)

1.2 选择 Install or upgrade an existing system

1.3 在"Disc found" 框 选择 "skip"

1.4 next 选择 "chinese(simplified)(中文(简介 )) next

1.5 选择 "美国英语式" 下一步

1.6 选择 "基本 存储设备" 下一步

1.7 弹出"警告"框时,选择"重新初始化所有"

1.8 主机名可以保留默认,点击”配置网络“ 弹出“网络连接” 双击“System eth0"

1.9 弹出“正在编辑 System eth0" 选择"自动连接" 点击"应用“ ,点击”关闭“ 关闭”网络连接“框 下一步

1.10 不要选择“系统时钟使用UTC时间” 下一步

1.11 输入并确认 ”根密码“ 下一步

1.12 选择"替换现有Linux系统 " 下一步 “将修改写入磁盘"

1.13 选择"Basic Server" 下一步

1.14 大概一共590个软件包,复制安装完成后,点击“重新引导”,重新启动计算机

1.15 (安装完成后,可以将虚拟机内存由1G,改为512M)

 

二、更新centos6

2.1 更新

yum update -y

2.2 查看版本,确认为"CentOS Linux release 6.0 (Final)"

lsb_release -a

2.2 安装编译器

yum install -y gcc gcc-c++

 

三、安装Google-perftools (使用tcmalloc 加速 mysql 和 nginx)

3.1下载需要的文件

下载 libunwind-1.0.1.tar.gz 到 /usr/local/data-original

3.2 安装libunwind

cd /usr/local/data-original/

tar zvxf libunwind-1.0.1.tar.gz

cd libunwind-1.0.1

./configure --enable-shared

make && make install

3.3 安装google-perftools

cd /usr/local/data-original/

tar zvxf google-perftools-1.8.3.tar.gz

cd google-perftools-1.8.3

./configure --enable-shared --enable-frame-pointers

make && make install

3.4 更新,使动态链接库能够被系统共享

echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf

ldconfig

 

四、安装mysql

4.1.下载文件

下载 ncurses-5.9.tar.gz到/usr/local/data-original
下载 bison-2.5.tar.gz到/usr/local/data-original
下载 cmake-2.8.6.tar.gz到/usr/local/data-original
下载 mysql-5.5.18.tar.gz到/usr/local/data-original

4.2 安装ncurses

yum install ncurses-devel -y

cd /usr/local/data-original/

tar zvxf ncurses-5.9

./configure

make && make install

4.3 安装cmake

cd /usr/local/data-original/

tar zvxf cmake-2.8.6.tar.gz

cd cmake-2.8.6

./bootstrap

make && make install

4.4 安装bison

cd /usr/local/data-original/

tar zvxf bison-2.5.tar.gz

cd bison-2.5

./configure

make && make install

4.5 创建mysql需要的目录、配置用户和用户组

groupadd mysql

useradd -g mysql mysql

mkdir -p /data/mysql

chown -R mysql:mysql /data/mysql

4.6.安装mysql (需要 cmake ncurses-devel bison 库)

4.6.1 安装

cd /usr/local/data-original/

tar zvxf mysql-5.5.18.tar.gz

cd mysql-5.5.18

cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql -DMYSQL_DATADIR=/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DSYSCONFDIR=/etc/ -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=on

make && make install

4.6.2 创建软连接

ln -s /opt/mysql/lib/lib* /usr/lib/

4.6.3 配置mysql数据库

cd /opt/mysql
./scripts/mysql_install_db --basedir=/opt/mysql/ --datadir=/data/mysql/ --user=mysql

4.6.4 复制配置文件

cp ./support-files/my-large.cnf /etc/my.cnf

4.6.5 修改配置文件,设置默认使用utf8编码

vim /etc/my.cnf
在[client]下添加一行
default-character-set = utf8
在[mysqld]下添加一行
character-set-server = utf8

4.6.6 设置mysql开机自动启动服务
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 345 mysqld on

4.6.7 修改服务配置文件
vim /etc/rc.d/init.d/mysqld

根据设定需要,修改mysqld文件中的下面两项
basedir=/opt/mysql
datadir=/data/mysql

4.6.8 启动mysqld服务
service mysqld start

4.6.9 数据库初始化及修改root密码(root初始密码为空)
./bin/mysql_secure_installation
根据提示操作

4.6.10 软连接mysql

ln -s /opt/mysql/bin/mysql /bin

4.6.11 重启centos后,尝试用root连接mysql
mysql -u root -p

成功登录后查看状态

status;

4.6.12 使用tcmalloc优化mysql ( 需要安装google-perftools)

修改MySQL启动脚本(根据你的MySQL安装位置而定)
vim /opt/mysql/bin/mysqld_safe

在# executing mysqld_safe的下一行,加上:
export LD_PRELOAD=/usr/local/lib/libtcmalloc.so

4.6.13 重启服务,查看tcmalloc是否生效 (第二条命令显示即生效)

service mysqld restart

lsof -n | grep tcmalloc

如果显示以下类似的信息,即表示tcmalloc生效

[root@localhost mysql]# lsof -n|grep tcmalloc
mysqld 30347 mysql mem REG 253,0 2177570 544322 /usr/local/lib/libtcmalloc.so.0.2.2

 

五、安装Nginx

5.1.准备安装

下载 pcre-8.20.tar.gz到/usr/local/data-original

下载 nginx-1.0.10.tar.gz到/usr/local/data-original

5.2 更新包

yum install zlib* openssl* -y

 

5.3 安装Pcre

cd /usr/local/data-original/

tar zvxf pcre-8.20.tar.gz

cd pcre-8.20

./configure

make && make install

5.4 创建www用户和组,创建www虚拟主机使用的目录,以及Nginx使用的日志目录,并且赋予他们适当的权限

groupadd www
useradd -g www www

mkdir -p /data/www
chmod +w /data/www
chown -R www:www /data/www

为tcmalloc添加目录,并且赋予适当权限

mkdir -p /tmp/tcmalloc/

chown -R www:www /tmp/tcmalloc/

 

5.1 安装Nginx (需要 pcre google-perftools 库)

5.5.1 安装

cd /usr/local/data-original/

tar zvxf nginx-1.0.10.tar.gz

伪装服务器信息(可以不修改)

cd nginx-1.0.10/data-original/core

vim ./data-original/core/nginx.h

修改NGINX_VERSION为你希望显示的版号

修改NGINX_VER为你希望显示的名称

修改NGINX_VAR 为你希望显示的名称

保存

开始安装

./configure --user=www --group=www --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module --with-google_perftools_module

make && make install

5.4.2 修改 nginx.conf ,令nginx可以 google-perftools实现加速

vim /opt/nginx/conf/nginx.conf

修改前面几行为:

user www www;
worker_processes 8;
error_log logs/error.log crit;
pid logs/nginx.pid;
google_perftools_profiles /tmp/tcmalloc/;
events{
use epoll;
worker_connections 65535;
}

 

5.4.3 测试和运行

cd /opt/nginx

./sbin/nginx -t

如果显示下面信息,即表示配置没问题

nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/nginx/conf/nginx.conf test is successful

输入代码运行nginx服务

./sbin/nginx

ps au|grep nginx

如果显以类似下面的信息,即表示nginx已经启动

root 2013 0.0 0.0 103156 856 pts/0 S+ 03:22 0:00 grep nginx

输入代码检测是否支持加速

lsof -n | grep tcmalloc

如果显示类似下面的信息,即表示支持tcmalloc加速 (mysqld和nginx两个线程都支持)

mysqld 20818 mysql mem REG 253,0 2177570 281050 /usr/local/lib/libtcmalloc.so.0.2.2

nginx 29454 www 25w REG 253,0 0 288399 /tmp/tcmalloc/.29454

nginx 29455 www 27w REG 253,0 0 288403 /tmp/tcmalloc/.29455

 

5.5.4 打开防火墙80端口

写入规则,保存并重启服务

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

/etc/rc.d/init.d/iptables save

/etc/init.d/iptables restart

查看防火墙信息
/etc/init.d/iptables status

如果显示以下类似信息,即表示已经打开了80端口

1 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80

5.5.5 编写nginx 启动服务

cd /etc/init.d

vim nginx

输入以下代码并保存

#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

nginx="/opt/nginx/sbin/nginx"
prog=$(basename $nginx)

NGINX_CONF_FILE="/opt/nginx/conf/nginx.conf"

[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx

lockfile=/var/lock/subsys/nginx

start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}

stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
killall -9 nginx
}

restart() {
configtest || return $?
stop
sleep 1
start
}

reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}

force_reload() {
restart
}

configtest() {
$nginx -t -c $NGINX_CONF_FILE
}

rh_status() {
status $prog
}

rh_status_q() {
rh_status >/dev/null 2>&1
}

case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac

 

保存后,设置权限,并添加到启动服务列表中

chmod 755 /etc/init.d/nginx

chkconfig --add nginx

chkconfig --level 345 nginx on

service nginx start



六、安装PHP

6.1 准备安装

下载php-5.3.6.tar.gz到/usr/local/data-original
下载 libiconv-1.14.tar.gz到/usr/local/data-original
下载 libmcrypt-2.5.8.tar.gz到/usr/local/data-original
下载mcrypt-2.6.8.tar.gz到/usr/local/data-original
下载mhash-0.9.9.9.tar.gz到/usr/local/data-original
下载libmcrypt-2.5.8.tar.gz到/usr/local/data-original

yum -y install autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libXpm* gcc gcc-c++

 

5.2 安装libiconv (加强系统对支持字符编码转换的功能)

cd /usr/local/data-original/

tar zvxf libiconv-1.14.tar.gz

cd libiconv-1.14

./configure --prefix=/usr/local

make && make install

5.3 安装libmcrypt(加密算法库,PHP扩展mcrypt功能对此库有依耐关系,要使用mcrypt必须先安装此库)

5.3.1 安装libmcrypt

cd /usr/local/data-original/

tar zvxf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure

make && make install

5.3.2安装libltdl

cd libltdl/

./configure --enable-ltdl-install

make && make install

5.3.3 更新共享

ln -sf /usr/local/lib/libmcrypt.* /usr/lib64/
ln -sf /usr/local/bin/libmcrypt-config /usr/lib64/
#ln -sf /usr/local/lib/libiconv.so.2 /usr/lib64/

ldconfig

5.4 安装mhash(hash加密算法库)

5.4.1 安装mhash

cd /usr/local/data-original/

tar zvxf mhash-0.9.9.9.tar.gz

cd mhash-0.9.9.9

./configure

make && make install

5.4.2更新共享

ln -sf /usr/local/lib/libmhash.* /usr/lib64/

ldconfig

5.5 安装mcrypt

cd /usr/local/data-original/

tar zvxf mcrypt-2.6.8.tar.gz

cd mcrypt-2.6.8

ldconfig

./configure

make && make install

5.6 安装php

5.6.1 创建mysql软连接、ldap软连接

mkdir -p /opt/mysql/include/mysql
ln -s /opt/mysql/include/* /opt/mysql/include/mysql/

ln -s /usr/lib64/libldap* /usr/lib

5.6.2 安装

cd /usr/local/data-original/

tar zvxf php-5.3.8.tar.gz

cd php-5.3.8

./configure --prefix=/opt/php --with-config-file-path=/opt/php/etc --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --disable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap

make ZEND_EXTRA_LIBS='-liconv'

make install

5.6.3 复制配置文件

cp php.ini-production /opt/php/etc/php.ini

5.6.4 安装memcache扩展(已经安装PHP)

cd /usr/local/data-original/

tar zvxf memcache-2.2.6.tar.gz

cd memcache-2.2.6

/opt/php/bin/phpize

ldconfig

./configure --with-php-config=/opt/php/bin/php-config

make && make install

修改php配置文件,支持memcache

vim /opt/php/etc/php.ini

在文件中搜索extension_dir、extension ,在相应位置添加下面两行
extension_dir = "/opt/php/lib/php/extensions/no-debug-non-zts-20090626/"
extension = "memcache.so"

5.6.5 安装eaccelerator扩展(已经安装PHP)

cd /usr/local/data-original/

tar jxvf eaccelerator-0.9.6.1.tar.bz2

cd eaccelerator-0.9.6.1

/opt/php/bin/phpize

./configure --enable-eaccelerator=shared --with-php-config=/opt/php/bin/php-config

make && make install

修改php配置文件,支持eaccelerator

vim /opt/php/etc/php.ini

在文件尾加入以下代码

[eaccelerator]
zend_extension="/opt/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/opt/php/var/log/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

增加eaccelerator目录
mkdir -p /tmp/eaccelerator
5.6.5 安装php-fpm

cp /opt/php/etc/php-fpm.conf.default /opt/php/etc/php-fpm.conf
vim /opt/php/etc/php-fpm.conf

修改以下地方
[global]
pid = run/php-fpm.pid-p
error_log = log/php-fpm.log
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 5s
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35

[www]
user = www
group = www

5.6.6 修改nginx,支持php

vim /opt/nginx/conf/nginx.conf

找到并修改以下代码

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
include fastcgi_params;
}

 

5.6.7将php-fpm 作为服务运行

cd /usr/local/data-original/php-5.3.8
cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 700 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig --level 345 php-fpm on
服务方式启动php-fpm
service php-fpm restart

 

5.6.8 编写测试页面

vim /data/www/index.php

输入代码

<html>
<head><title>hello php</title></head>
<body>
<?php phpinfo();?>
</body>
</html>

5.6.8 打开浏览器进行测试

转:http://blog.csdn.net/xymyeah/article/details/6939544

一、一般来说nginx 配置文件中对优化比较有作用的为以下几项:

1. worker_processes 8;

nginx 进程数,建议按照cpu 数目来指定,一般为它的倍数 (如,2个四核的cpu计为8)。

2. worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;

为每个进程分配cpu,上例中将8 个进程分配到8 个cpu,当然可以写多个,或者将一
个进程分配到多个cpu。

3. worker_rlimit_nofile 65535;

这个指令是指当一个nginx 进程打开的最多文件描述符数目,理论值应该是最多打开文
件数(ulimit -n)与nginx 进程数相除,但是nginx 分配请求并不是那么均匀,所以最好与ulimit -n 的值保持一致。

现在在linux 2.6内核下开启文件打开数为65535,worker_rlimit_nofile就相应应该填写65535。

这是因为nginx调度时分配请求到进程并不是那么的均衡,所以假如填写10240,总并发量达到3-4万时就有进程可能超过10240了,这时会返回502错误。

查看linux系统文件描述符的方法:

[root@web001 ~]# sysctl -a | grep fs.file

fs.file-max = 789972

fs.file-nr = 510 0 789972

4. use epoll;
使用epoll 的I/O 模型

(

补充说明:

与apache相类,nginx针对不同的操作系统,有不同的事件模型

A)标准事件模型
Select、poll属于标准事件模型,如果当前系统不存在更有效的方法,nginx会选择select或poll
B)高效事件模型
Kqueue:使用于 FreeBSD 4.1+, OpenBSD 2.9+, NetBSD 2.0 和 MacOS X. 使用双处理器的MacOS X系统使用kqueue可能会造成内核崩溃。
Epoll: 使用于Linux内核2.6版本及以后的系统。

/dev/poll:使用于 Solaris 7 11/99+, HP/UX 11.22+ (eventport), IRIX 6.5.15+ 和 Tru64 UNIX 5.1A+。

Eventport:使用于 Solaris 10. 为了防止出现内核崩溃的问题, 有必要安装安全补丁。

)

5. worker_connections 65535;

每个进程允许的最多连接数, 理论上每台nginx 服务器的最大连接数为worker_processes*worker_connections。

6. keepalive_timeout 60;

keepalive 超时时间。

7. client_header_buffer_size 4k;

客户端请求头部的缓冲区大小,这个可以根据你的系统分页大小来设置,一般一个请求头的大小不会超过1k,不过由于一般系统分页都要大于1k,所以这里设置为分页大小。

分页大小可以用命令getconf PAGESIZE 取得。

[root@web001 ~]# getconf PAGESIZE

4096

但也有client_header_buffer_size超过4k的情况,但是client_header_buffer_size该值必须设置为“系统分页大小”的整倍数。

8. open_file_cache max=65535 inactive=60s;

这个将为打开文件指定缓存,默认是没有启用的,max 指定缓存数量,建议和打开文件数一致,inactive 是指经过多长时间文件没被请求后删除缓存。

9. open_file_cache_valid 80s;

这个是指多长时间检查一次缓存的有效信息。

10. open_file_cache_min_uses 1;

open_file_cache 指令中的inactive 参数时间内文件的最少使用次数,如果超过这个数字,文件描述符一直是在缓存中打开的,如上例,如果有一个文件在inactive 时间内一次没被使用,它将被移除。

二、关于内核参数的优化:

net.ipv4.tcp_max_tw_buckets = 6000

timewait 的数量,默认是180000。

net.ipv4.ip_local_port_range = 1024 65000

允许系统打开的端口范围。

net.ipv4.tcp_tw_recycle = 1

启用timewait 快速回收。

net.ipv4.tcp_tw_reuse = 1

开启重用。允许将TIME-WAIT sockets 重新用于新的TCP 连接。

net.ipv4.tcp_syncookies = 1

开启SYN Cookies,当出现SYN 等待队列溢出时,启用cookies 来处理。

net.core.somaxconn = 262144

web 应用中listen 函数的backlog 默认会给我们内核参数的net.core.somaxconn 限制到128,而nginx 定义的NGX_LISTEN_BACKLOG 默认为511,所以有必要调整这个值。

net.core.netdev_max_backlog = 262144

每个网络接口接收数据包的速率比内核处理这些包的速率快时,允许送到队列的数据包的最大数目。

net.ipv4.tcp_max_orphans = 262144

系统中最多有多少个TCP 套接字不被关联到任何一个用户文件句柄上。如果超过这个数字,孤儿连接将即刻被复位并打印出警告信息。这个限制仅仅是为了防止简单的DoS 攻击,不能过分依靠它或者人为地减小这个值,更应该增加这个值(如果增加了内存之后)。

net.ipv4.tcp_max_syn_backlog = 262144

记录的那些尚未收到客户端确认信息的连接请求的最大值。对于有128M 内存的系统而言,缺省值是1024,小内存的系统则是128。

net.ipv4.tcp_timestamps = 0

时间戳可以避免序列号的卷绕。一个1Gbps 的链路肯定会遇到以前用过的序列号。时间戳能够让内核接受这种“异常”的数据包。这里需要将其关掉。

net.ipv4.tcp_synack_retries = 1

为了打开对端的连接,内核需要发送一个SYN 并附带一个回应前面一个SYN 的ACK。也就是所谓三次握手中的第二次握手。这个设置决定了内核放弃连接之前发送SYN+ACK 包的数量。

net.ipv4.tcp_syn_retries = 1

在内核放弃建立连接之前发送SYN 包的数量。

net.ipv4.tcp_fin_timeout = 1

如果套接字由本端要求关闭,这个参数决定了它保持在FIN-WAIT-2 状态的时间。对端可以出错并永远不关闭连接,甚至意外当机。缺省值是60 秒。2.2 内核的通常值是180 秒,3你可以按这个设置,但要记住的是,即使你的机器是一个轻载的WEB 服务器,也有因为大量的死套接字而内存溢出的风险,FIN- WAIT-2 的危险性比FIN-WAIT-1 要小,因为它最多只能吃掉1.5K 内存,但是它们的生存期长些。

net.ipv4.tcp_keepalive_time = 30

当keepalive 起用的时候,TCP 发送keepalive 消息的频度。缺省是2 小时。

三、下面贴一个完整的内核优化设置:

vi /etc/sysctl.conf CentOS5.5中可以将所有内容清空直接替换为如下内容:

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.ip_local_port_range = 1024 65000

使配置立即生效可使用如下命令:
/sbin/sysctl -p

四、下面是关于系统连接数的优化

linux 默认值 open files 和 max user processes 为 1024

#ulimit -n

1024

#ulimit –u

1024

问题描述: 说明 server 只允许同时打开 1024 个文件,处理 1024 个用户进程

使用ulimit -a 可以查看当前系统的所有限制值,使用ulimit -n 可以查看当前的最大打开文件数。

新装的linux 默认只有1024 ,当作负载较大的服务器时,很容易遇到error: too many open files 。因此,需要将其改大。

解决方法:

使用 ulimit –n 65535 可即时修改,但重启后就无效了。(注ulimit -SHn 65535 等效 ulimit -n 65535 ,-S 指soft ,-H 指hard)

有如下三种修改方式:

1. 在/etc/rc.local 中增加一行 ulimit -SHn 65535
2. 在/etc/profile 中增加一行 ulimit -SHn 65535
3. 在/etc/security/limits.conf 最后增加:

* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535

具体使用哪种,在 CentOS 中使用第1 种方式无效果,使用第3 种方式有效果,而在Debian 中使用第2 种有效果

# ulimit -n

65535

# ulimit -u

65535

备注:ulimit 命令本身就有分软硬设置,加-H 就是硬,加-S 就是软默认显示的是软限制

soft 限制指的是当前系统生效的设置值。 hard 限制值可以被普通用户降低。但是不能增加。 soft 限制不能设置的比 hard 限制更高。 只有 root 用户才能够增加 hard 限制值。

五、下面是一个简单的nginx 配置文件:

user www www;
worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000
01000000;
error_log /www/log/nginx_error.log crit;
pid /usr/local/nginx/nginx.pid;
worker_rlimit_nofile 204800;
events
{
use epoll;
worker_connections 204800;
}
http
{
include mime.types;
default_type application/octet-stream;
charset utf-8;
server_names_hash_bucket_size 128;
client_header_buffer_size 2k;
large_client_header_buffers 4 4k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
fastcgi_cache_path /usr/local/nginx/fastcgi_cache levels=1:2
keys_zone=TEST:10m
inactive=5m;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 4k;
fastcgi_buffers 8 4k;
fastcgi_busy_buffers_size 8k;
fastcgi_temp_file_write_size 8k;
fastcgi_cache TEST;
fastcgi_cache_valid 200 302 1h;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_cache_use_stale error timeout invalid_header http_500;
open_file_cache max=204800 inactive=20s;
open_file_cache_min_uses 1;
open_file_cache_valid 30s;
tcp_nodelay on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server
{
listen 8080;
server_name backup.aiju.com;
index index.php index.htm;
root /www/html/;
location /status
{
stub_status on;
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$
{
expires 30d;
}
log_format access ‘$remote_addr — $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” $http_x_forwarded_for’;
access_log /www/log/access.log access;
}
}

六、关于FastCGI 的几个指令:

fastcgi_cache_path /usr/local/nginx/fastcgi_cache levels=1:2 keys_zone=TEST:10minactive=5m;

这个指令为FastCGI 缓存指定一个路径,目录结构等级,关键字区域存储时间和非活动删除时间。

fastcgi_connect_timeout 300;

指定连接到后端FastCGI 的超时时间。

fastcgi_send_timeout 300;

向FastCGI 传送请求的超时时间,这个值是指已经完成两次握手后向FastCGI 传送请求的超时时间。

fastcgi_read_timeout 300;

接收FastCGI 应答的超时时间,这个值是指已经完成两次握手后接收FastCGI 应答的超时时间。

fastcgi_buffer_size 4k;

指定读取FastCGI 应答第一部分需要用多大的缓冲区,一般第一部分应答不会超过1k,由于页面大小为4k,所以这里设置为4k。

fastcgi_buffers 8 4k;

指定本地需要用多少和多大的缓冲区来缓冲FastCGI 的应答。

fastcgi_busy_buffers_size 8k;

这个指令我也不知道是做什么用,只知道默认值是fastcgi_buffers 的两倍。

fastcgi_temp_file_write_size 8k;

在写入fastcgi_temp_path 时将用多大的数据块,默认值是fastcgi_buffers 的两倍。

fastcgi_cache TEST

开启FastCGI 缓存并且为其制定一个名称。个人感觉开启缓存非常有用,可以有效降低CPU 负载,并且防止502 错误。

fastcgi_cache_valid 200 302 1h;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;

为指定的应答代码指定缓存时间,如上例中将200,302 应答缓存一小时,301 应答缓存1 天,其他为1 分钟。

fastcgi_cache_min_uses 1;

缓存在fastcgi_cache_path 指令inactive 参数值时间内的最少使用次数,如上例,如果在5 分钟内某文件1 次也没有被使用,那么这个文件将被移除。

fastcgi_cache_use_stale error timeout invalid_header http_500;

不知道这个参数的作用,猜想应该是让nginx 知道哪些类型的缓存是没用的。以上为nginx 中FastCGI 相关参数,另外,FastCGI 自身也有一些配置需要进行优化,如果你使用php-fpm 来管理FastCGI,可以修改配置文件中的以下值:

60

同时处理的并发请求数,即它将开启最多60 个子线程来处理并发连接。

102400

最多打开文件数。

204800

每个进程在重置之前能够执行的最多请求数。

1. 到vmware官方网站获取:VMware-server-2.0.0-122956.i386.rpm

2. 到CentOS上面执行rpm -ivh VMware-server-2.0.0-122956.i386.rpm

3. 运行vmware-config.pl,根据提示回答使用网络的Bridge模式,可以不用NAT。

安装过程中需要的序列号:

VMware Server 2 for Windows A0025-FWR6J-V1MFH-4R63M
VMware Server 2 for Linux A2J05-FWWF0-UGH0J-4J2HN

4.修正SELinux
chcon -t texrel_shlib_t /usr/lib/vmware/vmacore/libvmacore.so.1.0

chcon -t texrel_shlib_t /usr/lib/vmware/hostd/diskLibWrapper.so

5. /sbin/service vmware restart

6. 如果要远程管理(我的CentOS是最小安装,没有X),使用putty连接到CentOS机器上面,设置下面的ssh tunnel:

L8222 到远程的127.0.0.1:8222
L8333 到远程的127.0.0.1:8333
L902 到远程的127.0.0.1:902

7. 在本机上面运行IE并访问: http://localhost:8222/
输入3中指定的管理账户,如root和root的密码就可以了。

8. 如果要使用WMWare Remote Console只要选择Console标签,并下载安装IE插件就可以了。

ORA-12705: invalid or unknown NLS parameter value specified

一,解压缩Oracle9204的安装文件
1. Oracle 9iR2 (9.2.0.4)
(1) 简化过程(以oracle登录,释放安装文件,使用更少的磁盘空间,速度更快)
在安装LINUX时最好分一个区/orasetup,这样一来即使系统坏了,也只是重装系统,而无须重新拷贝数据库安装文件.
zcat ship_9204_linux_disk1.cpio.gz | cpio –idmv &&
zcat ship_9204_linux_disk2.cpio.gz | cpio –idmv &&
zcat ship_9204_linux_disk3.cpio.gz | cpio –idmv
(2) 解包和解压过程中,自动创建了3个包含安装文件的目录:
Disk1
Disk2
Disk3
之后就可以安装Oracle9iR2了。
二,安装前的检查和准备工作;# rpm -qa | grep ****
1, 查看这些开发包是否已安装;
安装需要的软件包和补丁包:
p4198954_21_linux.zip 在运行 runInstaller 之前打.
p3238244_9204_LINUX.zip 修复agent错误的补丁.
p2617419_210_GENERIC.zip 打3238244补丁所需要的补丁.
compat-db-4.1.25-9
compat-gcc-32-3.2.3-47.3
compat-gcc-32-c++-3.2.3-47.3
compat-oracle-rhel4-1.0-3
compat-libcwait-2.0-1
compat-libgcc-296-2.96-132.7.2
compat-libstdc++-296-2.96-132.7.2
compat-libstdc++-33-3.2.3-47.3
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
gnome-libs-1.4.1.2.90-44
gnome-libs-devel-1.4.1.2.90-44
libaio-devel-0.3.102-1
libaio-0.3.102-1
make-3.80-5
openmotif21-2.1.30-11
xorg-x11-deprecated-libs-devel-6.8.1-23.EL
xorg-x11-deprecated-libs-6.8.1-23.EL
其中compat-oracle-rhel4和compat-libcwait可以在如下网站:
http://oss.oracle.com/projects/compa.../files/RedHat/
# rpm -qa | grep ‘compat’