Deploy and configure WEB apps in Linux and deploy webapps in linux

Source: Internet
Author: User

Deploy and configure WEB apps in Linux and deploy webapps in linux

Chen kichao

==============


Directory

1. Preparations

2. Import Application Data

3 Deployment

3.1 solution 1

3.2 solution 2

========================================================== ========================================


1. Preparations

Applications

Tianjin tobacco and cigarette sorting management system

Application Data

Dmp file (yc_tjyc20150204.dmp) to import the Oralcle Database)

2. Import Application Data

The Oracle database has been installed on the Linux operating system. Next we can import data to Oracle remotely.

Open the PL/SQL tool in Windows

Use a user with sysdba permissions to log on


(In this way, you do not need to configure DBLink for remote connection. That is to say, after the database on the server is installed, no configuration is required)

Successfully logged on!


Next, we will create a user for the data using the application.


Open Command Window

Run the following command to create a user:

SQL> create useryc_tjyc identified by yc_tjyc;

Grant dba permissions to the user:

SQL> grant dba toyc_tjyc;

For example, if I have created a yc_tjyc user, the following message is displayed, but the operation is not affected:


The rest is to import the application data to the yc_tjyc user.

Shortcut: Win + R, Enter cmd, OK

Or

Start-> Program-> attachment-> command prompt, open

In the command window, type the following command:

Imp yc_tjyc/yc_tjyc@10.22.1.222/orclfull = y file = e:/yc_tjyc20150204.dmp

Note: Export, available exp yc_tjyc/yc_tjyc@10.22.1.222/orcl owner = yfile = e:/yc_tjyc20150204.dmp

Press enter to import data.

After the import is successful, log on using PL/SQL

Note: you only need to remotely log on to PL/SQL without installing PL/SQL on the Linux operating system.


We use this method to connect

Successfully logged on to the yc_tjyc user!


3. Deploy solution 1 of 3.1

Note: The application Tomcat management APP can be deployed remotely. You can access the Tomcat Manager App through a browser to remotely upload and deploy the web app.

Start the Tomcat Service

Find the bin folder under the Tomcat installation directory and right-click to open the terminal (if you have configured parameters in the environment variable, you can open the terminal anywhere to execute the command ):


Run the Stop command first:

$./Shutdown. sh

Run the following command:

$./Startup. sh

This ensures that an error occurs during startup!


The Tomcat service is successfully started!

Next, open the browser in the Linux operating system, enter localhost: 8080 in the address bar, and press Enter.

The page is displayed. Click "ManagerApp" and enter the user name and password to log on.

The user name and password used here are adminadmin. It does not matter if you forget the password or user name.

You can go to the conf directory under the tomcat installation directory, find the tomcat-users.xml to configure




After logging on, go down and you will see this page. You only need to click "Browse ..." Select the web app that you typed into a war package, and click "Deploy" to Deploy it.


After successful deployment, you can see the name of the deployed project in the "Applications" list!

If an error occurs, go to the logs directory under the tomcat installation directory and find the file manager.2015-02-09.log to check the cause of the error.

Error message displayed in manager.2015-02-09.log:

Severe: org. apache. tomcat. util. http. fileupload. FileUploadBase $ SizeLimitExceededException: the request was rejected because its size (53891437) exceeds the configuredmaximum (52428800)

This indicates that the size of the uploaded deployment file exceeds the specified size, so the deployment fails!

We only need to modify a configuration file, the configuration file location: $ tomcat_home \ webapps \ manager \ WEB-INF \ web. xml


No. The maximum size is 50 MB, and you can modify it as needed.

Then it is changed to 100 MB, that is, 104857600

After modification, restart the tomcat server and perform the previous deployment operations.

Deployed successfully!

You can see the deployed application in the Applications list!


Next, click the "/tjycsort" field in the list to start the application or enter the address to access the application in the browser address bar.


3.2 solution 2

Note: manually deploy the web app to Tomcat

Directly put the war package of the web app program in the webapps under the Tomcat installation directory, and then start the tomcat service.

After the Tomcat service is started, you can start the application.

The process of starting an application is to enter the access URL in the browser address or enter the Tomcat Manager App to access it!

The process is similar to solution 1, but the method for deploying a WEBAPP is inconsistent!


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.