Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3131113
  • 博文数量: 144
  • 博客积分: 10056
  • 博客等级: 上将
  • 技术积分: 2603
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-13 14:20
个人简介

互通有无,共同提高。

文章分类

全部博文(144)

分类: LINUX

2012-04-11 21:31:02

前些日子单位进了一批dell T7500微机工作站,用kickstart安装了系统和应用软件。现将安装过程做一小结,部分内容有待日后进一步完善。

 

准备工作

.配置dhcp服务

.配置tftp服务

.配置nfs服务

.配置ks.cfg文件

.创建和编辑/tftpboot/pxelinux.cfg/default文件

 

在服务器dell059

1、配置dhcp服务,编辑/etc/dhcpd.conf文件

(可把/usr/share/doc/dhcp*/dhcpd.conf.sample内容复制到此处再编辑)

# vi /etc/dhcpd.conf(修改红色部分内容)

ddns-update-style interim;

ignore client-updates;

subnet 10.52.19.0 netmask 255.255.255.0 {

# --- default gateway

#      option routers                  192.168.0.1;

        option subnet-mask              255.255.255.0;

#      option nis-domain               "domain.org";

#      option domain-name              "domain.org";

#      option domain-name-servers      192.168.1.1;

#      option time-offset              -18000; # Eastern Standard Time

#      option ntp-servers              192.168.1.1;

#      option netbios-name-servers     192.168.1.1;

# --- Selects point-to-point node (default is hybrid). Don't change this unless

# -- you understand Netbios very well

#       option netbios-node-type 2;

        range dynamic-bootp 10.52.19.80 10.52.19.106;

        default-lease-time 21600;

        max-lease-time 43200;

        # we want the nameserver to appear at a fixed address

        host ns {

                next-server marvin.redhat.com;

                hardware ethernet 12:34:56:78:AB:CD;

                fixed-address 207.175.42.254;

        }

next-server 10.52.19.59;

filename "pxelinux.0";

}

 

2vi /etc/xinetd.d/tftp文件,将disable字段值改为no,保存退出

# default: off

# description: The tftp server serves files using the trivial file transfer \

#  protocol.  The tftp protocol is often used to boot diskless \

#  workstations, download configuration files to network-aware printers, \

#  and to start the installation process for some operating systems.

service tftp

{

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

        server_args             = -s /tftpboot

        disable                 = no

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}

 

3 配置nfs 服务:

# vi /etc/exports

/disk1  *(rw,no_root_squash,sync)

/disk2  *(rw,no_root_squash,sync)

注:安装源是将系统光盘制成镜像文件拷贝到服务器中,即:

# cd /disk1

# cp /dev/cdrom RHEL5.5.iso (将RHEL5.5光盘制成镜像文件,文件名为RHEL5.5.iso

# mkdir RHEL5.5

# chmod -R 777 RHEL5.5

# mount -o loop RHEL5.5.iso RHEL5.5  (将RHEL5.5.iso镜像文件挂载到RHEL5.5目录下)

# cp -r RHEL5.5 install (将RHEL5.5拷贝为install

# umount RHEL5.5

并把ks.cfg文件拷贝到/disk1/install目录里

 

4、配置服务器ks.cfg文件

# cd /disk1/install

# vi  ks.cfg    (红色是修改部分)

# platform=x86, AMD64, or Intel EM64T

# System authorization information

auth  --useshadow  --enablemd5

# System bootloader configuration

# bootloader --location=mbr

bootloader --location=mbr --driveorder=sda,sdb,sdc --append="rhgb quiet"

# Partition clearing information

# clearpart --all --initlabel

clearpart --drives=sdb –initlabel    sda安装win7,这里要对sdb进行分区和格式化

# Use graphical install

graphical

# Firewall configuration

firewall --disabled

# Run the Setup Agent on first boot

firstboot --disable

# System keyboard

keyboard us

# System language

key --skip

lang en_US.UTF-8

# Installation logging level

logging --level=info

# Use NFS installation media

nfs --server=10.52.19.59 --dir=/disk1/install

# Network information

# network --bootproto=dhcp --device=eth0 --onboot=on

# network --device eth1 --onboot no --bootproto dhcp --hostname hpz8020

network --device eth0 --bootproto static --ip 10.52.19.134 --netmask 255.255.255.0 --hostname dell06

# Root password

rootpw --iscrypted $1$3Q4MDNA2$8J9lrzvX0zJJFJ0totpSE/

# SELinux configuration

selinux --disabled

# System timezone

timezone --utc Asia/Shanghai

# Install OS instead of upgrade

install

# X Window System configuration information

xconfig  --defaultdesktop=GNOME --depth=16 --resolution=1024x768

# Disk partitioning information

# part / --bytes-per-inode=4096 --fstype="ext3" --size=80960 --ondisk=sda

# part /boot --bytes-per-inode=4096 --fstype="ext3" --size=200 --ondisk=sda

# part /home --bytes-per-inode=4096 --fstype="ext3" --size=102400 --ondisk=sda

# part /soft --bytes-per-inode=4096 --fstype="ext3" --size=50000 --ondisk=sda

# part /pb --bytes-per-inode=4096 --fstype="ext3" --size=50000 --ondisk=sda

# part swap --bytes-per-inode=4096 --fstype="swap" --size=128000 --ondisk=sda

# part /disk1 --bytes-per-inode=4096 --fstype="ext3" --grow --size=1 --ondisk=sda

# part /oracle --bytes-per-inode=4096 --fstype="ext3" --size=100000 --ondisk=sdb

# clearpart --drives=sdb   (分区信息)

part /boot --fstype ext3 --size=100 --ondisk=sdb

part /home --fstype ext3 --size=200000 --ondisk=sdb

part swap --size=128000 --ondisk=sdb

part /oracle --fstype ext3 --size=100000 --ondisk=sdb

part / --fstype ext3 --size=80000 --ondisk=sdb                                        

part /var --fstype ext3 --size=40000 --ondisk=sdb

part /soft --fstype ext3 --size=40000 --ondisk=sdb

part /pb --fstype ext3 --size=40000 --ondisk=sdb

part /disk1 --fstype ext3 --size=100 --grow --ondisk=sdb (注:如果sdb盘已做过分区,那么此处的--grow选项有时会导致安装失败,这时可用win7的磁盘管理工具或用paragon等分区工具先将sdb 分区删除即可)

%packages

@admin-tools

@base-x

system-config-kickstart

tunctl

xorg-x11-server-Xvfb


 

5、创建和编辑/tftpboot/pxelinux.cfg/default文件

# cp /usr/lib/syslinux/pxelinux.0 /tftpboot

# cp /disk1/install/images/pxeboot/vmlinuz /tftpboot/

# cp /disk1/install/images/pxeboot/initrd.img /tftpboot/

# cd /tftpboot

# mkdir pxelinux.cfg

# vi pxelinux.cfg/default

default ks

prompt 0

timeout 600

display boot.msg

F1 boot.msg

F2 options.msg

F3 general.msg

F4 param.msg

F5 rescue.msg

# label linux

# kernel vmlinuz

# append initrd=initrd.img ks=nfs:169.169.52.182:/tftpboot/kkk/ks.cfg

# label text

# kernel vmlinuz

# append initrd=initrd.img text

label ks

  kernel vmlinuz

  append ks=nfs:10.52.19.59:/disk1/install/ks.cfg initrd=initrd.img

label local

  localboot 1

label memtest86

  kernel memtest

  append –

在客户机上安装RHEL5.5及R5000.8

1启用PXE

2启用Onboard Network Controoler

3系统安装成功后,

# Vi /etc/sysconfig/network 修改hostname

# hostname 主机名

 

4# vi /etc/sysconfig/network-scripts/ifcfg-eth0 修改IP

   # service network restart

 

5、建分区、格式化磁盘:

# fdisk –l

# fdisk /dev/sdc

n

p

1

w

# partprobe

# mkfs.ext3 /dev/sdc1

 

6、建工区目录:

# mkdir  -p dell066disk2/project/seisdata

# chmod –R 777 dell066disk2

# vi /etc/fstab 添加:

/dev/sdc1      /dell066disk2      ext3       dfaults   1 2

# mount –a

 

7创建挂接点:

# mkdir /disk2

# mount 10.52.19.59:/disk2 /disk2

# cd /disk2

# ls

# cp hosts /etc/hosts

 

8、安装ntfs支持:

# rpm –ivh ntfs-3g-2009.4.4-EL5Server.x86_64.rpm

 

9、切换运行级别3,安装显卡:

# init 3

# cd /diks2

# ./NVIDIA-Linux-x86_64_260.19.44.run

# vi /etc/X11/xorg.conf 修改16位色深为24

 

10、切换运行级别5

 

11、设置gdm:

 # gdmsetup

 Remote Login disable---改为Same as Local

 Security 取消Deny TCP connection to Xserver前面的勾

 # gdm-restart

 

12、编辑并拷贝hosts.equiv文件:

# cd /disk2

# cp hosts.equiv /etc/hosts.equiv

# cp hosts.equiv /root/.rhosts

 

13、安装R5000

# cd /disk2/DSD5000.8

# ./install-48gb.sh(脚本内容见附录)

修改dir.datowdir.dat路径;添加:3dv, 3dh, cd, bri, cmp格式

 

14、创建兰马用户:

3---Perform all of the above

5---Quit

4---update

Enter the Account login name: owr5000

7---Quit

 

15、拷贝许可文件:

# cp lm-license.dat $OWHOME/lam/license.dat

# passwd owr5000

# ow123

# ow123

 

16logout root

登录owr5000

 

17、修改数据库用户:

OpenWorks Command Menu---Project—Modify Database Users---

Admin Logon(OWPEPRIS):

User Name: system

Passwd: system

 

Database Users(OWPEPRIS)---User Details

Name: owr5000

Passwd: ow123

Add---File—Exit

 

18Extend OWSYS:

OpenWorks Command Menu---Project---Project Admin

Passwd: ow123

Extend OWSYS?

Extend Now…等待弹出…Project Administration---Project---Exit

 

19、修改lgcenv.cf

# vi $OWHOME/conf/lgcenv.cf

OW_SYSDATA_DIR /hp5801disk1/project

OWIOFORMATS /hp5801disk1/project/OW_SYS_DATA/owioformats

注:
可以把DSD5000.8安装介质拷贝到本地硬盘(如/disk4/.DSD5000.8)
然后在 / 下新建目录 /disk2,
用符号链接 ln -s /disk4 /disk2
这样可方便以后维护或重装软件
(.DSD5000.8是隐含属性,以防误删)

 

安装jason8.1

# cd /disk2

# cp JGW-8V1.gz /soft

# cd /soft

# tar xvfpz JGW-8V1.gz

# ln –s /soft/ JGW-8V1/Jason /usr/bin/Jason

# cp js-license.dat /soft/ JGW-8V1/license/license.dat

# cd ..

# ./jgsetup

# 1

# 7 修改hostname为本机

owr5000用户登录

% Jason 启动jason

 

安装JustCGM

1Linux terminal启动JustCGM(添加桌面快捷方式):

# tar xvf justhp.tar –C /home/owr5000

# vi /home/owr5000/.testldw IP改为本机IP

   Sh /home/owr5000/.test "setenv DISPLAY 10.52.19.59:0.0;/home/justcgm/bin/justcgm"

 

2Xmanager启动JustCGM(添加桌面快捷方式):

vi /usr/local/bin/cgm

#!/bin/csh -f

xhost +

set cmdline='setenv DISPLAY '$DISPLAY';/home/justcgm/bin/justcgm'

rsh hp5801 "$cmdline"

 

启动相应服务

启动dhcpd服务:

# service dhcpd start

# chkconfig dhcpd on开机自动启动服务

    

重启nfs服务:

# service nfs restart

# chkconfig nfs on开机自动启动服务

 

查看tftp进程状态:

# chkconfig --list |grep -i tftp

 

启动xinetd服务:     

# service xinetd start

# chkconfig xinetd on开机自动启动服务

 

查看LM许可启动项

[root@dell066 owr5000]# more /etc/rc.d/rc.local

#!/bin/sh

#

#This script will be executed *after* all the other init scripts.

#You can put your own initialization stuff in here if you don't

#want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - lmkadm -c /pb/OpenWorks/lam/bin/startlmgrd

 

附录:R5000.8安装脚本(install-48gb.sh)内容

###!/bin/sh
#1###############mkdir /disk2 and mount /dev/sda1 /disk2
cd /disk2/DSD5000.8
####################chkconfig
chkconfig atd off
chkconfig auditd off
chkconfig autofs off
chkconfig bluetooth off
chkconfig ip6tables off
chkconfig iptables off
chkconfig sendmail off
chkconfig telnet on
chkconfig rsh on
chkconfig rlogin on
chkconfig rexec on
chkconfig nfs on
chkconfig vsftpd on
#2##########################rpm disk2
cd /disk2/DSD5000.8/sys-rpm; rpm -ivh *.rpm
#3###############securetty#
echo "rsh" >> /etc/securetty
echo "rlogin" >> /etc/securetty
echo "rexec" >> /etc/securetty
#4############passwd
cat /disk2/DSD5000.8/passwd >> /etc/passwd
cat /disk2/DSD5000.8/group >> /etc/group
/usr/sbin/pwconv
/usr/sbin/grpconv
mkdir /home/owr5000
mkdir /home/lmkadm
chown -R 1001:1000 /home/owr5000
chown -R 1000:1000 /home/lmkadm /pb
#5#############csh.login
cat /disk2/DSD5000.8/csh.login >> /etc/csh.login
#6##########limits.conf
cat /disk2/DSD5000.8/limits.conf >> /etc/security/limits.conf
echo "session required /lib64/security/pam_limits.so" >> /etc/pam.d/login
#7##########sysctl.conf
cat /disk2/DSD5000.8/sysctl.conf >> /etc/sysctl.conf
sysctl -p
#8#############oratab
cp /disk2/DSD5000.8/oratab /disk2/DSD5000.8/oraInst.loc /etc
#9############usr bin
cd / ; tar xvfpz /disk2/DSD5000.8/usrbin.gz
#10###########pb
cd / ; tar xvfpz /disk2/DSD5000.8/owr5000.8.gz
#11###########ora11g
cd /; tar xvfpz /disk2/DSD5000.8/ora11g48gb.gz
cd /oracle/ora11g/product/11.2.0/dbhome_1/network/admin/
host=`hostname`
perl
   -pi -e  s/hp5801/$host/ listener.ora
perl
   -pi -e  s/hp5801/$host/ tnsnames.ora
#12##########################dir.dat
cat /pb/OpenWorks/conf/dir.dat
vi /pb/OpenWorks/conf/dir.dat
#13##########################owdir.dat
cat /pb/OpenWorks/conf/owdir.dat
vi /pb/OpenWorks/conf/owdir.dat
#14##########################rc.local
echo "su - lmkadm -c "/pb/OpenWorks/lam/bin/startlmgrd"" >> /etc/rc.local
#15######################### ow setup
cd /pb/OpenWorks/install/
./owsetup -o /pb/OpenWorks
#16######################lgc user
cd /pb/OpenWorks/bin
./lgcuser
################select 4
### select 7 after Update owr5000 user
#17#######################project data
sh /pb/OpenWorks/bin/CreateOracleLinks.sh
cd `cut -f1 /pb/OpenWorks/conf/dir.dat|cut -d"/" -f1-3` ; tar xvfpz /disk2/DSD5000.8/data.gz
cd hp5801disk1/project ; mv * ../../
cd
  `cut -f1 /pb/OpenWorks/conf/dir.dat|cut -d"/" -f1-3` ; rm -rf hp5801disk1/project

 

本文发表在阿果石油网:

 ===========
类例:
Linux-6.5 下配置 传说中的( PXE and Kickstart )
http://blog.chinaunix.net/uid-29584738-id-4195589.html

阅读(16660) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~