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
- 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>
- 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