yum编译安装

第一步
获取源代码包  
[root@qls ~]# wget  http://nginx.org/download/nginx-1.16.1.tar.gz

第二步
解压代码包
[root@qls ~]# tar  xf  nginx-1.16.1.tar.gz

第三步
进入到目录中,执行预编译,编写编译参数,生成一个Makefile的文件
[root@qls ~]# cd nginx-1.16.1
[root@qls nginx-1.16.1]# ./configure   --prefix=/application/nginx-1.16.1  --with-http_ssl_module

执行时报错
[root@qls nginx-1.16.1]# ./configure   --prefix=/application/nginx-1.16.1  --with-http_ssl_module
checking for OS
 + Linux 3.10.0-1062.4.3.el7.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found

解决:
[root@qls nginx-1.16.1]# yum install  -y  gcc

再次执行报错
[root@qls nginx-1.16.1]# ./configure   --prefix=/application/nginx-1.16.1
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

解决: 
[root@qls nginx-1.16.1]# yum install  -y  pcre  pcre-devel

再次执行报错
[root@qls nginx-1.16.1]# ./configure   --prefix=/application/nginx-1.16.1  --with-http_ssl_module
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

解决
[root@qls nginx-1.16.1]# yum  install  -y  openssl-devel

再次执行
最后生成一个Makefile文件
[root@qls nginx-1.16.1]# ll
-rw-r--r--. 1 root   root    412 Nov 19 10:19 Makefile

第四步
根据Makefile文件进行编译
[root@qls nginx-1.16.1]# make

第五步  
将编译好的文件复制到./configure指定的目录中
[root@qls nginx-1.16.1]# make  install

第六步  
检查 
[root@qls nginx-1.16.1]# ll /application/nginx-1.16.1/
total 4
drwxr-xr-x. 2 root root 4096 Nov 19 10:38 conf
drwxr-xr-x. 2 root root   40 Nov 19 10:38 html
drwxr-xr-x. 2 root root    6 Nov 19 10:38 logs
drwxr-xr-x. 2 root root   19 Nov 19 10:38 sbin


第七步  
软链接  
[root@qls ~]# ln  -s  /application/nginx-1.16.1/   /application/nginx

第八步 
启动nginx
[root@qls ~]# /application/nginx/sbin/nginx

第九步  
浏览器访问  
http://10.0.0.100

磁盘管理

磁盘的工作过程 
机器代码  二进制  0  1  
通过电信号将二进制写入到磁盘

什么是磁盘,软盘,硬盘?
软盘      1.44MB   3.5英寸
硬盘    
磁盘 

硬盘的结构  
盘片    1-5片左右    单片容量   分为两面  盘面  
磁道    成千上万个磁道     
扇区    最小的单位,512字节大小
柱面  
磁头    主要功能:读取和写入数据

磁盘的预备知识 
接口
    IDE   SCSI    淘汰
    SATA        民用
    SATA III             
    SAS         服务器的标配  
    PCIE         固态
    M2            超极本的接口               
    M.2接口是为超极本(Ultrabook)量身定做的新一代接口标准,以取代原来的mSATA接口。无论是更小巧的规格尺寸,还是更高的传输性能,M.2都远胜于mSATA。

机械(HDD) hard disk drive   和   固态(SSD)  solid state drive    
体积大                                体积小    
容量大价格低                        容量小价格高
性能一般                            性能高    
容易损坏                             不容易损坏    
数据恢复易                             数据恢复难
使用寿命无限                        1-2w次    

盘的命名规则
[root@web01 ~]# ll  /dev/sd*
brw-rw----. 1 root disk 8, 0 Nov 18 11:24 /dev/sda
brw-rw----. 1 root disk 8, 1 Nov 18 11:24 /dev/sda1
brw-rw----. 1 root disk 8, 2 Nov 18 11:24 /dev/sda2
brw-rw----. 1 root disk 8, 3 Nov 18 11:24 /dev/sda3

sd    物理磁盘  
    a   第一块磁盘
    b     第二块磁盘 
    1   第一个分区
    /dev/sdd3         第四块硬盘的第三个分区
vd      虚拟磁盘

磁盘的单位及名词
尺寸:  2.5  3.5英寸  
数据单位:    B  KB  MB  GB  TB  PB   
RPM        每分钟的转速
4200   5400   7200rpm     民用  
10k   15k       企业的磁盘转速      
输入输出的单位 
IOPS   单位时间内,系统能够处理的IO读写
Copyright © 高程程 all right reserved,powered by Gitbook修订于: 2021-05-18 21:14:13

results matching ""

    No results matching ""