I also just started learning to build one hundred million traffic (including virtual machine installed, java configuration, system configuration), what's wrong, we can exchange with the micro-channel public number (java micro technology)
Environment to build ready, I use ubuntu16.04
Download http://releases.ubuntu.com/16.04/ubuntu-16.04.5-desktop-amd64.iso
All Download
With a virtual machine is vmware, the download address is in the public micro-channel number, provided together, the public can follow the above number, reply all 888 receive information this issue, cracked version of vmware 12
The first step: to build a virtual machine
In continuing, choose to install the operating system later
Step 2: Install You just have to download a good operating system
The third step: configuration environment
Ssh can build client connection, the default port is 22
Step Four: Configure jdk environment (java)
First, go here (Note: The link address will fail, therefore, directly give you a whole)
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
At last
Go in cd / opt
Download
sudo wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" 连接地址
Then unzip operation
sudo tar xvf jdk-8u201-linux-x64.tar.gz
Install vim editing tools
sudo apt install vim -y
Configuration environment variable
sudo vim /etc/environment
先按着大写 G到文件末尾,然后在按 o 进行编辑
末尾加入以下配置(JAVA_HOME 后的路径就是jdk的文件位置)
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin"
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export JAVA_HOME=/opt/jdk1.8.0_201
刷新系统配置
source /etc/environment
配置全局环境变量
sudo vim /etc/profile
先按着大写 G到文件末尾,然后在按 o 进行编辑
末尾加入以下配置
#set Java environment
export JAVA_HOME=/opt/jdk1.8.0_201
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
刷新系统配置
source /etc/profile
验证是否成功
Java -version
第五步:配置Perl和host
安装gcc g++的依赖库
sudo apt-get install build-essential
sudo apt-get install libtool
进入
cd /opt
下载
sudo wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz
解压
sudo tar -xzf perl-5.16.1.tar.gz
进入文件夹
cd perl-5.16.1
编译环境
sudo ./Configure -des -Dprefix=/usr/local/perl
installation
sudo make && sudo make install
View version
perl -v
Why install perl? Our entire major electricity supplier site details page system complexity. java + nginx + lua, need perl.
perl, is to install a basic programming language, tomcat, run java web application
Configuring host
sudo vim /etc/hosts
Configuration of the machine to the hostname ip address mapping
host a corresponding mapping of these three in lin1 lin2 lin3 their own definition, this is a follow-up operation is not finished, this configuration has been configured four, equivalent to practice their own familiar structures
4 is a configuration ubuntu ssh Free cryptographic communication with each other
(1) First, the configuration on three machines free of ssh login password of the machine
ssh-keygen -t rsa
Native of public life, the process can continue to hit enter, ssh-keygen command will default on /root/.ssh public directory
cd /root/.ssh
cp id_rsa.pub authorized_keys
Copy the public key as authorized_keys file, this time using ssh connect the machine do not need to enter the password
(2) then configure each other three machines ssh password free
Using ssh-copy-id -i hostname of the machine Public Key command to copy the specified file machine authorized_keys
java, to do the project in the company, there are a few people to maintain their own linux cluster ah? ? ? ? ?
Little, very little, to do things similar to this lecture, in fact SRE, operation and maintenance of the students, do
But for the course, we can only own step by step, only environment to learn ah! ! !
Linux-based cluster environment virtual machines are ready, do have four machines, play back a variety of redis, kafka, storm, tomcat, nginx, has a machine