腾讯云centos 6.5怎么挂载云数据盘?

腾讯云centos 6.5怎么挂载云数据盘?

Nginx是通过apt-get安装的,所以我的路径与下载代码,然后编译和安装它有点不同。我的升级流程如下

1.进入Downloads文件夹

cd /Downloads

2.下载nginx-1.2.5.tar.gz文件到Downloads文件夹中

wget http://nginx.org/download/nginx-1.2.5.tar.gz

3.解压nginx-1.2.5.tar.gz文件

tar zxvf nginx-1.2.5.tar.gz

4.进入ngixn-1.2.5文件夹中

cd nginx-1.2.5

5.查看nginx原来的配置

nginx -V

上面的命令将输出:

--prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

6.执行configure命令,后面跟上原来nginx的配置

./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

在执行configure时得到几个错误:

a.配置 –with-http_xslt_module 时提示 the HTTP XSLT module requires the libxml2/libxslt libraries

sudo apt-get install libxml2 libxml2-dev libxslt-dev

b.配置 –with-http_image_filter_module 时提示 the HTTP image filter module requires the GD library.

sudo apt-get install libgd2-xpm libgd2-xpm-dev

c.配置 –with-http_geoip_module 时提示 the GeoIP module requires the GeoIP library.

sudo apt-get install geoip-database libgeoip-dev

d.rewrite需要pcre支持, 错误提示:./configure: error: the HTTP rewrite module requires the PCRE library.

apt-get install libpcre3 libpcre3-dev

 

7.再执行第6步的configure命令

8.这次没有提示缺少library, 执行make令命编译nginx, 编译好以后objs目录下多出一个nginx文件,这个就是已编辑好的nginx程序

make

9.更改旧的nginx程序的名子,并复制新的程序过去,我的旧nginx程序放在/usr/sbin/目录中

mv /usr/sbin/nginx /usr/sbin/nginx-20121122
cp objs/nginx /usr/sbin/nginx
/usr/sbin/nginx -t

执行/usr/sbin/nginx -t 命令检查配置文件并将返回下面的信息:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

10.在nginx-1.2.5目录下执行下面的命令来升级nginx

make upgrade

11.执行make upgrade得到一个错误:

make: /etc/nginx/sbin/nginx: Command not found
make: *** [upgrade] Error 127

12.用文本编辑器打开修改nginx-1.2.5目录下名为Makefile的文件,将upgrade节点中的/etc/nginx/sbin/nginx改为/usr/sbin/nginx -t,保存后关闭并重新执行make upgrade命令

13.执行nginx -v命令,程序的版本号已经是1.2.5,升级完毕.

文章来源网络,作者:管理,如若转载,请注明出处:https://shuyeidc.com/wp/115334.html<

(0)
管理的头像管理
上一篇2025-02-18 01:47
下一篇 2025-02-18 01:48

相关推荐

  • 站群服务器一个IP放几个网站合适?,怎么选

    站群服务器一个IP放3-5个网站是大多数情况下的最佳平衡点,但具体数量需根据网站权重、内容质量及IP资源成本灵活调整,这个结论基于搜索引擎对同IP站点的关联判定逻辑,以及站群运营的长期实践,如果你刚接触站群,可能会纠结于IP分配,但核心原则是:不要让搜索引擎轻易识别出这些网站属于同一实体,站群IP分配的底层逻辑……

    2026-07-26
    0
  • DDoS攻击和CC攻击有什么区别,怎么防御?

    DDoS攻击和CC攻击最核心的区别在于攻击目标不同:DDoS攻击主要消耗网络带宽和基础设施资源,而CC攻击专门针对应用层逻辑,耗尽服务器CPU和数据库连接数,两者从原理到防御手段完全不同,攻防视角下的本质差异攻击目标:一个砸门,一个撬锁DDoS攻击(分布式拒绝服务)瞄准的是网络层和传输层,通过大量伪造数据包或畸……

    2026-07-26
    0
  • 服务器UEFI和Legacy启动模式有什么区别,哪个好

    UEFI(统一可扩展固件接口)是取代传统Legacy BIOS的现代启动标准,在服务器领域,UEFI凭借更快的启动速度、超过2TB的磁盘支持、安全启动(Secure Boot)以及丰富的预启动网络功能,成为主流服务器的默认配置;而Legacy BIOS作为兼容性模式,仅在需要运行老旧操作系统或特定硬件时保留,U……

    2026-07-26
    0
  • 站群服务器为什么比普通服务器贵,哪家性价比高?

    站群服务器之所以比普通服务器贵,核心在于其为了支撑大量独立站点同时稳定运行,在硬件隔离、独立IP资源池、高防御网络架构以及合规运维上投入了普通服务器数倍的成本,这些硬性支出直接反映在了最终定价上,硬件配置的“冗余”设计决定成本基线站群服务器与普通服务器最直观的差异体现在硬件层面,普通服务器往往面向单一应用或少量……

    2026-07-26
    0
  • 企业级服务器和普通服务器区别在哪?,怎么选性价比高

    前者为关键业务连续性与高并发场景设计,具备硬件冗余、故障自愈和全生命周期管理能力;后者面向基础应用,追求性价比与部署便捷性,硬件架构的底层差异企业级服务器从硬件选型就与普通服务器划清界限,CPU通常支持多路互联,内存频率更高且支持ECC纠错与RAS特性,存储控制器配备缓存保护与RAID加速,普通服务器往往采用单……

    2026-07-26
    0

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注