安装JDK1.8
1.下载jdk-8u161-linux-x64.tar.gz(https://pan.baidu.com/s/18IicPYf7W0j-sHBXvfKyyg)
2.将文件上传到 /usr/local
3.新建文件夹mkdir /usr/java
解压文件 tar -zxvf jdk-8u161-linux-x64.tar.gz
拷贝到新建的文件夹中 java]# mv ./jdk1.8.0_161 /usr/java
4.配置系统参数
export JAVA_HOME=/usr/java/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
立即生效
source /etc/profile
5.查看安装结果
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
安装nginx
- Nginx 是 C语言 开发,需要安装编译环境。
yum install gcc-c++
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel
yum install epel-release
- yum安装
yum install -y nginx