How to deploy a Javaweb project to Linux

Source: Internet
Author: User
Tags chmod tomcat
The following is a detailed analysis of the method of deploying the Javaweb project to Linux, the need for a friend to come to the reference

Typically developed under Windows, now deployed to Linux:
1, the project to reach the war package (with Eclipse, Project right key-->export--> Select War file)
2, will Tomcat (with WINSCP of course you can also use SECURECRT, with SECURCRT need to build sftp (that is, upload file directory), with the put Tomcat command) to the ilunx corresponding directory
3, and then put the war package of the project under Tomcat's WebApps directory
4, Start tomcat (command:./ (Start Tomcat under Linux is. sh file instead of. bat file))

Problems encountered are as follows:
run./ is an error.
-bash:./ denied
Reason: no permission to run. Sh
Solution: chmod 777 *.sh
Note: What does Linux chmod +755 and chmod +777 mean?
755 on behalf of the user on the file has read, write, execute permissions, the same group of other people have the right to execute and read, there is no write permission, the other user's permissions and the same group of people's permissions.
777 delegates, User,group, others, all have read-write and executable permissions.
Get permissions before running./ command times wrong:
This file was needed to run this program
Reason: The file requires a running environment (that is, configuring JDK environment variables)
Resolved: java_home=/usr/java/jdk1.6.0_25/(Of course this directory is installed according to its own JDK directory)
And then you run./STARTUP.SH Hint:
Using catalina_base:/usr/local/sarft/apache/apache-tomcat-6.0.29
Using Catalina_home:/usr/local/sarft/apache/apache-tomcat-6.0.29
Using Catalina_tmpdir:/usr/local/sarft/apache/apache-tomcat-6.0.29/temp
Using Jre_home:/usr/java/jdk1.6.0_25/
Using CLASSPATH:/usr/local/sarft/apache/apache-tomcat-6.0.29/bin/bootstrap.jar
If prompted, the above information indicates that Tomcat started successfully!
Done, run the project, normal running!

PS: This should belong to very elementary, but for me, after all, is the first time, from the discovery of problems, to solve the problem may be some. So special to share it!

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.