LinuxJ2EE installation Configuration

Source: Internet
Author: User
LinuxJ2EE installation configuration-Linux Enterprise Application-Linux server application information. For more information, see the following section. Describes in detail the installation and configuration of J2EE 1.4 application Server for Linux. It is worth learning.

By Jawa From LinuxAID Forum

① Full installation using RedhatLinux 9 Personal Simplified Chinese version (5 GB ),

After installation, MySQL 3, Mozilla 1.2.1, and other software have been installed in Linux. This description is applicable to the original MySQL that comes with Linux and does not require MySQL installation. To automatically load the above software and enable necessary ports when the system starts, log on with the root user and run setup:

1. Select Firewall Configuration, Customize, www (http), and exit.
In this way, the system can enable the http port 80 function. (It must be selected)

2. select Network Configuration, enter the corresponding Network address (for example, 192.168.1.11) in IP addres, and fill in the corresponding mask (for example, 255.255.255.25 5.0) in Netmask ), confirm and exit. In this way, the system has a fixed IP address.

3. In this tutorial, if the Apache server is not used in Linux, select System Services (System Service), do not select the [] httpd item, and then exit.
In this way, the system will not automatically start Apache Software at the next startup.

4. If you use the original Linux MySQL database, select Mysqld (System database), select mysqld, and exit.
In this way, the MySQL software can be automatically started at the next startup.


② Development and application software:

1. RedHat Linux 9.0 Simplified Chinese Personal (RedHat Linux operating system)

2. Java 2 Platform, Enterprise Edition 1.4 (Sun's Enterprise-level Java application Server [includes J2SE SDK 1.4.2 and Web Server])

3. MySQL 4.0.17 (MySQL Database Management System)

4. MySQL Connector/J 3.0.10 (MySQL JDBC driver)

5. James 2.1.3 (Apache e-mail server)

6. Mozilla 1.6 (Mozilla Web browser)

7. MySQL version 0.9.4 (MySQL Database Control Center)

8. j2-midp 1.0 (j2-mobile device profile)

9. j2-cldc 1.0)

10. j2-wireless Toolkit 1.0 (j2-wireless Device Development Kit)

③ Download the main software:

1. j2eesdk-1_4-dr-linux-eval.bin download at http://java.sun.com/j2ee/1.4/download-dr.html.

2. mysqlcc-0.9.4-linux-glibc23.tar.gz download at http://www.mysql.com.

3. mysql-standard-4.0.17-pc-linux-i686.tar.gz download at http://www.mysql.com/downloads.

4. mysql-connector-java-3.0.10-stable.tar.gz download at http://www.mysql.com/downloads.

5. The mozilla-i686-pc-linux-gnu-1.6-sea.tar.gz is downloaded at the http://www.mozilla.org.

6. james-2.1.3.tar.gz download at http://james.apache.org.

④ Main software installation:

1. Install J2EE SDK 1.4:

1) # cp j2eesdk-1_4-dr-linux-eval.bin/usr/local // copy the j2ee sdk 1.4 to the/usr/local directory.

2) # cd/usr/local // enter the directory.

3) #./j2eesdk-1_4-dr-linux-eval.bin
// Run the program, and the system will automatically install it on/opt/SUNWappserver
Directory, enter admin and its password, Admin Port: 4848, HTTP Port: 80,
HTTPS Port: 1043, select "Don't Prompt for Admin User Name ",
If you encounter "xxxx Port may be in use. Specify a different Port ",
Indicates that this port is being used. Change it to another port number.
(Including J2SE SDK 1.4.2, Application un ONE Message Queue 3.5, PointBase Server 4.6)

2. mysql 3 setup and installation:

Log on as the root user. In the setup System Services (System Service) item, select the mysqld item and click OK to exit. The system automatically starts the MySQL software.

# Mysql_install_db // create a mysql authorization table during the first run

Add the following to the/etc/rc. d/rc. local file:

# Mysql-u root mysql // use the root user to enter MySQL and open the mysql database

Mysql> set password for root = PASSWORD ('Password ');




You must use the "# MySQL-uroot-p password" method to access mysql later.

3. Install mysqlcc:

# Cp mysqlcc-0.9.4-linux-glibc23.tar.gz/usr/local

// Copy mysqlcc 0.9.4 to the/usr/local directory.

# Cd/usr/local

# Tar-xvzf mysqlcc-0.9.4-linux-glibc23.tar.gz

// Decompress this file and automatically generate the/usr/local/mysqlcc-0.9.4-linux-glibc23 directory.

// Run the/usr/local/mysqlcc-0.9.4-linux-glibc23/mysqlcc file in the KDE environment,

/To execute the MYSQL console program.

# Ln-s/usr/local/mysqlcc-0.9.4-linux-glibc23 mysqlcc // generate a connection shortcut directory




4. MySQL Connector/J is easy to install:

Just decompress mysql-connector-java-3.0.10-stable.tar.gz to find the mysql-connector-java-3.0.10-stable-bin.jar file and copy it to the/opt/SUNWappserver/lib directory.

5. Install James:

# Cp james-2.1.3.tar.gz/usr/local

// Copy james-2.1.3.tar.gz to the/usr/local directory.

# Cd/usr/local

# Tar-xvzf james-2.1.3.tar.gz

// Decompress this file and automatically generate the/usr/local/james-2.1.3 directory.

# Ln-s/usr/local/james-2.1.3 james

// Generate a connection shortcut directory.

# Cd/usr/local/james/bin

# Chmod + x run. sh

// Change the properties of the run. sh file.

# Chmod + x phoenix. sh

// Change the properties of the phoenix. sh file.




⑤ Main software configuration: (Note: The following configuration files can only be edited by running the vi software on the command line to remove unnecessary blank lines, in particular, the "^ @" and other characters at the end of the line must be cleared !)

1. # vi/etc/profile edit the system environment configuration file and add the following lines:

PATH = $ PATH:/opt/SUNWappserver/jdk/bin:/opt/SUNWappserver/bin:/usr/local/james/bin

Export PATH

 

JAVA_HOME =/opt/SUNWappserver/jdk

Export JAVA_HOME




 

2. # vi/etc/bashrc edit the system automatic batch file and add the following lines:

Run. sh

// The james service is also started when the system starts. Note: POP3 (110), SMTP (25), IMAP (143 ),

// NNTP (119), Sockets (1024), and Telnet (4555) cannot conflict.

/Opt/SUNWappserver/bin/asadmin start-domain domain1

// Start the J2EE Application Server service when the system is started.

// Note: stop the service/opt/SUNWappserver/bin/asadmin stop-domain domain1




Note: The preceding configuration files can only be edited by running the vi software on the command line to remove unnecessary blank lines. In particular, the characters such as "^ @" at the end of the line must be cleared !, Otherwise, the J2EE Application Server cannot be started normally.

3. The domain. xml and default-web.xml files under the/opt/SUNWappserver/domains/domain1/config directory can be modified:

......

4. after installation and configuration, You need to restart Linux. When you enter Linux again, the system automatically starts J2EE Application Server, James, and MySQL, vi/opt/SUNWappserver/domains/domain1/logs/server can be used. log to view the startup status.

6 main software usage:

1. J2EE Application Server:

1) Executable Directory:/opt/SUNWappserver/bin.

2) J2SE SDK Directory:/opt/SUNWappserver/jdk.

3) User Web root directory:/opt/SUNWappserver/domains/domain1/docroot.

4) Public class library Directory:/opt/SUNWappserver/lib.

5) User class library Directory:/opt/SUNWappserver/domains/domain1/docroot/user Web directory/WEB-INF/classes.

6) configuration file: domain. xml and default-web.xml in the/opt/SUNWappserver/domains/domain1/config directory.

7) store the Servlet files automatically compiled by the user's JSP:

/Opt/SUNWappserver/domains/domain1/generated/jsp/j2ee-modules/default-web-module-server/org/apache/jsp/user Web directory name /.

8) Super User Management Interface: http: // localhost: 4848/asamin/index.html.

9) Note: when the public class library changes, you need to restart the J2EE Application Server.

2. MySQL:

1) MySQL database backup: # mysqldump database name [| gzip]> Taobao file name. GZ] (for example, *. SQL)

2) MySQL database recovery:

# Mysql-u root

Mysql> create database name;

Mysql> quit

[# Tar xvzf extension file name .gz] (for decompression)

# Mysql database <backup file name (e.g.: *. SQL)




3) delete a MySQL database: mysql> drop database name;

4) delete a MySQL database table: mysql> drop tables Table Name;

5) delete MySQL database records: mysql> delete from table name where field name [= | <|>] value;

6) query of MySQL database records: mysql> select field list from table name where field name [= | <|>] value order by [DESC | ASC];

7) MySQL database usage: mysql> use Database Name;

8) MySQL database display: mysql> show databases;

9) MySQL database table display: mysql> use Database Name;

Mysql> show tables;

10) MySQL database version: mysql> select version ();

11) MySQL database permissions:

# Mysql-u root // Add or modify the password for the root user

Mysql> use mysql;

Mysql> set password for root = PASSWORD ('Password ');


     

12) Your MySQL database should be stored in the directory of/var/lib/mysql/user database name.

13) the/etc/my. cnf file is a mysql configuration file that contains the username and password of the database.

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.