Hands-on practice – environment building

Reprinted, please indicate the original source, thank you!

Reason

Now a lot of Java Internet technology stack, it is not easy to master, only step by step, theoretical knowledge to continue learning, but it cannot be lost, so be prepared in their own computer above step by step to the practical operation, the first Linux (open-falcon, ZABBIX, monitoring system etc.), team collaboration tools (Maven series, Git series, Nginx series, automatic deployment), JDK, Tomcat, Keepalive, Mysql, Zookeeper, Redis (SolrCloud, Elasticsearch), search, Mongodb, APM (pinpiont, CAT), Kibana, message oriented middleware (Kafka, rocketMq), Docker and so on, all these need manual operation and installation, we may have used, but there is no manual tried to understand the whole process of it, we may only participate in them One piece. So want to systematically step by step to some of the technology to the tail practice, so that from the other side of the understanding of this technology. The operation of the process will have a lot of problems, for example, many are not familiar with no contact, as well as some compatibility, strange and eccentric problem, hope slowly and familiar with the operation of the practice ability, the code can be written to simulate some abnormal consideration, investigation procedures and familiar with some orders in Linux system.

The first step in everything

Explain

Install virtual machines in their own computers, build linux operating system, Download VMware, a lot of versions, I choose here is version 12. Linux Centos6.9 Docker (must be at Centos7 and Centos7 and 6, but many have many differences, in order to install something above and the problems solved, the first to use version 6.9, so many familiar can be considered in high version.

Note: when the unknown is too much, too many problems may hit the initiative, so a little choice of familiar points is helpful to practice, can improve interest (personal understanding).

1. the installation of VMware is to click on the next step, the next step, there should be no particular need to explain. Installing Centos6.9 on
2. VMware.

VMware install Centos6.9

The first step: click “create a new virtual machine””.

Hands-on practice - environment building

The second step: we use the default option, custom (Advanced), and then click on the next step”.

Hands-on practice - environment building

The third step: direct point, the next step”

Hands-on practice - environment building

The fourth step: this step must choose “install the operating system (S) later”, otherwise the installation will be stuck to a place, can not go on, click “next step.””.

Hands-on practice - environment building

The fifth step: by default select “Linux”, click “next step””.

Hands-on practice - environment building


Sixth steps:虚拟机名称自己起个自己想要起的名字,位置则需要新建一个文件夹用来存放这个虚拟机,点击”下一步”。

Hands-on practice - environment building


Seventh steps:根据自己的情况设置处理器数量、每个处理器的核心数量,点击”下一步”。

Hands-on practice - environment building


Eighth steps:使用4G内存(根据自己情况选择),点击”下一步”。

Hands-on practice - environment building

The ninth step: use the default “NAT” mode and click “next step””.

Hands-on practice - environment building


Tenth steps:使用默认配置,点击”下一步”。

Hands-on practice - environment building


Eleventh steps:使用默认配置,点击”下一步”。

Hands-on practice - environment building


Twelfth steps:选择默认配置,点击”下一步”。

Hands-on practice - environment building


Thirteenth steps: 根据自己情况选择最大磁盘大小, 选择”将虚拟磁盘存储为单个文件(O)”,点击”下一步”。

Hands-on practice - environment building


Fourteenth steps: 不用做修改,直接点击”下一步”。

Hands-on practice - environment building


Fifteenth steps:点击”自定义硬件”,之后选择CD/DVD(IDE),浏览Centos6.9位置,之后点击”关闭”,之后”完成”。

Hands-on practice - environment building

The sixteenth step: click on “open the virtual machine””.

Hands-on practice - environment building

The seventeenth step: you’ll see the boot information as shown in the diagram below.

Hands-on practice - environment building

The eighteenth step: the interface will appear in the following picture, we need to put the cursor into the virtual machine (click on any position in the picture below), and then press the Tab key to switch to “Skip” and press the enter key.

Hands-on practice - environment building


Nineteenth steps:看到如下图所示界面后,点击”Next”。

Hands-on practice - environment building

The twentieth step: select the language “Chinese Chinese simplified”, and then click “Next””.

Hands-on practice - environment building


Twenty-first steps:选择”美国英语式”然后点击”Next”。

Hands-on practice - environment building

The twenty-second step: use the default configuration and click on the next step”.

Hands-on practice - environment building


Twenty-third steps:选择”是,忽略所有数据(Y)”。

Hands-on practice - environment building

The twenty-fourth step: host name, we fill in the name we want, and then click on the next step”.

Hands-on practice - environment building

The twenty-fifth step: the default use of “Asia / Shanghai”, click “next step””.

Hands-on practice - environment building

The twenty-sixth step: the root password is the root user’s password, at least input six bits.

Hands-on practice - environment building


Twenty-seventh steps:选择”使用所有空间”,然后点击”下一步”。

Hands-on practice - environment building


Twenty-eighth steps:点击”将修改写入磁盘(W)”。

Hands-on practice - environment building


Twenty-ninth steps:下面就开始安装了,安装过程如下图所示。

Hands-on practice - environment building
Hands-on practice - environment building

Desktop: basic desktop system, including the commonly used desktop software, such as Minimal Desktop: View tools basic desktop system documentation, including software less basic Minimal: system, does not contain any optional software package Basic system Server: installation platform support, does not contain the desktop Database Server: basic system platform, with MySQL and PostgreSQL database the client, no desktop Web Server: basic system platform, plus PHP, Web server, and MySQL and PostgreSQL database client, no desktop Virtual Host: basic system virtualization platform Software Development Workstation: contains the ooze Ji’an package more basic system virtualization platform desktop environment, development tools

I chose the Basic Server above, and I didn’t choose the desktop. After all, we used the black window, and in the real server, because the graph was not intercepted.

There are some problems in the following process, and some special settings are needed

Hands-on practice - environment building

You need to set up the BIOS.

Hands-on practice - environment building

Modify to open.

Restart the virtual machine.

configure network

Because the installation process is minimized, the network is to use the DHCP to configure the default, this situation does not meet our requirements, so the first thing we installed after general treatment is to configure the network. In order for Xshell and other tools to access, you need to configure the network of the Linux operating system.

The configuration of Linux is usually to modify the file, then the file related to the network card is in the following file.

/etc/sysconfig/network-scripts/ifcfg-eth0

Using the VIM editor, edit this file, the contents are as follows:

Hands-on practice - environment building


At this point, we see to see:

  • DEVICE represents the device name.
  • The MAC address of the network card represented by HWADDR.
  • ONBOOT indicates whether to start with the system, default does not start, and if you need to start with the system, you can set it to yes.
  • BOOTPROTO means the way to get the IP address. The default is dpcp. If you set a static IP, you need to set this value to static.

Look at the current network:

Hands-on practice - environment building
Hands-on practice - environment building

Modify content for:

Hands-on practice - environment building

After the configuration is completed, restart the network card

Service network restart

The environment is installed here, as shown in figure

Hands-on practice - environment building

This is just the first step in the Long March, the follow-up will be hands-on practice slowly, also need to write code, also need to understand the theory, practice also need to try. Later will practice slowly, I hope you will pay more attention to me, more support, praise, praise, thank you.


Individual public number

Hands-on practice - environment building
ingenuity zero public number.Jpg