Linux Enterprise operational efficiency tips and sharing

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

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 required 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 Build -MySQL Service setup -PHP Server Setup -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 Setup -Nginx Web Server Setup -Tomcat Server Setup -Resin Server Setup -Nginx Balanced Java Server -LNMP structure Construction (yum/source) -Nginx Static and dynamic separation -Lvs+keepalived Load Balancing Deployment -Lvs+keepalived+nginx+tomcat Balanced Architecture Deployment -Advanced Shell Authoring -Automated Operations Learning (KVM, Puppet, ZABBIX, Ansible, MYSQL+DRBD, etc.)

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.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/49/wKiom1VDoRHgNS13AAEhDdvOO3M965.jpg "title=" 1.jpg " alt= "Wkiom1vdorhgns13aaehddvoo3m965.jpg" width= "680" height= "0" border= "0" hspace= "0" vspace= "width : 680px;height:300px; "/>

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

-/+ buffers/cache:881 112 (this value is approximately true memory value)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/45/wKioL1VDopCBAhrbAADtx2lCdOM632.jpg "title=" 2.jpg " alt= "Wkiol1vdopcbahrbaadtx2lcdom632.jpg" width= "680" height= "0" border= "0" hspace= "0" vspace= "width : 680px;height:300px; "/>

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

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/49/wKiom1VDoTKCBokwAAHFsP5LxiI921.jpg "title=" 3.png " alt= "Wkiom1vdotkcbokwaahfsp5lxii921.jpg" width= "680" height= "0" border= "0" hspace= "0" vspace= "width : 680px;height:300px; "/>

To view the local network card traffic tips:

Yum Install Iftop-y

Iftop-i eth0 View results such as:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6C/45/wKioL1VDoqWgx2j-AAE6U3o_2FA299.jpg "title=" 4.png " alt= "Wkiol1vdoqwgx2j-aae6u3o_2fa299.jpg" width= "680" height= "142" border= "0" hspace= "0" vspace= "0" style= "width : 680px;height:142px; "/>

Middle <= = These two arrows, indicating the direction of the flow. TX: Send traffic. RX: Receive traffic. Total: Overall traffic. Cumm: The total traffic running iftop to the current time. Peak: Traffic spikes. Rates: Represents the average traffic for the past 2s 10s 40s, respectively.

To view disk IO Load tips:

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

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6C/49/wKiom1VDoU3gnsrHAAHXSEB9e0I420.jpg "title=" 5.png " alt= "Wkiom1vdou3gnsrhaahxseb9e0i420.jpg" width= "680" height= "197" border= "0" hspace= "0" vspace= "0" style= "width : 680px;height:197px; "/>

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.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/45/wKioL1VDosejDwYNAALXr5Bcbec129.jpg "title=" 6.png " alt= "Wkiol1vdosejdwynaalxr5bcbec129.jpg" width= "680" height= "328" border= "0" hspace= "0" vspace= "0" style= "width : 680px;height:328px; "/>

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

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/49/wKiom1VDoWugoW-xAAD8tvvgwck824.jpg "title=" 7.png " alt= "Wkiom1vdowugow-xaad8tvvgwck824.jpg" width= "680" height= "208" border= "0" hspace= "0" vspace= "0" style= "width : 680px;height:208px; "/>

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

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/45/wKioL1VDot2Q-lERAALDhEzUPjU835.jpg "title=" 8.png " alt= "Wkiol1vdot2q-leraaldhezupju835.jpg" width= "680" height= "+" border= "0" hspace= "0" vspace= "0" style= "width : 680px;height:350px; "/>

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

Nohup SH 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.

For more articles, please continue to focus on the Keio Linux education training: www.jfedu.net

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

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.