In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what common skills Shell operators need to master". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what common skills Shell operators need to master.
Preface
With the rapid development of Linux in recent years, Linux, UNIX and Windows are divided into three parts, but since the "Internet craze", the market share of Linux, a rising star, has been increasing on the server side. And the growth momentum is rapid. In this case, Linux operation and maintenance also ushered in the spring, the demand for Linux operation and maintenance personnel increased significantly!
As can be seen from the above figure, Linux accounts for about 80% (including CentOS, Ubuntu, etc.), and Windows accounts for 12.8%. In the future server field, Linux is the trend of the times.
Linux operation and maintenance
Linux is widely used in servers, which can be used to build Web servers, database servers, load balancing servers (CDN), mail servers, DNS servers, reverse proxy servers, VPN servers, routers and so on. Using Linux as a server system is not only very efficient and stable, but also does not have to worry about copyright issues, do not have to pay. Due to the large-scale application of Linux server, a group of professionals are needed to manage it. These people are Linux operation and maintenance engineers (OPS).
The main job of OPS is to set up a running environment so that the code written by programmers can run efficiently, stably and securely on the server. They belong to the logistics department. OPS is no less demanding than programmers. Excellent OPS has the ability to set up server clusters and can program and develop commonly used tools.
The details of OPS's work include:
(1) install operating systems, such as CentOS, Ubuntu, etc.
(2) deploy the code runtime environment, for example, if the website background language is PHP, you need to install Nginx, Apache, MySQL, PHP runtime and so on.
(3) timely repair the vulnerabilities and prevent the server from being attacked, including the vulnerabilities of Linux itself and each software.
(4) upgrade the software according to the project requirements, for example, PHP 7.0has made a major breakthrough in performance. If the server is under great pressure now, you can consider upgrading the old version of PHP 5.x to PHP 7.0.
(5) monitor the pressure of the server and don't let the server down. For example, Taobao Singles Day will instantly influx a large number of users, resulting in some server outages, web pages can not be accessed, and even Alipay can not be used.
(6) analyze the log, find the problem of the code or environment in time, and notify the relevant personnel to fix it.
Why use Shell programming
Because OPS is faced with thousands of servers, it is impossible to repeat the same work thousands of times.
Once there are many servers, these human work needs to be automated, running a section of code can complete the same work on thousands of servers, such as service monitoring, rapid code deployment, service start and stop, data backup, log analysis and so on.
Shell scripts are well suited for dealing with plain text data, while almost all configuration files, log files (such as NFS, Rsync, Httpd, Nginx, MySQL, etc.), and most startup files in Linux are plain text files.
The picture above shows the position of Shell in operation and maintenance, which is equivalent to the rope on the bracelet.
Shell script is a necessary tool to realize automatic management and automatic operation and maintenance of Linux system. The bottom layer of Linux and the core of basic application software mostly involve the content of Shell script. Every qualified Linux system administrator or operation engineer should be able to write Shell scripts skillfully.
Shell, Python and Perl
In addition to Shell, other scripting languages that can be used for Linux operations are Python and Perl.
(1) Perl
Perl is much more powerful than Shell and was very popular before 2010. its syntax is flexible and complex, and different functions can be implemented in many different ways. the disadvantage is that it is not easy to read and difficult to work as a team.
Perl scripts are a thing of the past, and today's Linux operators hardly need to know about Perl. At most, they can learn about the installation environment of Perl.
(2) Python language
Python is a very popular language in recent years. It can be used not only for script program development, but also for Web program development (Zhihu, Douban, YouTube, Instagram are all developed by Python), and even software development (the famous OpenStack and SaltStack are all developed in Python), game development, big data development, mobile development.
Now more and more companies require operation and maintenance personnel to automate Python development, and Python has become a necessary skill for operation and maintenance personnel. Every operation and maintenance staff should learn Python language after they are familiar with Shell.
(3) Shell
The advantage of Shell script is that it handles business that is partial to the bottom of the operating system. For example, many applications within Linux (some of which are part of the application) are developed using Shell script, because it is supported by more than 1000 Linux system commands, especially Linux regular expressions and three Musketeers grep, awk, sed and other commands.
For some common system scripts, using Shell development will be easier and faster, for example, let the software click automatic installation, optimization, monitoring alarm scripts, software startup scripts, log analysis scripts, etc., although Python can also do these, but taking into account the difficulty of mastery, development efficiency, development habits and other factors, they may not be as popular as Shell scripts and have advantages. For some common business applications, the use of Shell is more in line with the three principles of simple, easy to use and efficient operation and maintenance of Linux.
The advantage of Python language lies in the development of complex operation and maintenance software, Web page management tools and Web business development (such as CMDB automated operation and maintenance platform, jumping machine, batch management software SaltStack, cloud computing OpenStack software) and so on.
At this point, I believe you have a deeper understanding of "what common skills Shell operators need to master". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.