Four realms of operation and maintenance from the perspective of software deployment

Source: Internet
Author: User
Tags redis cluster redis server

Four realms of operation and maintenance from the perspective of software deployment

First of all, the name of the blog is very difficult to take ah, it is not very good to say anything, here is the tentative. There is no denying that there is a little grandstanding motive, not to talk about the overall feeling pattern is not big ha.

The Chinese philosopher, Mr. LAN, said that there are four realms of life: natural realm, utilitarian realm, moral realm and heaven and earth realm. After long-term deployment and installation of software services, feel the recent hand is much more familiar, through the practice can draw some methods, methods summed up


Can form a set of methodologies, but as the people, or with the pattern, the realm of the words more intimacy.

Don't say much nonsense, the dry goods below. (I understand the dry goods, may not, cattle people please ignore)

Below through the specific installation of Redis this small software to illustrate the problem, I attach four kinds of installation methods to realize the four different realms.


One, traditional manual installation (famous kick)

Config

Make

Make install


wget http://download.redis.io/releases/redis-2.8.17.tar.gz

TAR-ZXVF redis-2.8.17.tar.gz

CD redis-2.8.17.tar.gz

Install TCL First, or the following will be an error

Yum Install Tcl-y

Make MALLOC=LIBC

Make Test

Make install

/root/redis-2.8.17/utils/install_server.sh

Welcome to the Redis service installer

This script would help you easily set up a running Redis server


Please select the Redis port for this instance: [6379]

Selecting default:6379

Please select the redis config file name [/etc/redis/6379.conf]

Selected Default-/etc/redis/6379.conf

Please select the Redis log file name [/var/log/redis_6379.log]/data/redis/redis_6379.log

Please select the data directory for this instance [/var/lib/redis/6379]/data/redis/6379

Please select the Redis executable path [/usr/local/bin/redis-server]

Selected Config:

port:6379

Config File:/etc/redis/6379.conf

Log File:/data/redis/redis_6379.log

Data dir:/data/redis/6379

Executable:/usr/local/bin/redis-server

Cli executable:/USR/LOCAL/BIN/REDIS-CLI

Is this OK? Then press ENTER to go on or ctrl-c to abort.

copied/tmp/6379.conf =/etc/init.d/redis_6379

Installing service ...

Successfully added to chkconfig!

Successfully added to Runlevels 345!

Starting Redis Server ...

Installation successful!


This traditional installation method is mainly time-consuming, such as the Redis 1M of small software installation more than half an hour, this method is similar to the natural state of Feng LAN. One of the benefits of this approach is that you can quickly familiarize yourself with a strange software, the first time


The installation had to go through such a process.


Second, script installation

With the passage of time, the server more and more, their daily repetition of such work is not feel very annoying, very no technical content can not be improved? Most Ops people are not satisfied with the status quo, especially when the boss says to find a quick-Deploy method award


Excitation 2K, is not the power to come, at this time people and all come, and then began to think of ways, most of the first thought is the script.

About the script, I personally bash is not very familiar, but copy modification others can, let alone 3P (don't think wrong, many people say to learn python,perl,php), if you are born technical master these will or will be one or two of course is the best.


It doesn't matter if you're not interested in 3P or not, just learn the shell, at least that's enough.

Only redis this service to get a script actually does not show the benefits of the script at this time, if a LNMP environment, the advantages of the script will be highlighted, the keyboard enter key to knock, you can go to drink coffee, but in general you have other things


Two hours after the basic environment is complete.

If Redis is really writing a simple script, just add a #!/bin/bash before the above command line.

#!/bin/bash

wget http://download.redis.io/releases/redis-2.8.17.tar.gz

TAR-ZXF redis-2.8.17.tar.gz

CD redis-2.8.17.tar.gz

Yum Install tcl-y |tail-n 6

Make MALLOC=LIBC |tail-n 6

Make Test |tail-n 6

Make install |tail-n 6

/root/redis-2.8.17/utils/install_server.sh


Friendly hint: This script I have not tried, not necessarily can use. Because then I am not very satisfied with this kind of installation method.


Three, green installation

Green installation, the word I used to hear most is the Windows environment, Linux is rarely heard, do Linux like the difficulty of the operation of a simple method of the cold? Isn't that a little unethical? The so-called moral realm I Feel


It should be like this: simplify the complex things, the easier the better. I do not think that simple is no technical content, simple is the highest level of my life pursuit.

Speaking of which, what is the basis for green installation, in fact, I think I have a period of time to forget the meaning of a very deep word: all documents! I remember hearing about it when I first started learning Linux, but I haven't always thought about it. Even


Have walked a lot of detours. Then again, not so many detours, the understanding of this sentence will not be so deep.

Back to the point, green installation is the first time in an environment to install a package, a package, copy it on the line. For example, here Redis only need to copy binaries and configuration files, the only thing the binary is to rely on is some of the development library


Class of software. This has to be installed in advance.

Yum Install Tcl-y

Mkdir/etc/redis

Ls/etc/redis

6379.conf

Ls/etc/init.d

redis_6379

Tar zxvf redis_data.tar.gz-c/

Tar zxvf redis.2.7.17.tar.gz-c/

Here Redis first installation distributed several directories, if the first installation of the installation directory specified, only need to copy the whole directory to come on the line. Isn't it simple?


4, Clone template

The fourth realm is called the Realm of Heaven and earth, used here a little blasphemy feeling, but not so much, for the integrity of the blog I have been very spelling. The Realm of heaven and earth I understand is the unity of Heaven and man, let our human machine unity not? That's a profound question, and I


I can't think of it, I said it's easy. Fortunately now the virtualization technology is very developed, do not say that cloud computing ah I am allergic to which, I have not yet seen which cloud computing living in front of me.

In fact, this method and the third kind of similar, but this kind of system has been deployed, the operating system is not the largest software? By the right, which one who didn't say Mac and Windows is the biggest malicious program!

This method is relatively simple, but the pattern is mostly. For example, various kinds of so-called Cloud SaaS, as for that Redis example, I remember the Redis cloud cache server in Tsing-Yun, should be a higher level than I said. Then I suddenly want to take this place


The boundary is in split because I suddenly want to add a situation.

The first kind I guess everyone has thought about:

1, a third method is available for deploying the Redis service on a virtual machine or on a physical machine.

2,ptov or Vtov method is converted into a template.

3, the next time you need to deploy the virtual machine directly from the template, which one of the virtualization technology is supporting this.

The second I am talking about is the distributed cluster environment, this is not every software is common, just this example of the Redis Universal

1, deploy Redis cluster (redis3.0 support, but I haven't tried Redis cluster, I tried CODIS cluster)

2, the next time there is demand, directly on the cluster (here with Codis cluster example) to expand the Codis-group and add Codis-server instance can be

3, this distributed cluster environment supports scale-out, online scaling, to meet a variety of demanding words and requirements


Said here to change the end, originally also want to say something can be said not to come out, that heaven and earth realm is really not good understanding ah.


This article from "Jerrymin" blog, declined reprint!

Four realms of operation and maintenance from the perspective of software deployment

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.