Linux installation JDK and nginx detailed process

Source: Internet
Author: User
Tags create directory openssl

First, install the JDK

1: First download the JDK locally and then upload it to the Linux server via git

2: Go to directory usr and create directory Java to move the JDK's compressed files to that directory

  

CD/usrmkdir JAVAMV jdk-xxxx/usr/java

3: Unzip the installation JDK and remove the Tarball

TAR-ZXVF JDK-XXXXRM-RF jdk-xxxx

4: Edit Profiles profile, configure environment variables, and compile configuration files

Vim/etc/profilejava_home=/usr/java/jdk=xxxxclasspath= $JAVA _home/lib/path= $PATH: $JAVA _home/binexport PATH JAVA_ HOME classpath Save exit source  /etc/profile

5: View the installation results

Java-version

  

Note: To confirm that the 32/64-bit operating system downloads the corresponding JDK, the installation is switched to the root user (su root gets root user rights, the current working directory remains the same (requires root password) or sudo-i No root password required to switch directly to root (requires current user password)

Second, install Nginx

Access:/usr/java/nginx Location
Download Nginx:wget http://nginx.org/download/nginx-1.8.0.tar.gz
Download Openssl:wget http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz
Download Zlib:wget http://zlib.net/zlib-1.2.11.tar.gz
Download Pcre:wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
If you do not have a C + + compilation environment installed, install it via yum install gcc-c++

Next, compile the installation
Openssl:

[[email protected]] Tar zxvf openssl-fips-2.0.9.tar.gz

[[email protected]] CD openssl-fips-2.0.9

[[email protected]]./config && make && make install
Pcre

[[email protected]] Tar zxvf pcre-8.38.tar.gz

[[email protected]] CD pcre-8.38

[[email protected]]./configure && make && make install

Zlib

[Email Protected]]tar zxvf zlib-1.2.11.tar.gz

[[email protected]] CD zlib-1.2.11

[[email protected]]./configure && make && make install

Final installation of Nginx

[Email Protected]]tar zxvf nginx-1.8.0.tar.gz

[[email protected]] CD nginx-1.8.0

[[email protected]]./configure && make && make install


Start Nginx
/usr/local/nginx/sbin/nginx

An error message appears
[[Email protected] lib]# error while loading shared Libraries:libpcre.so.1:cannot open Shared object file:no such file or directory


The Redhat 64-bit machine Nginx Read the Pcre file is/lib64/libpcre.so.1 file, the default installation pcre libpcre.so file installed in the/usr/local/lib/directory, so input/opt/nginx/ Sbin/nginx-v can't find the file path!!
1. First make sure the Pcre is installed.
2. Switch path: cd/usr/local/lib Execute ln-s/usr/local/lib/libpcre.so.1/lib64/
Add soft links under 3.root permissions/usr/local/lib/libpcre.so.1 to/lib64/: Ln-s/usr/local/lib/libpcre.so.1/lib64/

Linux installation JDK and nginx detailed process

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.