Linux Enterprise operational efficiency tips and sharing

Source: Internet
Author: User
Tags php server tar unzip tomcat server

Original works, allow reprint, please be sure to use hyperlinks in the form of the original source of the article, author information and this statement. Otherwise, the legal liability will be investigated. http://wgkgood.blog.51cto.com/1192594/1641247

With the rapid application of Linux in the enterprise, in order to better operations in the enterprise, familiar with the daily operation and maintenance of the skills to better meet the development of the enterprise, at the same time let our operations more relaxed, no longer feel that operation is hard to live, really go to training to grow to hone.

Let our operation is more "lingering", let our life more beautiful. Through the study of this course, I will share my experience and experience in daily operations to everyone, so that we can get real knowledge, and then apply in their own operation and maintenance work.

So what do we need to pay attention to:

1) Linux Industry goals

We have to understand the purpose of learning Linux operations, I believe that everyone is to find a very good job, a high-paying job, continuous practice, and constantly grow.

By working to make our lives more complete and fulfilling.

2) Linux Learning route

After we understand our big goals, we need to break down our big goals, and then we are really going to act, to work towards small goals, what are the small goals?

Basic knowledge of computer--Hardware understanding->windows System daily Operation->linux System Getting Started->linux directory and Permissions learning->linux Prerequisites 20 Commands (LS pwd CD cat useradd Groupadd RM CP chown chmod VI find grep ps free top sed awk If-case WC yum rpm tar unzip more head tail etc.)

->linux Simple Server Building (master tar common file decompression methods, master the method of installing software:

Yum Install mode installation, source code compilation installation Three steps, configure, make, make install)

->apache Service Construction->mysql Service build->php server build->lamp Architecture Integration Discuz Forum->kickstart automation System installation->CACTI monitoring deployment Shell scripting (including learning from various statements, if for awk for while SED etc)->linux Advanced Server build->nginx Web server build->tomcat Server build->resin Server Build- >nginx Balanced Java Server->LNMP architecture (yum/source)->nginx Static and dynamic separation->lvs+keepalived load Balancing Deployment->lvs+keepalived+nginx+ Automated Operations Learning (KVM, Puppet, ZABBIX, Ansible, MYSQL+DRBD, etc.), advanced shell authoring, Tomcat balanced architecture deployment

3) Editor Command tips

Familiar with command line and VI editor search, match delete, jump and so on, such as the shell command line Ctrl +a jump to the front, CTRL +e jump to the end.

Inside the VI Editor:

Shift + ^ Jumps to the beginning, SHIFT + $ jumps to the end.

Match/word characters, delete the character of the cursor by X, jump to the last line of text press G, jump to the first line of text by GG.

Also delete the cursor line to the last line of text: DG

Delete the cursor line to the first line of text: DGG

4) System Operation status Monitoring

You can use Free–m to see the amount of memory remaining, usually

1 -/+ buffers/cache:        881        112(该值大约为真实内存值)

can use Df–h to see TMPFS memory file system, speed up static files and pictures:

To view the local network card traffic tips:

1 yum installiftop -y

Iftop-i eth0 View results such as:

1234567 中间<= =>这两个左右箭头,表示的是流量的方向。TX:发送流量。RX:接收流量。TOTAL:总流量。Cumm:运行iftop到目前时间的总流量。peak:流量峰值。rates:分别表示过去 2s 10s 40s 的平均流量。

To view disk IO Load tips:

Vmstat 1 5 (output per second, total output 5 times)

R: Number of processes in the running queue

B: Number of processes waiting for IO

Memory (RAM):

BI: Number of blocks read per second

Bo: Number of blocks written per second

WA: Waiting for IO time

Note * Generally determine whether the system load is too high, IO disk read and write is super, we can view the time of R, B and WA, of course, the smaller the table is the performance resources and a lot of surplus, if too large, we need to see what the operation caused.

You can combine Iostat view to make it easier to determine if disk reads and writes cause IO to be high.

Generally judge the value of%util, if it lasts more than 75%, you need to pay attention to, check the service is abnormal access, and then go to one by one to resolve.

Service Background Startup:

Common programs that run in the background are mainly:

Screen background run:

Execute screen enter at the command line, enter a random screen background, you can enter a command, and then press CTRL +a+d save to exit, then the program is running in the background.

Screen–ls can view the current running screen background list, perform screen–r plus PID can enter the corresponding background, again exit also need to press Ctrl+a+d

How you want to remove screen requires that you execute kill-9 3215 and then execute screen-wipe to delete it.

In addition to screen, we can also use Nohup to run the program in the background:

1 nohupsh  auto_nginx.sh &

That is, the program is already running in the background, you can view the current directory Tail–fn Nohup.out can see the program execution information, if need to end the direct kill process is OK.

Of course, there are more skills, the latter will give you to communicate and discuss, continue to share.

This article is from the "Wu Guangko-Keio Linux Operations Training" blog, please be sure to keep this source http://wgkgood.blog.51cto.com/1192594/1641247

Linux Enterprise operational efficiency tips and sharing

Related Article

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.