Commands required to maintain linux

Source: Internet
Author: User
Tags php website

Commands required to maintain linux

Lsof (list open files) is a tool used to list open files in the current system. Lsof-I 4 # list IP V4 lsof-I tcp list all TCP network connections lsof-I list all network connections lsof-I: 80 # Check the process of port 80, lsof-I udp: 53 # Check udp, port 53 lsof-u zhangy lists all files opened by a user, lsof/usr/sbin/httpd, and finds out who is using a file, lsof-p 3738, and lists all the processes opened by a PID. file ps-ef # displays the UID of all processes, PPIP, C and STIME column ps aux # terminal is not differentiated, show all processes of all users ps-u hadoop # Show all processes of hadoop user uname-a # Show System Information uname-m # Show system type, generally, i386, i686 is a 32-bit system, X86, X86_64 is a 64-bit system uname-s, -- kernel-name output kernel name hostname # Show host name hostname apple # Set host name edit/etc/sysconfig/network permanent set host name mount/dev/sda1/media/usb # mount usb disk mount-l # list mounted system umount -v/dev/sda1 # uninstall by device name, and displays the detailed process cat/proc/mounts to view the mount disk information du-ah # view the current directory in detail, subdirectory, all files and directories -- max-depth = n only outputs the total number of directories whose command line parameters are less than or equal to layer n. -- Max-depth = 0 is equivalent to the-s option
Vmstat reports virtual memory statistics
Vmstat 2 5 # displays the system memory statistics every two seconds, for a total of five times

Sar (System Activity Reporter System Activity Report) is one of the most comprehensive System performance analysis tools on Linux.
Sar-u-o test 10 3
Note: sampling is performed every 10 seconds. sampling is performed three times in a row to observe CPU usage. The sampling result is saved to the file test in the current directory in binary format.
Sar-q 10 3 Note: sampling is performed once every 10 seconds. sampling is performed three times in a row to monitor the length of the process queue and the average load status.

Iostat can provide more IO performance status data iostat-d-k 1 10 # view TPS and throughput Information Parameter-d to display the device (Disk) usage status; -k: Kilobytes is used as the unit in some major systems that use block as the unit. 1 10 indicates that the data is refreshed every 1 second and 10 times in total.



I want to build a PHP website. What commands do I need to know about linux?

If you only want to maintain the php website, you do not have much to learn.
For linux, you only need to understand the most basic operations:
How to enter the corresponding directory, how to edit the file, how to restart the application, and how to install it.
However, you must be familiar with the environment software of the php website.
The php environment is generally php + mysql + nginx/appache (you only need to know one of them)
So you need to know how to install mysq php and nginxl (linux installation), how to configure (linux File editing), and how to restart (linux restarts the Application)
There are no fixed commands, but the basic operation procedures are the same, such as installation
./Configure, and then
Make and then
Make install

All files to be edited are vi filePath/file.

What books should I read after I have learned some basic commands in Linux? It is best to share the Linux learning steps,

Laruence books are relatively basic, divided into two basic articles and service articles, basically covering linux from command to environment setup services.
In the early stage, you can look at the bird brother. in the later stage, you can see whether development or O & M is your intention to develop in that direction. After creating a route
Select what to learn.

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.