Deploying Java projects on Linux

Source: Internet
Author: User

Deploy a Java project on Linux to see the running status of Tomcat
| grep java

Or check the port occupancy, the specific port to see its own configuration

| grep 8080

Start and close

 打开 ./startup.sh 关闭 ./shutdown.sh
To view the running status of MySQL
/etc/init.d/mysqld status#已添加到系统服务,以下命令可以查看service mysqld status

or filter the process name or port (refer to your own settings)

| grep mysqld| grep 3306

Start MySQL

start或者: /etc/init.d/mysqld start

Login

mysql –uroot –p123456(123456-p(回车,然后输入密码)

The terminal in MySQL

show processlist
Deployment steps

Put Maven's war package in Tomcat's WebApps directory and start Tomcat.

Common sense:

    • Jar Java Archive file--contains content: Class, properties file, which is the smallest unit in file encapsulation
    • War Web Archive file--contains content: Servlets, JSP pages, JSP tag libraries, jar library files, html/xml documents and other common resource files, slices, audio files, etc.
    • Ear Enterprise Archive file--contains content: In addition to containing jars, wars, including EJB components
Some other settings
    1. Set JDK version
      Set the global JDK build version in the MAVEN installation directory of Conf/setting.xml, in the <profiles> node
<profile >    <ID>Jdk17</ID>    <activation>        <activebydefault>True</activebydefault>        <jdk>1.7</jdk>    </activation>    <properties>        <maven.compiler.source>1.7</maven.compiler.source>        <maven.compiler.target>1.7</maven.compiler.target>        <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>    </Properties>   </profile >

Sets the current project-specific JDK version, in the current project's Pom.xml, under the Build node

    <build>        <finalname>DataService</finalname>        <plugins>            <plugin>                <groupId>Org.apache.maven.plugins</groupId>                <artifactid>Maven-compiler-plugin</artifactid>                <configuration>                    <source>1.7</Source>                    <target>1.7</target>                </configuration>            </plugin>        </plugins>    </Build>
    1. Publish your own jar package to the

To login, click on the left side of the repositories, select a warehouse, select "Upload", you will see the widget upload interface. Select the widget you want to upload and specify the POM, and finally click Upload to finish.

Copyright NOTICE: Welcome to Exchange

Deploying Java projects on Linux

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.