不多说,直接上干货!

[hadoop@djt002 local]$ su root
Password:
[root@djt002 local]# ll
total
drwxr-xr-x. root root Sep bin
drwxr-xr-x. hadoop hadoop Mar : data
drwxr-xr-x. hadoop hadoop Feb : elasticsearch
drwxr-xr-x. root root Sep etc
drwxr-xr-x. hadoop hadoop Jan : flume
drwxr-xr-x. root root Sep games
drwxr-xr-x. hadoop hadoop Jan : hadoop
drwxr-xr-x. hadoop hadoop Mar : hbase
drwxr-xr-x. hadoop hadoop Mar : hive
drwxr-xr-x. root root Sep include
drwxr-xr-x. hadoop hadoop Jan : jdk
drwxr-xr-x. root root Sep lib
drwxr-xr-x. root root Sep lib64
drwxr-xr-x. root root Sep libexec
drwxr-xr-x hadoop hadoop Apr : mahout
drwxr-xr-x. root root Sep sbin
drwxr-xr-x. root root Jan : share
drwxr-xr-x. hadoop hadoop Mar : sqoop
drwxr-xr-x. root root Sep src

[root@djt002 local]# pwd
/usr/local
[root@djt002 local]# ll
total
drwxr-xr-x. root root Sep bin
drwxr-xr-x. hadoop hadoop Mar : data
drwxr-xr-x. hadoop hadoop Feb : elasticsearch
drwxr-xr-x. root root Sep etc
drwxr-xr-x. hadoop hadoop Jan : flume
drwxr-xr-x. root root Sep games
drwxr-xr-x. hadoop hadoop Jan : hadoop
drwxr-xr-x. hadoop hadoop Mar : hbase
drwxr-xr-x. hadoop hadoop Mar : hive
drwxr-xr-x. root root Sep include
drwxr-xr-x. hadoop hadoop Jan : jdk
drwxr-xr-x. root root Sep lib
drwxr-xr-x. root root Sep lib64
drwxr-xr-x. root root Sep libexec
drwxr-xr-x hadoop hadoop Apr : mahout
drwxr-xr-x. root root Sep sbin
drwxr-xr-x. root root Jan : share
drwxr-xr-x. hadoop hadoop Mar : sqoop
drwxr-xr-x. root root Sep src
[root@djt002 local]# rz [root@djt002 local]# ll
total
drwxr-xr-x. root root Sep bin
drwxr-xr-x. hadoop hadoop Mar : data
drwxr-xr-x. hadoop hadoop Feb : elasticsearch
drwxr-xr-x. root root Sep etc
drwxr-xr-x. hadoop hadoop Jan : flume
drwxr-xr-x. root root Sep games
drwxr-xr-x. hadoop hadoop Jan : hadoop
drwxr-xr-x. hadoop hadoop Mar : hbase
drwxr-xr-x. hadoop hadoop Mar : hive
drwxr-xr-x. root root Sep include
drwxr-xr-x. hadoop hadoop Jan : jdk
drwxr-xr-x. root root Sep lib
drwxr-xr-x. root root Sep lib64
drwxr-xr-x. root root Sep libexec
drwxr-xr-x hadoop hadoop Apr : mahout
-rw-r--r-- root root Mar : nginx-1.8..tar.gz
drwxr-xr-x. root root Sep sbin
drwxr-xr-x. root root Jan : share
drwxr-xr-x. hadoop hadoop Mar : sqoop
drwxr-xr-x. root root Sep src
[root@djt002 local]#

1、gzip 模块需要 zlib 库 ( 下载: http://www.zlib.NET/ )
2、rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )
3、ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )

依赖包安装顺序依次为:openssl、zlib、pcre, 然后安装Nginx包

我这里的话,Nginx包我本地下载好了,我就直接用rz命令上传就好了,其他三个我在线下载过来

分别用:(下面有过程截图)

wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz

wget http://zlib.net/zlib-1.2.11.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz

[root@djt002 local]# wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz
---- ::-- http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz
Resolving www.openssl.org... 104.77.19.105, :::18c::c1e, :::::c1e
Connecting to www.openssl.org|104.77.19.105|:... connected.
HTTP request sent, awaiting response... Moved Permanently
Location: https://www.openssl.org/source/openssl-fips-2.0.10.tar.gz [following]
---- ::-- https://www.openssl.org/source/openssl-fips-2.0.10.tar.gz
Connecting to www.openssl.org|104.77.19.105|:... connected.
HTTP request sent, awaiting response... OK
Length: (1.4M) [application/x-gzip]
Saving to: “openssl-fips-2.0..tar.gz” %[=====================================================================================================================================================>] ,, 401K/s in .5s -- :: ( KB/s) - “openssl-fips-2.0..tar.gz” saved [/] [root@djt002 local]# wget http://zlib.net/zlib-1.2.11.tar.gz
---- ::-- http://zlib.net/zlib-1.2.11.tar.gz
Resolving zlib.net... 69.73.182.198
Connecting to zlib.net|69.73.182.198|:... connected.
HTTP request sent, awaiting response... OK
Length: (593K) [application/x-gzip]
Saving to: “zlib-1.2..tar.gz” %[=====================================================================================================================================================>] , .17K/s in 78s -- :: (7.64 KB/s) - “zlib-1.2..tar.gz” saved [/] [root@djt002 local]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
---- ::-- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
=> “pcre-8.40.tar.gz”
Resolving ftp.csx.cam.ac.uk... 131.111.8.115
Connecting to ftp.csx.cam.ac.uk|131.111.8.115|:... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD () /pub/software/programming/pcre ... done.
==> SIZE pcre-8.40.tar.gz ...
==> PASV ... done. ==> RETR pcre-8.40.tar.gz ... done.
Length: (2.0M) (unauthoritative) %[=====================================================================================================================================================>] ,, .6K/s in 78s -- :: (25.9 KB/s) - “pcre-8.40.tar.gz” saved [] [root@djt002 local]# ls
bin elasticsearch flume hadoop hive jdk lib64 mahout openssl-fips-2.0..tar.gz sbin sqoop zlib-1.2..tar.gz
data etc games hbase include lib libexec nginx-1.8..tar.gz pcre-8.40.tar.gz share src
[root@djt002 local]#

查看下载的包,我们可以发现也是几个压缩包的形式存放在我们的linux系统里面

  如果没有安装c++编译环境,还得安装,通过yum install gcc-c++完成安装

[root@djt002 local]# yum -y install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid .
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : M RSS ( MB VSZ)
Started: Thu Jun :: - : ago

期间会有确认提示输入y回车

Is this ok [y/N]:y

2、安装Nginx及相关组件

openssl安装

# tar -zxvf openssl-fips-2.0..tar.gz
# cd openssl-fips-2.0.
# ./config && make && make install

  耐心等待。

pcre安装

# tar -zxvf pcre-8.40.tar.gz

# cd pcre-8.40

# ./configure && make && make install


zlib安装

# tar -zxvf zlib-1.2.11.tar.gz

# cd zlib-1.2.11

 #./configure && make && make install

     其实三个插件包操作起来差不多的!

nginx安装

通过命令解压

tar -zxvf nginx-1.8.1.tar.gz 

cd nginx-1.8.1
./configure && make && make install

3、启动Nginx

  先找一下nginx安装到什么位置上了通过  whereis nginx命令来查找,然后进入相应的目录下用sbin/nginx启动

[root@djt002 nginx-1.8.]# whereis nginx
nginx: /usr/local/nginx
[root@djt002 nginx-1.8.]# cd /usr/local/nginx
[root@djt002 nginx]# pwd
/usr/local/nginx
[root@djt002 nginx]# ls
conf html logs sbin
[root@djt002 nginx]# ll
total
drwxr-xr-x root root Jun : conf
drwxr-xr-x root root Jun : html
drwxr-xr-x root root Jun : logs
drwxr-xr-x root root Jun : sbin
[root@djt002 nginx]# sbin/nginx
sbin/nginx: error while loading shared libraries: libpcre.so.: cannot open shared object file: No such file or directory
[root@djt002 nginx]#

  报错了,error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory,按照下面方式解决

1.用whereis libpcre.so.1命令找到libpcre.so.1在哪里

2.用ln -s /usr/local/lib/libpcre.so.1 /lib64命令做个软连接就可以了

3.用sbin/nginx启动Nginx

4.用ps -aux | grep nginx查看状态

[root@djt002 nginx]# whereis libpcre.so.
libpcre.so: /lib64/libpcre.so. /usr/local/lib/libpcre.so /usr/local/lib/libpcre.so.
[root@djt002 nginx]# ln -s /usr/local/lib/libpcre.so. /lib64
[root@djt002 nginx]# sbin/nginx
[root@djt002 nginx]# ps -aux | grep nginx
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2./FAQ
root 0.0 0.0 ? Ss : : nginx: master process sbin/nginx
nobody 0.0 0.1 ? S : : nginx: worker process
root 0.0 0.0 pts/ S+ : : grep nginx
[root@djt002 nginx]#

  进入Linux系统的图形界面,打开浏览器输入localhost会看到下图,说明nginx启动成功(这个时候体现了安装linux的时候还是安装桌面版的好处了)




CentOS6.5下nginx-1.8.1.tar.gz的单节点搭建(图文详解)的更多相关文章

  1. 基于CentOS6.5下如何正确安装和使用Tcpreplay来重放数据(图文详解)

    前期博客 基于CentOS6.5下snort+barnyard2+base的入侵检测系统的搭建(图文详解)(博主推荐) tcpreplay是什么? 简单的说, tcpreplay是一种pcap包的重放 ...

  2. ubuntu16.04下snort的安装(官方文档安装)(图文详解)

    不多说,直接上干货! 最近为了科研,需要安装和使用Snort. snort的官网 https://www.snort.org/ Snort作为一款优秀的开源主机入侵检测系统,在windows和Linu ...

  3. ubuntu14.04下snort的安装(官方文档安装)(图文详解)

    不多说,直接上干货! 最近为了科研,需要安装和使用Snort. snort的官网 https://www.snort.org/ Snort作为一款优秀的开源主机入侵检测系统,在windows和Linu ...

  4. linux(centos6) 下安装 postgresql-9.3.1.tar.gz

    目录 一. 环境 二.准备工作 三.先安装 make, gcc ,gcc-c++,readline-devel ,zlib-devel .如果已安装,可以忽略 四.开始安装 4.1 解压 tar -z ...

  5. 基于CentOS6.5下snort+barnyard2+base的入侵检测系统的搭建(图文详解)(博主推荐)

    为什么,要写这篇论文? 是因为,目前科研的我,正值研三,致力于网络安全.大数据.机器学习研究领域! 论文方向的需要,同时不局限于真实物理环境机器实验室的攻防环境.也不局限于真实物理机器环境实验室的大数 ...

  6. 基于CentOS6.5或Ubuntu14.04下Suricata里搭配安装 ELK (elasticsearch, logstash, kibana)(图文详解)

    前期博客 基于CentOS6.5下Suricata(一款高性能的网络IDS.IPS和网络安全监控引擎)的搭建(图文详解)(博主推荐) 基于Ubuntu14.04下Suricata(一款高性能的网络ID ...

  7. 基于CentOS6.5下Suricata(一款高性能的网络IDS、IPS和网络安全监控引擎)的搭建(图文详解)(博主推荐)

    不多说,直接上干货! 为什么,要写这篇论文? 是因为,目前科研的我,正值研三,致力于网络安全.大数据.机器学习研究领域! 论文方向的需要,同时不局限于真实物理环境机器实验室的攻防环境.也不局限于真实物 ...

  8. Linux下OpenSSL 安装图文详解

    安装环境:        操作系统:CentOs6.3 OpenSSL Version:openssl-1.0.0e.tar.gz 目前版本最新的SSL地址为http://www.openssl.or ...

  9. 全网最详细的最新稳定OSSEC搭建部署(ossec-server(CentOS6.X)和ossec-agent(CentOS6.X))(图文详解)

    不多说,直接上干货! 前言 写在前面的话,网上能够找到一些关于ossec方面的资料,虽然很少,但是总比没有强,不过在实际的使用过程中还是会碰到许多稀奇古怪的问题.整理整理我的使用过程,就当做一篇笔记吧 ...

随机推荐

  1. 大型工程多个目录下的Makefile写法

    1.前言 目前从事于linux下程序开发,涉及到多个文件,多个目录,这时候编译文件的任务量比较大,需要写Makefile.关于Makefile的详细内容可以参考网上流传非常广泛的<跟我一起写Ma ...

  2. [Advanced Algorithm] - Validate US Telephone Numbers

    题目 如果传入字符串是一个有效的美国电话号码,则返回 true. 用户可以在表单中填入一个任意有效美国电话号码. 下面是一些有效号码的例子(还有下面测试时用到的一些变体写法): 555-555-555 ...

  3. 【sqli-labs】 less27 GET- Error based -All you Union&Select Belong to us -String -Single quote(GET型基于错误的去除了Union和Select的单引号字符型注入)

    看一下过滤函数 看一下/s是什么东西 那直接通过大小写就可以绕过了 http://192.168.136.128/sqli-labs-master/Less-27/?id=0'%a0uNion%a0s ...

  4. mysql安装包下载地址

    1.打开mysql官网 :https://dev.mysql.com/ 2.选择 downlad-->windows-->MySQL Installer -->滑动至页面底部,选择第 ...

  5. 三种“BIOS设置光驱第一启动的图解”

    除特殊机器类型一般都是“开机按DEL进入BIOS界面,当然还有AMD主板有按F2的进入” 第一种.AWARD BIOS设置光驱启动方法: 进入Bios界面,选第二项——>回车 选中此项,按PAG ...

  6. javaee Properties键值对写入和读取方法

    package Zjshuchu; import java.util.Properties; import java.util.Set; public class Demo03 { public st ...

  7. 死磕itchat源码--core.py

    core.py文件中的Core类定义了itchat的所有接口.且,仅仅是定义了接口,全部在component包中实现重构.其用法如下表述: 缺省 源码如下: # -*- encoding: utf-8 ...

  8. 13、Next Item Recommendation with Self-Attention---自注意力+CML

    一.摘要: 自注意力机制------从用户历史交互中推断出项目-项目关系.学习每个项目的相对权重[用来学习用户的暂时兴趣表示] 二. 模型: 一部分是用于建模用户短期意图的自注意力机制,一部分是建模用 ...

  9. MySQL7.5.15数据库配置主从服务器实现双机热备实例教程

    环境说明 程序在:Web服务器192.168.0.57上面 数据库在:MySQL服务器192.168.0.67上面 实现目的:增加一台MySQL备份服务器(192.168.0.68),做为MySQL服 ...

  10. Java设计模式之 — 策略(Strategy)

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/8986285 今天你的leader兴致冲冲地找到你,希望你可以帮他一个小忙,他现在急 ...