Java Web project in Linux deployment, launch common Linux command summary

Source: Internet
Author: User
Tags gz file java web

This article for Bo Master original, without permission not reproduced:

The following is a summary of the Linux commands that are commonly used at work, mainly in Project installation and startup, and when editing deployment files.
A 1.gz file is a compressed file.
The tar.gz extension is a compressed file that is common to Linux and OSX, and both Linux and OSX can be extracted directly using this compressed file.
Commonly used compression software under Windows WinRAR can also open gz files, equivalent to common RAR and zip formats.

1. Steps to Contract:
A. Configuring a configuration file in a project startup script
B. Compiling and compressing a project package
C. Packaging a project's compiled package with a configuration file as an installation package for a project


2. Commands commonly used when sending a contract:

1. Compression and Decompression commands
Unzip Bpc_install.zip

2.CD Directory Toggle Command
Ls-l
CD bpc_install/
Ls-l

2.5 Add permissions to the execution script (and modify the Tomcat port used for the project)
chmod 777 install.sh
or chmod +x install.sh

VI install.cfg

3. Execute the Project installation script
./install.sh


4. Execute the project run script
Su-bpc
CD apache-tomcat-8.0.32/bin/
./catalina.sh run&

Or:
CD apache-tomcat-8.0.32/bin/
./startup.sh

Viewing the boot log
tail-200. /logs/catalina.out


5. View Log command (exit user)
CD Apache-tomcat-8.0.32/logs
CD allcam/
Ls-l
Tail-f Global_stat


6. Stop the command (stop with the process number or use the user to stop it)
Su-bpc
Apache-tomcat-8.0.32/bin
./stopweb.sh

7. Editing commands
Save and Exit command-line commands
Do not save the direct Exit command

Use of the VI command:
Click on the "I" on the keyboard to enter edit mode
Click "ESC" on the keyboard to enter the command line mode
Then enter ": wq!" This saves the text. Then the VI editor is released.
Or:
Enter ": q!". If you are not sure if you are successful.
Can be viewed through the "Cat filename" command.
Enter any integer and enter "Shift+g" to the beginning of this page.
Press the uppercase "G" on the keyboard to move to the end of the article.



8. Query the Java process running on the server:
Ps-ef|grep Java

9. Query whether there is a project run or service based on the port
lsof-i:18080

10. Switch to the BPC user
Su-abc

11. Create a file or folder
Make Test

12. View command-line operation history
History

13. Find the My.png file
Find-name My.png

Find a file starting with April
Find-name april*

Cat has three main functions:
1. Display the entire file at once: Cat filename
2. Create a file from the keyboard: cat > FileName can only create new files and cannot edit existing files.
3. Merge several files into one file: Cat file1 file2 > file

15. Force a Delete command
RM-RF file A/folder B deletes A/b

16. Exit the user
Exit

17. Forcing the process to terminate:
Kill-9 Process Number

18. Connect the command:
SSH 110.16.20.110


Use of the. VI Command:
Click on the "I" on the keyboard to enter edit mode
Click "ESC" on the keyboard to enter the command line mode
Then enter ": wq!" This saves the text. Then the VI editor is released.
Or:
Enter ": q!". If you are not sure if you are successful.
Can be viewed through the "Cat filename" command.
Enter any integer and enter "Shift+g" to the beginning of this page.
Press the uppercase "G" on the keyboard to move to the end of the article.


20. View the current Linux system connection IP address:
Ifconfig-a


21. View the group to which the current user belongs:
Groups


22. View the owning group according to the user
Groups user Name


23.more Command Paging View file
More file names

Shortcut keys to use:
CTRL+F Scroll down one screen

Space bar scroll down one screen

Ctrl+b Back to previous screen

24. Clear the screen command:
Clear (automatically pushes the current content upward)

Shortcut key: ctrl+l (lowercase L)


25. Delete command:
Rm-f file name A (force deletion of file name a)

26.CP: Copying files
CP-RF: Copying Files or folders
EXAMPLE:CP-RF a folder B folder to copy A to the B folder

Add:

To view system configuration commands:

Date: Displays or sets the system date and time Date-s string
Example:date Direct display of the current system time
Date-s Time 2 Change the system time to time 2

Top: View the load of the system running

Uptime system operating Load conditions

Free: Used to view memory usage, size Unit b
FREE-M: Display Memory size W

Uname: Viewing System Information
Uname-a: View System Detail information

Hostname: View host Name

Who, WhoAmI: see who is currently logged in

Java Web project in Linux deployment, launch common Linux command summary

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.