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