Archive for the ‘Linux’ Category

【收藏】RHEL4上安装基于postfix的全功能邮件服务器(全部使用目前最新源码包构建)

星期一, 12月 3rd, 2007

收藏来自:http://marion.cublog.cn

系统逻辑结构:

 

前提:使用时请确保您已经配置好指向此邮件服务器MX记录及其它DNS设置;本示例中的域名为benet.org,邮件服务器FQDNmail.benet.orgwww.benet.orgpostfix.benet.orgIP地址为192.168.1.6;同时,如果您的服务器事先已经安装了sendmail,请卸载之;

 所用软件包:Postfix-2.4.5
Mysql-5.0.45
Sasl-2.1.22
DB-4.5.20
Openssl-0.98e
httpd-2.2.4
Php-5.2.3
courier-authlib-0.59.3
courier-imap-4.1.3
Extmail-1.0.2
Extman-0.2.2
maildrop-2.0.4
clamav-0.91.2
amavisd-new
SpamAssassin-3.2.3
(more…)

[FAQ]device does not seem to be present, delaying eth0 initialization

星期一, 11月 5th, 2007

当在使用linux的时候,无意间删除了网卡,在添加回来时会出现device does not seem to be present, delaying eth0 initialization 这个提示,说明网卡驱动没有被系统识别,可进行如下操作,首先删除硬件驱动,重启计算机,系统会重新认出网卡硬件,但是并没有添加eth项目,因此需要手动添加eth1,选择正确的网卡,系统恢复正常

cups故障

星期五, 10月 26th, 2007

今天我们一个同事用打印机打了本书,但是卡在那里不动了,我看下发现任务都堵在了里面,于是用ssh登录到系统运行service cups restart,把cups服务重启,但是问题依然存在,迫不得已,跑到服务器那里打开显示器一看,发现服务器速度已经慢到不行。。唉~好几个月没有重启了,于是重启服务器,问题还是存在,打印机依然在重复打乱码,最后只能用lprm.cups清除任务,之后重启问题解决。

(转)RHEL4上面安装Oracle 10.2.0.1

星期六, 09月 29th, 2007

RHEL4上面安装Oracle 10.2.0.1
====================
OS: RHEL4 U1
Oracle : 10.2.0.1
Place: Home
Participator: Eric Zhang
Date: 21:10 2005-12-30

1. Install RHEL4U1
==================

/ ext3 13500 MB
swap 824MB (it should be physical memory *2. if physical memory >1G , just set swap = physical memory)

IP: 192.168.193.8 /255.255.255.0
Hostname: RHEL4

Gateway: 192.168.193.1
DNS: 202.96.0.133

No firewall

Languages:
English(USA)
Chinese(P.R. of China)

Location : Asia/Shanghai

Customize software packages to be installed.
—-
X windows System
GNOME Desktop Environment
KDE (K DeskTop Environment )
—-
Editors
Graphical Internet
Office/Productivity
Sound and Video
—-
Server Cofiguration Tools
FTP Server
Legacy Network Server
—-
Development Tools
Legacy Software Development
—-
Administration Tools
—-

2. Open FTP feature:
================

#setup -> system services -> vsftpd

#cd /etc/init.d
#./vsftpd start

3. Create Oracle User:
================
#groupadd oinstall
#groupadd dba
#useradd -g oinstall -G dba ora10g

4. Modify Oracle user’s .bash_profile
=======================

export ORACLE_BASE=/u10/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
export ORACLE_SID=ora10g
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export LC_CTYPE=en_US.UTF-8

5. modify linux system parameters:
======================

a. #vi /etc/sysctl.conf

在该文件末尾加入如下内容:
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=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

# /sbin/sysctl -p 命令操作来使我们所做的变更生效.

b. # vi /etc/security/limits.conf

# 添加如下的行

* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

c. #vi /etc/pam.d/login

添加
session required /lib/security/pam_limits.so

d. #vi /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

6. 确认如下package 已经安装了:
==============

确认以下 rpm包都已经安装:

make-3.79
binutils-2.11
openmotif-2.2.2-16
setarch-1.3-1
compat-db-4.0.14.5
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122

//不过,高版本的应该没有问题,我继续。

7. ftp 10201_database_linux32.zip到/home/ora10g
===========================

8.$unzip 10201_database_linux32.zip
=======================

9. Disable sendmail:
==============
/etc/init.d
/etc/rc0.d
/etc/rc1.d
/etc/rc2.d
/etc/rc3.d
/etc/rc4.d
/etc/rc5.d
/etc/rc6.d

# mv *sendmail* ./yszhang

10 modify /etc/hosts:
=============

127.0.0.1 RHEL4 localhost.localdomain localhost
变成
127.0.0.1 localhost.localdomain localhost
192.168.193.8 RHEL4

9. #xhost +
=========

10.安装oracle binary
============
#mkdir /u10
#chown ora10g:oinstall /u10
#su - ora10g
$/home/ora10g/database/runInstaller&

只有物理内存一项不合格,其余全部检查成功,继续走。
不选择创建数据库。

11.Create Database
============
$dbca&

——————————–以上转自chinaunix

[转] Redhat Linux企业版4的openvpn安装

星期二, 07月 31st, 2007

我在chinaunix上看到的一片很经典文章,本人已经经过测试,完全可信,拿来留作记录,rhel4的vpn配置加上如此详细的说明并不多见,每一步都说的很详细,值得收藏!

(more…)