Redhat Install Apache + gd1.8.3 + php4 + tomcat + sybase + Oracle + MySQL Golden Raiders

Source: Internet
Author: User
Tags connect mysql mysql connect variables sybase sybase client sybase database oracle database
Apache|mysql|oracle| Raiders to see many online users of PHP, JSP, Sybase, Oracle, Apache and other aspects of the installation experience, found that many are repetitive and not comprehensive, According to my long-term summary of all kinds of dongdong and reference documents as well as users of the article, and by their own practice, is now under the RedHat6.2 apache1.3.12+gd1.8.3+php4.04+tomcat+sybase11.9.2+ ORACLE8.1.6+MYSQL3.22.27 installation configuration All dedicated to everyone, hope to be helpful to everyone;

Operating environment: PⅢ550+256M+20G+530TX lan+sis6326 8m+redhat Linux6.2
Installation planning: Sybase installed in the/sybase directory
Oracle installed in/home/oracle directory
GD installed in the/usr/local directory
Apache installed in the/www directory
Tomcat installed in/usr/local/jakarta-tomcat directory
JDK installed in/usr/local/jdk122 directory

I. Information preparation
1, apache_1312.tar.gz
2, php-404.tar.gz
3, jakarta-tomcat.tar.gz
4, sybase11.9.2 Package:
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 Package:
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

Second, the Environment configuration
1. System Installation
When installing Linux systems, create directories/www,/sybase, and/home and allocate them to larger spaces for storing database data and Web page files;
2. Environment variable
Configure Java Run-time environment variables to run Oracle and Tomcat and Java
Log on to the system with the root user
#vi/etc/profile
Add the following line
Oracle_home=/home/oracle
Export Oracle_home

Java_home=/usr/local/jre
Export Java_home

Oracle_sid=dblee (here Dblee can be changed to the name you want to use)
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
Exit re-logon is set to take effect

Third, file installation
1, Sybase installation
If you have Sybase's installation CD, you can install it graphically in the Linux graphical interface, Sybase provides the installation wizard under the graphical interface
This paper adopts the manual RPM package installation;
(1) Log in as root user
(2) in Sybase's various RPM packages, you must first install the SYBASE-COMMON-1192-1I386.RPM package, which is the necessary content for other packages to run
#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
This completes the installation of the Sybase component, which requires database creation and the necessary configuration to run
(3) Set permissions on directory files
#chown-R Sybase/sybase
#chgrp-R Sybase/sybase
(4) Set up Sybase user password
#passwd Sybase
(5) Exit the system, with Sybase user login, the system will give a hint, select N and enter;
(6) Create a directory where Sybase database files exist
#mkdir/sybase/data
(7) Create and run the two files needed in the/sybase/bin directory
Edit srvbuild.adaptive_server.rs and srvbuild.backup_server.rs files
Examples of srvbuild.adaptive_server.rs files are as follows:
Sybinit.release_directory:/sybase
Sybinit.product:sqlsrv
Sqlsrv.server_name:kevin_sybase (This is set to the Sybase database service name you want to use)
Sqlsrv.new_config:yes
Sqlsrv.do_add_server:yes
Sqlsrv.network_protocol_list:tcp
sqlsrv.network_hostname_list:192.168.18.19 (set to your server IP address here)
sqlsrv.network_port_list:4000 (port used by Sybase database)
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:KEVIN_SYBASE_BK (This is set to the backup service name for your Sybase database)
Examples of srvbuild.backup_server.rs files are as follows:
Sybinit.release_directory:/sybase
Sybinit.product:bsrv
BSRV.SERVER_NAME:KEVIN_SYBASE_BK (This is set to the backup service name that is set up at the door)
Bsrv.do_add_backup_server:yes
Bsrv.network_protocol_list:tcp
bsrv.network_hostname_list:192.168.18.19 (IP address of server)
BSRV.NETWORK_PORT_LIST:4100 (the port used by Sybase backup server)
Bsrv.language:USE_DEFAULT
Bsrv.character_set:USE_DEFAULT
Bsrv.tape_config_file:USE_DEFAULT
Bsrv.errorlog:USE_DEFAULT

(8) Create the database (the current user is still Sybase)
#cd/sybase/bin
#./srvbuild-r./srvbuild.adaptive_server.rs
#./srvbuild-r./srvbuild.backup_server.rs
After the run is complete, two new files will be generated in the/sybase/install directory Run_kevin_sybase and RUN_KEVIN_SYBASE_BK
To this end, the Sybase database installation and configuration, as well as the creation of the database has been completed;
(9) Start the database (the current user is still Sybase)
#cd/sybase/install
#./startserver-f./run_kevin_sybase
#./startserver-f./RUN_KEVIN_SYBASE_BK
When you see some prompts, if you do not report an error, the database has been started, you can run the./showserver view in the current directory.
#./showserver
will return the currently running Sybase database service, which should normally be two services, adative and backup respectively;
By this, your Sybase database has been fully installed and you can use the Sybase client or PowerBuilder tools to pass your
Server IP and Port 4000 access Sybase database;
(10) Experience Tips
If you have an error in step 8th or 9th, check that your machine network settings are normal and that your server IP address can be
Ping on this machine, can not be ping localhost, must be ping your IP success, this is Kevin has been experimenting for an afternoon time
Just discover the secret yo! ^_^


2. Install JDK
#cd/usr/local
#tar-ZXVF jdk1_2_2-linux.tar.gz
#ln-S jdk122 JDK
#ln-S Jdk122/jre JDK
This completes the installation of the JDK

3. Installation oracle8.1.6
The setting of environment variables and the installation of JDK must be completed before Oracle is installed
[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用户

Note: Oracle groups and Oracle users are required for Oracle installation
Note: After the Oracle user is created, the Linux system automatically creates the/home/oracle directory under the/home directory for use by Oracle users.
Oracle users have all the permissions on this directory,
For convenience, this example installs the Oracle system in the Oracle user's own directory
[root@oradb/oracle]$ exit #退出 to log on as an Oracle user (all of the following operations are Oracle users)
[oracle@oradb/oracle]$
[Oracle@oradb/oracle]$ ls-l
[oracle@oradb/oracle]$ tar zxvf oracle8161_tar.gz #解压oracle压缩包到当前目录
[Oracle@oradb/oracle] $mv oracle8ir2 orainst #为了写起来方便, I renamed the directory, you can not change
[oracle@oradb/oracle]$ startx #启动X-windows, enable one terminal (Xterm), (graphics window)
#在该终端中运行runInstaller
[oracle@oradb/oracle]$ CD Orainst
[oracle@oradb/orainst]$./runinstaller #执行oracle安装程序, Linux executes a program that is available./Call execution


At this point you can see the new graphical oui Welcome screen running with the JRE and follow the prompts to continue the installation process:
Welcome:
Press Next

File Locations:
Press Next

UNIX Group Name:
Don't add anything, press Next
Error, prompt to run with root permissions "/home/oracle/orainstroot.sh

CTRL+ALT+F2, open a new console (character window)
Log in as Root
[Root@oradb/root]$ cd/home/oracle
At this point, the/home/oracle/directory has only one file orainstroot.sh, run it
[root@oradb/oracle]$ SH orainstroot.sh

Ctrl+alt+f7, back to the Installation Interface (graphics window)
Press the Retry button and you can continue with the installation.

Available Products:
Select Oracle8i Enterprise Edition 8.1.6.1.0, press Next

Installation Types:
Select Typical (540MB) and press Next when a progress ruler appears in the upper-right corner of the screen

Database Identification:
Global Database Name: Input Oracle8 (optionally)
SID: Preserve ORCL
Press Next

Database File Location:
Any directory, this example is set to "/home/oracle/", press Next, when the progress ruler in the upper right corner of the screen continues to move forward

Appear summary, make a summary of the products you want to install
Press install, appear install picture, wait ... You can see the windows at the bottom of the installation and other log file directory, available for later inquiries.

Eject the Setup Privileges window
Tip: You need to run a script "/home/oracle/root.sh" with root before the installation continues.
Ctrl+alt+f2, go back to the 2nd terminal window that just ran
Execute the file as root,
[root@oradb/oracle]$ SH root.sh

Screen display:
Enter the full pathname to the local bin Directory:[/usr/local/bin]:c
Enter
The system starts to perform some actions, completes, Ctrl+alt+f7 presses returns OUI, presses OK.

The Database creation progress begins with the following 4 steps
Creating and Starting Oracle instance
Copying database files
Initializing database
Database Creation completed

The above 4 procedures are complete, and the Oracle Database Configuration Assistant Alert window pops up,
Hint: Database creation complete, tell you some basic information about the database
Global Databse Name:oracle8
Database system identifier (SID): ORCL
SYS Account Password:change_on_install
SYSTEM Account Password:manager
Press ok

End of installation, Exit Oui by exit, complete installation.

Exit the graphics window and return to
[oracle@oradb/oracle]$

At this point, the Oracle database has been installed successfully, and the database has been started to run, you can try
[Oracle@oradb/oracle] $sqlplus System/manager

The following information appears:
Sql*plus:release 8.1.6.0.0-production on Fri Oct 26 20:20:56 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


To start a database:
[Oracle@oradb/oracle]$ SVRMGRL
Svrmgr> Connect Internal
Connected.
Svrmgr> Startup
ORACLE instance started.
Show SGA Status
Database mounted.
Database opened.
Svrmgr>


To close the database:
[Oracle@oradb/oracle]$ SVRMGRL
Svrmgr> Connect Internal
Connected.
Svrmgr> Stutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
Svrmgr>


Start the Listener
[Oracle@oradb/oracle]$ Lsnrctl
Lsnrctl> start
Lsnrctl> exit

Stop Listener
[Oracle@oradb/oracle]$ Lsnrctl
Lsnrctl> stop
Lsnrctl> exit

Viewing listener status
[Oracle@oradb/oracle]$ Lsnrctl
lsnrctl> status
Lsnrctl> exit

To this end, you have completed the installation of Oracle


4, install MySQL
MySQL database installation is relatively simple, only the use of online download the RPM installation package can be automatically installed
Run the following command after entering the same directory as the RPM package
#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
In this way, you have completed the installation of MySQL, the system and automatically started the MySQL service, you can directly typing MySQL can be a SQL operation;


5. Install Tomcat
The installation of Tomcat is also relatively easy
#cd/usr/local
#tar-ZXVF./jakarta-tomcat.tar.gz
This completes the installation of Tomcat, and the following tests
#cd/usr/local/jakarta-tomcat/bin
#./startup.sh start (the start parameter is used to start Tomcat, you can add stop to stop the Tomcat service)
#lynx http://localhost:8080
If you see Tomcat's welcome message, it means Tomcat is working!

6. Install GD Library
Enter the directory where gd183.tar.gz
#tar-ZXVF./gd183.tar.gz
#cd gd183
#./configure--prefix=/usr/local
#make
#make Install
Tip: Error may be prompted during make: File/usr/local/include/gd.h is not found, you can create your own include directory, and copy files
#mkdir/usr/local/include
#cp./gd.h/usr/local/include/
So there will be no mistakes, good luck!


7. Install Apache and PHP4
I put Apache and PHP4 installed together because there is something between them that needs to be set up together during the installation;
Copy Apache and PHP gz documents to the/WWW directory (use root for all of the following actions)
#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
This completes the configuration and installation of PHP, and continues to install Apache
#cd/www/apache_1.3.12
#./configure--prefix=/www--enable-module=all--activate-module=./src/modules/php4/libphp4.a
#make
#make Install
This completes the Apache installation, at this time need to edit the/www/conf/httpd.conf file, will PHP4 support part of the comments removed;

Tip: Start the Apache service using/www/bin/apachectl start (SOTP stop)


8. Connecting Tomcat and Apache
After you install WAN Tomcat and Apache, you need to make the necessary settings to enable Tomcat and Apache to be connected to run so that your Apache can also support JSP
#cp mod-jserv.so/www/libexec/
#cp/usr/local/jakarta-tomcat/conf/tomcat.conf/www/conf/
#vi/www/conf/httpd.conf
Add: include/www/conf/tomcat.conf line to httpd.conf file

To test: #lynx http://localhost/examples If you see the Tomcat page, it means the connection is successful! ^_^


Iv. System Testing
1. Test PHP
#cd/www/htdocs
#vi phpinfo.php
Phpinfo ();
?>
Access phpinfo.php through IE to see if the return information is normal

2. Test the connection between PHP and Sybase
#cd/www/htdocs
#vi sybase.php
$conn =sybase_connect ("Kevin_sybase", "sa", "");
if ($conn)
{
echo "Sybase Connect successfully!";
}
Else
{
echo "Sybase Connect failed!";
}
Access sybase.php through IE, see return information

3. Test the connection between PHP and Oracle
#cd/www/htdocs
#vi oracle.php
$conn =ocilogon ("SCOTT", "TIGER", "Dblee");
if ($conn)
{
echo "Oracle connect successfully!";
}
Else
{
echo "Oracle connect failed!";
}
?>

4, test the PHP and MySQL connection
#cd/www/htdocs
#vi mysql.php
$conn =mysql_connect ("localhost", "root", "");
if ($conn)
{
echo "Mysql Connect successfully!";
}
Else
{
echo "Mysql Connect failed!";
}
Access mysql.php through IE, see return information


6, the test JSP operation
#cd/usr/local/jakarta-tomcat/webpages/examples/jsp/
#vi jsp.jsp

Hello World

Through IE access to jsp.jsp, access path for Http://your ip/examples/jsp/jsp.jsp, if you can see Hello World to express success.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.