在RedHat6.x上安装apache1.3.12 gd1.8.3 php4.04 tomcat sybase11.9.2 oracle8.1.6 mysql全攻略

这是Michael早期1999年写的一篇blog,再次贴到这里,希望对新接触以上几个东西的朋友们有抛砖引玉之用!

看了网上众多网友对php、jsp、sybase、oracle、apache等方面的安装经验,发现有很多都是重复而且不够全面,根据本人对以上各种东东长期总结和参考相关文档以及各位网友的文章,并经自己亲自实践,现将在RedHat6.2下apache1.3.12+gd1.8.3+php4.04+tomcat+sybase11.9.2+oracle8.1.6+mysql3.22.27的安装配置全部奉献给大家,希望能对大家有所帮助;

运行环境:PⅢ550+256M+20G+530TX Lan+sis6326 8M+RedHat Linux6.2
安装规划:sybase安装在/sybase目录
oracle安装在/home/oracle目录
gd安装在/usr/local目录
apache安装在/www目录
tomcat安装在/usr/local/jakarta-tomcat目录
jdk安装在/usr/local/jdk122目录

一、资料准备
1、apache_1312.tar.gz
2、php-404.tar.gz
3、jakarta-tomcat.tar.gz
4、sybase11.9.2包:
sybase-common-1192-1i386.rpm
sybase-ase-1192-1i386.rpm
sybase-monserver-1192-1i386.rpm
sybase-openclient-1111-1i386.rpm
sybase-sqlremote-602-1i386.rpm
sybase-chinese-1192-1i386.rpm
5、oracle8.1.6.tar
6、mysql3.22.27包:
mysql-3.22.27-1.i386.rpm
mysql-devel-3.22.27-1.i386.rpm
mysql-client-3.22.27-1.i386.rpm
7、jdk1_2_2-linux-i386.tar.gz
8、mod-jserv.so
9、gd183.tar.gz

二、环境配置
1、系统安装
安装linux系统时创建目录/www、/sybase和/home并分配给各自较大空间,用于存储数据库资料和网页文件;
2、环境变量
配置运行oracle和tomcat以及java的java运行环境变量
用root用户登录系统
#vi /etc/profile
添加下列行
[coolcode]
ORACLE_HOME=/home/oracle
export ORACLE_HOME

JAVA_HOME=/usr/local/jre
export JAVA_HOME

ORACLE_SID=dblee(此处dblee可以改为你自己想用的名称)
export ORACLE_SID

ORACLE_TERM=xterm
export ORACLE_TERM

ORACLE_OWNER=oracle8
export ORACLE_OWNER

TNS_ADMIN=/home/oracle/config/8.1.6
export TNS_ADMIN

CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip:.
CLASSPATH=/usr/local/jdk/lib:/usr/local/jre/lib:$CLASSPATH
export CLASSPATH

PATH=$PATH:/usr/local/jre/bin:/usr/local/jdk/bin:/bin:/sbin
PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin
PATH=$PATH:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:.
export PATH
[/coolcode]
退出重新登录,是设置生效

三、安装
1、sybase安装
如果您有sybase 的安装光盘,可以在linux的图形界面下使用图形方式安装,sybase提供图形界面下的安装向导
本文采用手动的rpm包安装;
(1)以root用户登录
(2)在sybase的各个rpm包中,必须先安装sybase-common-1192-1i386.rpm包,这是其他包运行的必要内容
#rpm –prefix=/sybase -hiv ./sybase-common-1192-1i386.rpm
#rpm –prefix=/sybase -hiv ./sybase-ase-1192-1i386.rpm
#rpm –prefix=/sybase -hiv ./sybase-monserver-1192-1i386.rpm
#rpm –prefix=/sybase -hiv ./sybase-openclient-1111-1i386.rpm
#rpm –prefix=/sybase -hiv ./sybase-sqlremote-602-1-i386.rpm
#rpm –prefix=/sybase -hiv ./sybase-chinese-1i386.rpm
到此,完成了sybase组件的安装,需要进行数据库创建和必要的配置才能运行
(3)设置目录文件的权限
#chown -R sybase /sybase
#chgrp -R sybase /sybase
(4)设置sybase用户口令
#passwd sybase
(5)退出系统,用sybase用户登录,系统会给一个提示,选择n并回车;
(6)创建sybase数据库文件存在的目录
#mkdir /sybase/data
(7)在/sybase/bin目录中创建数据库创建和运行需要的两个文件
编辑srvbuild.adaptive_server.rs和srvbuild.backup_server.rs文件

srvbuild.adaptive_server.rs文件范例如下:
[coolcode]
sybinit.release_directory: /sybase
sybinit.product: sqlsrv
sqlsrv.server_name: Michael_sybase (此处设置为你想使用的sybase数据库服务名)
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: 192.168.18.19(此处设置为您的服务器ip地址)
sqlsrv.network_port_list: 4000(sybase数据库使用的端口)
sqlsrv.master_device_physical_name: /sybase/data/master.dat
sqlsrv.master_device_size: USE_DEFAULT
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /sybase/data/sybsystem.dat
sqlsrv.sybsystemprocs_device_size: USE_DEFAULT
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: /sybase/data/sybsystemdb.dat
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server: Michael_sybase_bk(此处设置为您的sybase数据库对应的backup服务名)
[/coolcode]
srvbuild.backup_server.rs文件范例如下:
[coolcode]
sybinit.release_directory: /sybase
sybinit.product: bsrv
bsrv.server_name: Michael_sybase_bk(此处设置为在上门设置的backup服务名)
bsrv.do_add_backup_server: yes
bsrv.network_protocol_list: tcp
bsrv.network_hostname_list: 192.168.18.19(服务器的ip地址)
bsrv.network_port_list: 4100(sybase备份服务器使用的端口)
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: USE_DEFAULT
[/coolcode]

(8)创建数据库(当前用户仍然是sybase)
#cd /sybase/bin
#./srvbuild -r ./srvbuild.adaptive_server.rs
#./srvbuild -r ./srvbuild.backup_server.rs
运行完成后,将会在/sybase/install目录中生成两个新文件RUN_Michael_sybase和RUN_Michael_sybase_bk
到此,sybase数据库的安装和配置以及数据库的创建已经完成;
(9)启动数据库(当前用户仍然是sybase)
#cd /sybase/install
#./startserver -f ./RUN_Michael_sybase
#./startserver -f ./RUN_Michael_sybase_bk
看到一些提示后,如果不报错误,表示数据库已经启动,此时可以运行当前目录下的./showserver查看;
#./showserver
将返回当前正在运行的sybase数据库服务情况,正常下应该是两个服务,分别是adative和backup;
到此,您的sybase数据库已经全部安装完成,您可以使用sybase的客户端或者powerbuilder等工具通过您的
服务器ip以及端口4000访问sybase数据库;
(10)经验提示
如果您在第8或者第9步中出现错误,请检查您的机器网络设置是否正常,必须保证您的服务器ip地址可以在
本机上ping通,不能是ping localhost,必须是ping your ip成功才行,这可是Michael曾经试验了一下午时间
才发现的秘密哟!^_^

2、安装jdk
#cd /usr/local
#tar -zxvf jdk1_2_2-linux.tar.gz
#ln -s jdk122 jdk
#ln -s jdk122/jre jdk
到此完成了jdk的安装

3、安装oracle8.1.6
在安装oracle之前,必须完成环境变量的设置和jdk的安装
[root@oradb /root]$               #以root方式登录
[root@oradb /root]$ groupadd oracle      #创建oracle用户组
[root@oradb /root]$ useradd oracle -g oracle    #在oracle组中建新用户oracle
[root@oradb /root]$ passwd oracle        #修改oracle用户口令
[root@oradb /root]$ useradd apache -g oracle #创建apache用户 

注:oracle组和oracle用户是oracle安装需要的
注:创建oracle用户后,linux系统自动在/home目录下创建/home/oracle目录,给oracle用户使用,
  oracle用户对此目录拥有所有的权限,
  为方便,本例把oracle系统安装在oracle用户自己的目录下
[root@oradb /oracle]$ exit           #退出,以oracle用户重新登录(以下的操作全部是oracle用户)
[oracle@oradb /oracle]$
[oracle@oradb /oracle]$ ls -l
[oracle@oradb /oracle]$ tar zxvf oracle8161_tar.gz   #解压oracle压缩包到当前目录
[oracle@oradb /oracle]$mv Oracle8iR2 orainst #为了写起来方便,我将目录重新命名了,您可以不变
[oracle@oradb /oracle]$ startx     #启动X-windows后,启用一个终端(xterm),(图形窗口)
                    #在该终端中运行runInstaller
[oracle@oradb /oracle]$ cd orainst
[oracle@oradb /orainst]$ ./runInstaller #执行oracle安装程序,linux下执行一个程序,可用./调用执行

这时你可以看到用jre运行的全新的图形化的OUI的欢迎画面,按照提示继续安装进程:
Welcome:
按next

File Locations:
按next

UNIX Group Name:
什么也不添,按next
出错,提示要以root权限运行“/home/oracle/orainstRoot.sh

CTRL+ALT+F2,打开一个新的控制台(字符窗口)
以root登录
[root@oradb /root]$ cd /home/oracle
这时,/home/oracle/目录下只有一个文件orainstRoot.sh,运行它
[root@oradb /oracle]$ sh orainstRoot.sh

CTRL+ALT+F7,回到安装界面(图形窗口)
按Retry按钮,就可以继续安装了,

Available Products:
选Oracle8i Enterprise Edition 8.1.6.1.0,按next

Installation Types:
选Typical(540MB),按next,这时,屏幕右上角出现一个进度标尺

Database Identification:
Global Database Name:输入oracle8(可以任意)
SID:保留orcl
按next

Database File Location:
任意目录,本例设为“/home/oracle/”,按Next,这时,屏幕右上角进度标尺继续前进

出现Summary,对你想要安装的产品作一个总结
按Install,出现Install画面,等待… 你可以看到窗口底部提示的安装等log文件目录,可供以后查询。

弹出Setup Privileges窗口
提示:在安装继续进行之前,需要以root运行一个脚本“/home/oracle/root.sh”,
CTRL+ALT+F2,回到刚才运行的第2个终端窗口
以root权限执行该文件,
[root@oradb /oracle]$ sh root.sh

屏幕显示:
Enter the full pathname of the local bin directory:[/usr/local/bin]:\c
回车
系统开始执行一些动作,执行完毕,CTRL+ALT+F7按返回OUI,按OK。

Database Creation Progress开始,逐步进行以下4个过程
Creating and starting Oracle instance
Copying database files
Initializing database
Database creation completed

以上4个过程完成,弹出Oracle Database Configuration Assistant Alert窗口,
提示:数据库创建完成,告诉你数据库的一些基本信息
global databse name:oracle8
database system identifier(SID):orcl
SYS account password:change_on_install
SYSTEM account password:manager
按ok

End of Installation,按Exit退出OUI,完成安装。

退出图形窗口,回到
[oracle@oradb /oracle]$

这时,oracle数据库已经安装成功,并且数据库已经启动运行,可以试一下
[oracle@oradb /oracle]$sqlplus system/manager

出现以下信息:
SQL*Plus: Release 8.1.6.0.0 – Production on Fri Oct 26 2056 2000

(c) Copyright 1999 Oracle Corporation. ALL rights reserved.

Connected to:
Oracle8i Enterprise Edition Release 8.1.6.1.0 – Production
With the Partitioning option
JServer Release 8.1.6.0.0 – Production

SQL> show user
USER is “SYSTEM”
SQL>
SQL> exit

启动数据库:
[oracle@oradb /oracle]$ svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
显示SGA状态
Database mounted.
Database opened.
SVRMGR>

关闭数据库:
[oracle@oradb /oracle]$ svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> stutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR>

启动监听器
[oracle@oradb /oracle]$ lsnrctl
LSNRCTL> start
LSNRCTL> exit

停止监听器
[oracle@oradb /oracle]$ lsnrctl
LSNRCTL> stop
LSNRCTL> exit

查看监听器状态
[oracle@oradb /oracle]$ lsnrctl
LSNRCTL> status
LSNRCTL> exit

到此,您已经完成了oracle的全部安装

4、安装mysql
mysql数据库的安装相对比较简单,只有使用网上下载的rpm安装包就能自动安装
进入rpm包所在的目录后运行下列命令
#rpm -hiv ./mysql-3.22.27-1.i386.rpm
#rpm -hiv ./mysql-devel-3.22.27-1.i386.rpm
#rpm -hiv ./mysql-client-3.22.27-1.i386.rpm
这样,您就完成了mysql的安装,系统并自动启动了mysql服务,您可以直接敲入mysql便能进行sql操作了;

5、安装tomcat
tomcat的安装也比较容易
#cd /usr/local
#tar -zxvf ./jakarta-tomcat.tar.gz
这样您就完成了tomcat的安装,下面进行测试
#cd /usr/local/jakarta-tomcat/bin
#./startup.sh start (start参数用来启动tomcat,您可以加上stop来停止tomcat服务)
#lynx http://localhost:8080
如果您看到了tomcat的欢迎信息,表示tomcat已经正常运行了!

6、安装gd库
进入gd183.tar.gz所在目录
#tar -zxvf ./gd183.tar.gz
#cd gd183
#./configure –prefix=/usr/local
#make
#make install
提示:在make过程中可能会提示错误:找不到文件/usr/local/include/gd.h,您可以自己建立include目录,并拷贝文件
#mkdir /usr/local/include
#cp ./gd.h /usr/local/include/
这样就不会有错误发生,祝你好运!

7、安装apache和php4
我把apache和php4的安装放在一起安装,是因为他们之间有部分东西是需要在安装过程中一起设置的;
将apache和php的gz文档拷贝到/www目录下(以下操作全部使用root用户)
#cd /www
#tar -zxvf ./apache_1312.tar.gz
#tar -zxvf ./php-404.tar.gz
#cd /www/apache_1.3.12
#./configure –prefix=/www
#cd /www/php_404
#configure –with-apache=../apache_1.3.12 –with-gd=/usr/local –with-sybase=/sybase
–with-oracle=/home/oracle –with-oci8=/home/oracle –with-mysql –enable-tarck-vars
#make
#make install
#cp ./php.ini-dist /usr/local/lib/php.ini
这样就完成了对php的配置和安装,下面继续安装apache
#cd /www/apache_1.3.12
#./configure –prefix=/www –enable-module=all –activate-module=./src/modules/php4/libphp4.a
#make
#make install
这样就完成了apache的安装,此时需要编辑/www/conf/httpd.conf文件,将对php4的支持部分注释去掉;

提示:启动apache服务使用/www/bin/apachectl start (sotp停止)

8、连接tomcat和apache
在安装挽tomcat和apache之后,您需要进行必要的设置,才能使tomcat和apache连接起来运行,使您的apache也可以支持jsp
#cp mod-jserv.so /www/libexec/
#cp /usr/local/jakarta-tomcat/conf/tomcat.conf /www/conf/
#vi /www/conf/httpd.conf
加入:Include /www/conf/tomcat.conf一行到httpd.conf文件中

进行测试:#lynx http://localhost/examples 如果您看到了tomcat的页面,表示连接成功!^_^

四、系统测试
1、测试php
#cd /www/htdocs
#vi phpinfo.php

通过ie访问phpinfo.php,看返回信息是否正常

2、测试php和sybase的连接
#cd /www/htdocs
#vi sybase.php
[coolcode lang=”php”]

[/coolcode]

4、测试php和mysql的连接
#cd /www/htdocs
#vi mysql.php
[coolcode lang=”php”]

hello world

通过ie访问jsp.jsp,访问路径为http://your ip/examples/jsp/jsp.jsp,如果能看见hello world表示成功;

好了,祝各位好运,有任何问题请和我联系,很愿意和您交流!

0 thoughts on “在RedHat6.x上安装apache1.3.12 gd1.8.3 php4.04 tomcat sybase11.9.2 oracle8.1.6 mysql全攻略”

  1. cheap swimwear
    You’re sweaty, you’re dirty, you’re riddled with insect
    bites, and according to your date, you’ve never looked
    better. Hiking a hard trail during the day will bring you close and cuddling in a cool tent at night will bring you
    closer. See if you can angle the hike toward a
    secluded lake; swimsuits optional.. I am aware we had a friendly market environment so I not expecting this kind of
    return every year, but am hopeful we can continue to
    get a better return than those available in conventional income investments going forward.
    I also enjoy feeling a part of the process, as I enter all
    the trades and am able to use Richard input as suggestions rather than hard and fast rules.
    Keep up the good work Richard..

    Sexy Bikini Swimsuit (So best pick it up used
    if you can.)Oh my goodness. Thank you so much. I didn realize it could be migrated breast tissue.
    I actually fitted some fatpack/bundles in my
    bag after purchasing them. As the others have said, the interior is adjustable,
    so you can make it snug, and they will not fall out at all.
    However, because of their size, they go to the bottom of the backpack, unless
    you change the interior layout some.. Sexy Bikini Swimsuit

    one piece swimsuits It might sound simple but these days all too often the bedroom has become
    a multi functional room. If you have trouble relaxing at the
    end of the day and dropping off to sleep easily
    then take a look around your bedroom. Do you use your computer in the room, watch TV, read?
    If the answer is yes then try removing these distractions
    for a short period of time, say one month.. Pageant hair:
    You’ll need to purchase a wig, a wiglet, a fall, or a mini
    fall. Get one made of real human hair. Your coach can offer suggestions on how best to “do” your
    child’s hair. one piece swimsuits

    one piece swimsuits Vampire: Thanks to the recent craze, vampires are hot.
    Sporting a Dracula costume dazzles for two reasons, according
    to Eden: 1) You can use your own clothes for an easy, affordable look and 2) The
    long cape and black and red color scheme (red in the cape, not on your fake fangs) are a killer combo for a leaner appearance.
    “Black is slimming for anybody,” Eden says.
    I decided to recruit a man walking on the other side of the street
    to lift this man up. He looked at me kind of
    weird and I probably came off as paranoid but I don care.
    The man on the sidewalk ended up being innocent enough, and just went
    on his way. one piece swimsuits

    one piece swimsuits One Piece wasn a timeskip so much as
    the first chapter was a preemptive flashback to give Luffy
    origin story. This series already had jumped right into its first mini training arc (stacking coins) and then skipped four years just so we
    wouldn have to see the kid progress from scratch. I hoping
    it will be good, but I nervous he progressing too fast for the series
    to deliver the proper impact. As for second, maybe Salieri?
    His first ascension takes a lot of the reasons people might
    choose Mozart for this list but then makes them EDGY.

    Then it turns out he got some serious dress sense +
    white hair. Add some vaguely Christian looking symbolism, sick classical
    music and god tier voice acting and he like the best freaking thing ever..
    one piece swimsuits

    wholesale bikinis I am reading this, and thinking I am normal
    after all, there are other mothers who think like
    me. Infact I swear that some manufacturers of children clothing are doing adult clothing too and to cut cost they just get 1 design and its made for both children and adults.
    That why all those adult like clothes are being paraded for the mini me and you of tomorrow,so sad.
    Both gladiators (I only have two players) were at 1
    and 3 HP respectively at the end. But they
    won! And both said it was the most epic battle they ever been in. Tonight we move
    on to an encounter in this book most likely, but maybe not..
    wholesale bikinis

    Cheap Swimsuits We are also very delighted to welcome Craig Menear in his first conference
    as Chairman, CEO and President of the organization. Craig has been the CEO for slightly less than a year.
    He has been President of the company for about
    a year and a half. Which then brings us to the next, very important, pointthe delivery of the material.
    Let’s take an exampletake one of the jokes you heard the last time
    you saw a comedy act. Would that joke be just as funny if one of the most boring people
    you knew told it? That’s where the talent of the comedian comes into the picture Cheap Swimsuits.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image