`
LiuYiJie2007
  • 浏览: 14944 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Centos5.2 安装gcc,nginx

阅读更多
1.在光盘里 centos目录下 安装如下 软件包
rpm -ivh cpp-4.1.2-42.el5.i386.rpm
rpm -ivh kernel-headers-2.6.18-92.el5.i386.rpm
rpm -ivh glibc-headers-2.5-24.i386.rpm   
rpm -ivh glibc-devel-2.5-24.i386.rpm    
rpm -ivh libgomp-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-4.1.2-42.el5.i386.rpm

rpm -ivh libstdc++-devel-4.1.2-42.el5.i386.rpm 
rpm -ivh gcc-c++-4.1.2-42.el5.i386.rpm

安装好后 ,就可以编译c,c++了

2.安装ngnix
  a. 下载稳定版本源码 http://wiki.nginx.org/Install

  b. 安装时提示,缺少pcre
     先下载源码  http://sourceforge.net/projects/pcre/files/pcre/
     进行安装,若提示缺少lib,需先安装
     libsepol-devel-1.15.2-3.el5.i386.rpm,
     libselinux-devel-1.33.4-5.7.el5.i386.rpm
     krb5-devel-1.6.1-55.el5.i386.rpm
     keyutils-libs-devel-1.2-1.el5.i386.rpm
     e2fsprogs-devel-1.39-23.el5_5.1.i386.rpm

  c 安装pcre 后,安装ngnix所需其他包文件
     zlib-devel-1.2.3-3.i386.rpm
     zlib-1.2.3-3.i386.rpm
     openssl-devel-0.9.8e-12.el5_5.7.i386.rpm
     openssl-0.9.8e-12.el5_5.7.i386.rpm
 
  d 为了让 nginx 支持tcp,下载 nginx_tcp_proxy_module 源码
    https://github.com/yaoweibin/nginx_tcp_proxy_module

  e 安装方法
        $ tar -xzvf nginx-version.tar.gz
        $ cd nginx-version/
        $ patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch
        $ ./configure --add-module=/path/to/nginx_tcp_proxy_module
        $ make
        $ make install
      
  f 在安装的过程中 可以看到如下信息

      Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + md5: using system crypto library
  + sha1: using system crypto library
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

安装后 根据需要配置ngnix.conf 启动即可
分享到:
评论

相关推荐

    centos7安装nginx1.16.1

    ### CentOS 7 安装 Nginx 1.16.1 #### 一、概述 本篇文章将详细介绍如何在 CentOS 7 上安装 Nginx 1.16.1 版本。Nginx 是一款轻量级的 Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,由俄罗斯的...

    Centos 5.5 Nginx+php+mysql成功安装案例

    在CentOS 5.5操作系统中,安装Nginx、PHP和MySQL的组合是一个常见的任务,这个过程可以分为几个关键步骤。以下是一个详细的指南,涵盖了从安装基础环境到配置服务的整个过程。 首先,我们需要确保系统中安装了必要...

    Nginx实现最简单的负载均衡web访问操作说明

    本教程基于CentOS 5.2系统进行演示。在开始安装Nginx前,请确保系统已安装以下依赖包: ```bash # yum -y install ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel ncurses-devel ...

    Linux+Apache+Nginx+MySQL+PHP_前后端_部署_生产环境

    这一步骤包括但不限于安装`yum-fastestmirror`、`make`、`gcc`等。 ```bash yum -y remove httpd mysql php yum -y install yum-fastestmirror yum -y update yum -y install patch make gcc gcc-c++ gcc-g77 flex ...

    详细讲诉在32位centos 5.x6.0下配置kmp的方法.pdf

    - 首先,确保系统已经更新并安装了必要的编译工具和库文件,例如`yum -y update`和`yum -y install`命令用于安装`patch`, `make`, `gcc`, `gcc-c++`, `autoconf`等。 - 下载MySQL源码,如`mysql-5.1.58`或`mysql-...

    LEMP构建高性能Web服务器(第3版).pdf

    本文档的参考环境是基于CentOS5.2 32/64位的GNU/Linux操作系统,并推荐使用64位系统。LEMP环境的搭建目标是提供稳定的WEB服务。 首先,进行系统安装时,分区建议按照以下规范进行: - /boot分区保留100M左右的空间...

    分布式文件系统FastDFS安装部署教程

    2. **编译工具**: 需要安装GCC以及其他必要的编译工具。 3. **依赖库**: 安装libevent等依赖库。 **3.2 下载FastDFS源码** 从FastDFS的官方网站或者GitHub仓库下载最新版本的源码包。 **3.3 编译安装** 1. **...

Global site tag (gtag.js) - Google Analytics