Knowledge about Linux and databases that Java developers should possess

Source: Internet
Author: User

Linux
Generally, large J2EE applications are built in a Linux environment. In the development environment, we can map the local network drive using Samba and perform programming and debugging in the Windows environment directly. However, the final release is still in the Linux environment. At the same time, we manage the applications of web servers and database servers (such as automatic script publishing) on the Internet ), application monitoring (whether the Web Service is normal, MySQL database usage), System Monitoring (Monitoring disk space usage, etc.) require programmers to familiarize themselves with the necessary Linux knowledge.
Of course, programmers do not have to be familiar with the entire Linux system. The following describes the basic Linux knowledge that programmers need based on their development experience.

I. Basic Linux commands
1. User Management
Userdel delete user account
Useradd Add User Account
Su changes the ID of the current user

2. File directory management
Ls browsing directory to view the files and file names under the current directory
Chmod
Chown changes the file owner
CP copy file
CD changes the current directory
MV rename a file or move a file
Rm deletes a file or directory
PWD Current Directory
SCP remote copy
Alias alias

3. Other commands
Ln establishes links between files
The part after the tail output file content. Generally, we can use tail-F to view the logs printed by the current program in real time.
Type to view the path of a command
WC
Search for grep in File Content
Find find file
Date view date
Crontab is used to prepare scheduled tasks, which are usually used for system monitoring.
DF to view the remaining disk space. You 'd better write a script in the crontab to monitor the disk space. If the number exceeds 90%, an email is sent to the relevant personnel.
PS view Process status
Top view CPU usage
Kill Process Termination
Killall Java programmers prefer killall-9 Java
W. Check the login user and what they are doing. You can also check the system load. The load is too high, so we should look for the reason.
Who to view the current user's convenience
Tar decompress Or compress the file
Echo console output
Wget HTTP access
RPM package management

4. redirection and Pipelines
5. Standard output and standard errors
6. Use/block the meaning of a special character
7. Regular Expression

2. Familiar with the vim editor.

Iii. Compiling shell scripts and Perl scripts in liunx Environment
To manage online server applications, you usually need to write some scripts.
The script compilation focuses on the following points:
1. Understand the meaning of double quotation marks, single quotation marks, and reverse quotation marks.
2. Use of backlash.
3. Do not add $ to the variable name on the left of the shell script value assignment statement. This error is often caused by Perl scripts.
4. the string is long and contains spaces. When it is used as a parameter, a script error occurs. Double quotation marks are used to enclose the string.
5. Master the usage of awk and sed.

Iv. Installation of basic software packages
Apache, resin, MySQL
The general steps are as follows:
Configure
Make
Make install

V. Related Websites
The following website is an excellent Linux website. You can check it out.
Http://www.linuxforum.net/

Database:

1. Understand basic database knowledge,
It includes paradigm and SQL statements, such as creating (tables, indexes), querying, deleting, updating SQL statements, and transactions.
2. Understand the significance of jdbc url Connection
For example, the jdbc url connection string of Oracle is JDBC: oracle: thin: @ IP: 1521: Sid.

3. Familiar with SQL statements.
For example, we use the most SQL statements for paging and time comparison. You can write SQL statements immediately.

4. Be familiar with the JDBC class and know when to use the following functions.
Preparedstatement
Executebatch

5. Master necessary database optimization knowledge.
It is almost the same for programmers to master the following three points.
(1) variables must be bound to SQL statements;
(2) create necessary indexes (when and what fields are recommended for indexes );
(3) Optimization of SQL statements will analyze the execution plan of SQL statements.

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.