Java environment configuration under Linux

Source: Internet
Author: User

1: Install wget
Yum Install wget

Wget is a download tool under Linux

2: Install JDK
New software Download directory:
Mkdir/home/soft

Cd/home/soft


Download: Visit http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html for download
Installation: Rpm-ivh jdk-8u144-linux-x64.rpm

Environment variable Configuration
Vim/etc/profile
The last change in the file is inserted
Export Java_home=/usr/java/devault
Export Classpath=.:${java_home}/lib/dt.jar:${java_home}/lib/tools.jar
Export Path=${path}:${java_home}/bin


Execute source/etc/profile to make the configuration file effective

3: Install SVN
Yum Install Subversion

Create source Directory
Mkdir/home/soft/source

Cd/home/soft/source

Download source code

SVN checkout Https://60.219.169.11/svn/newfreemarker

4: Install Maven
Cd/home/soft

Download maven
wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz

Extract:
TAR-ZXVF apache-maven-3.5.0-bin.tar.gz

Modify the extracted name
MV apache-maven-3.5.0 Maven35

Adding environment variables
Vim/etc/profile
The last change in the file is inserted
Maven_home=/home/soft/maven35
Export Maven_home
Export Path=${path}:${maven_home}/bin

Execute source/etc/profile to make the configuration file effective

MVN--version can view the version number of Maven

Modify MAVEN's Warehouse address

Create a native MAVEN warehouse directory
Mkdir/home/mvn_repo

Go to maven Directory
Cd/home/soft/maven35
Perform
Vim conf/setting

Find Localrepository, insert outside the annotation
<localRepository>/home/mvn_repo</localRepository>

See Mirrors tab, insert
<mirror>
<id>mirrorId</id>
<mirrorOf>*</mirrorOf>
<name>my repository</name>
<url>http://60.219.169.11:9000/repository/maven-public/</url>
</mirror>

5: Install the database
# download MySQL Source installation package
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# install MySQL source
shell> Yum Localinstall mysql57-community-release-el7-8.noarch.rpm

Install MySQL
Yum Install Mysql-community-server

Start MySQL
Systemctl Start mysqld

Boot up
Systemctl Enable Mysqld
Systemctl Daemon-reload

To view the default password:
grep ' temporary password '/var/log/mysqld.log

Change Password:
Start without a password
Edit/etc/my.cnf file, increase Skip-grant-tables=1

Mysql-u Root
Use MySQL;
Update user set Authentication_string=password (' haichang123 ');
Flush privileges;

Alter user ' root ' @ ' localhost ' identified by ' [email protected]# ';
Flush privileges;


Create a database
Create DATABASE Haichang default CharSet UTF8;

Import Database files

Installing Redis
Download wget http://download.redis.io/releases/redis-4.0.1.tar.gz

MV redis-4.0.1 Redis

CD Redis

Make

Modify to run as a service
Vim/home/soft/redis/redis.conf
Find Deamonize, change No to Yes

Change Password
Vim/home/soft/redis/redis.conf

Find Requirepass

Add Requirepass Haichang

6: Install node
Cd/home/soft
Download: wget https://nodejs.org/download/rc/v8.2.0-rc.1/node-v8.2.0-rc.1-linux-x64.tar.gz

TAR-ZXVF node-v8.2.0-rc.1-linux-x64.tar.gz

MV node-v8.2.0-rc.1-linux-x64 Node

Editing environment variables
Vim/etc/profile

Increase in the last line:
Export Path=${path}:/home/soft/node/bin
Export Node_path=/home/soft/node/lib/node_module

Source/etc/profile

Set up NPM repositories
NPM install-g cnpm--registry=https://registry.npm.taobao.org

Installing Vue
NPM install-g VUE-CLI

N Latest Upgrade Node


7: Install Tomcat

Normal Decompression Package Installation

8: Install Nginx
Cd/home/soft
Yum Install OpenSSL
Yum Install Openssl-devel
Yum Install Zlib-devel
Yum Install zlib
Yum Install Pcre-devel
Yum Install Pcre

Download Nginx
wget http://nginx.org/download/nginx-1.13.3.tar.gz

Extract
TAR-ZXVF nginx-1.13.3.tar.gz
Renaming
MV nginx-1.33.3 Nginx

Install C
Yum install-y gcc gcc-c++

Compiling Nginx
Cd/home/soft/nginx
./configure

Installation
Make
Make install
Default installation directory/usr/local/nginx

Turn off the default firewall
Systemctl Stop Firewalld.service #停止firewall
Systemctl Disable Firewalld.service #禁止firewall开机启动

Nginx Load Balancer http://blog.csdn.net/kingzma/article/details/46331999







Java environment configuration under Linux

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.