<<上篇 | 首页 | 下篇>>

Nginx安装 – 运维与架构

2.安装PCRE库
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 下载最新的 PCRE 源码包,使用下面命令下载编译和安装 PCRE 包:

cd /usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
tar -zxvf pcre-8.21.tar.gz
cd pcre-8.21
./configure
make
make install

3.安装zlib库
http://zlib.net/zlib-1.2.8.tar.gz 下载最新的 zlib 源码包,使用下面命令下载编译和安装 zlib包:

cd /usr/local/src
 
wget http://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make
make install

4.安装ssl(某些vps默认没装ssl)

cd /usr/local/src
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -zxvf openssl-1.0.1c.tar.gz

5.安装nginx

Nginx 一般有两个版本,分别是稳定版和开发版,您可以根据您的目的来选择这两个版本的其中一个,下面是把 Nginx 安装到 /usr/local/nginx 目录下的详细步骤:

cd /usr/local/src
wget http://nginx.org/download/nginx-1.4.2.tar.gz
tar -zxvf nginx-1.4.2.tar.gz
cd nginx-1.4.2
 
./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=/usr/local/src/pcre-8.21 \
--with-zlib=/usr/local/src/zlib-1.2.8 \
--with-openssl=/usr/local/src/openssl-1.0.1c
 
make
make install

--with-pcre=/usr/src/pcre-8.21 指的是pcre-8.21 的源码路径。
--with-zlib=/usr/src/zlib-1.2.7 指的是zlib-1.2.7 的源码路径。

 

阅读全文……

标签 : ,

利用光盘在 centos5.4 上安装gcc步骤 - 石林博客 - 51CTO技术博客

CentOS5.4系统安装在虚拟机上,编译gcc. 
挂载CentOS的DVD系统光盘,然后进入CentOS目录内,安装顺序如下:
rpm -ivh cpp-4.1.2-42.el5.i386.rpm
rpm -ihv 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

注意:必须安装: kernel-headers-2.6.18-92.el5.i386.rpm 这个包,否则报错:
warning: glibc-headers-2.5-24.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.5-24.i386
kernel-headers >= 2.2.1 is needed by glibc-headers-2.5-24.i386
安装:g++

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

阅读全文……

标签 : ,

Redhat Linux 光盘安装gcc

Here is the Document which states how to install GCC with dependencies,
 

Problem:
————————————————————————————
[[email protected] Packages]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
 cloog-ppl >= 0.15 is needed by gcc-4.4.4-13.el6.x86_64
 cpp = 4.4.4-13.el6 is needed by gcc-4.4.4-13.el6.x86_64
------------------------------------------------------------------------

Solution:
Run these commands:
1) First, let’s get glibc header:
[[email protected] Packages]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm
warning: glibc-headers-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:glibc-headers          ########################################### [100%]

2) Now, glibc devel:
[[email protected] Packages]# rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm
warning: glibc-devel-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]

3) Let's see if cpp installation works now:
[[email protected] Packages]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
 libmpfr.so.1()(64bit) is needed by cpp-4.4.4-13.el6.x86_64

4) Let's sort out above error:
[[email protected] Packages]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
warning: mpfr-2.4.1-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:mpfr                   ########################################### [100%]

5) Try if cloog is working for you:
[[email protected] Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
 libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
 libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64

6) Install ppl:
[[email protected] Packages]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:ppl                    ########################################### [100%]

7) Try again, if gloog is working:
[[email protected] Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:cloog-ppl              ########################################### [100%]

8) Install cpp:
[[email protected] Packages]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:cpp                    ########################################### [100%]

9) Finally, install gcc:
[[email protected] Packages]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing… ########################################### [100%]
1:gcc ########################################### [100%]
 
 
10) Alternatively instead of step 9, you can use YUM,
[[email protected] Packages]# sudo yum install gcc-4.4.6-3.el6.x86_64.rpm 

 

 

 

 

另外一次安装记录:

 

[root@oel6test Packages]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm 
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
cloog-ppl >= 0.15 is needed by gcc-4.4.4-13.el6.x86_64
cpp = 4.4.4-13.el6 is needed by gcc-4.4.4-13.el6.x86_64

First up:

[root@oel6test Packages]# rpm -ivh glibc-headers-2.12-1.7.el6.x86_64.rpm 
warning: glibc-headers-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]

Now I can load the devel files for glibc.

[root@oel6test Packages]# rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm 
warning: glibc-devel-2.12-1.7.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]

What else?

[root@oel6test Packages]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm 
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
libmpfr.so.1()(64bit) is needed by cpp-4.4.4-13.el6.x86_64

Seriously. Since this isn't the first time today, I know what package that so file is from.

[root@oel6test Packages]# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm 
warning: mpfr-2.4.1-6.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:mpfr ########################################### [100%]

Now cloog-ppl.

[root@oel6test Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64

What about a ppl* package?

[root@oel6test Packages]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm 
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]

Almost there. Back to cloog.

[root@oel6test Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:cloog-ppl ########################################### [100%]

cpp

[root@oel6test Packages]# rpm -ivh cpp-4.4.4-13.el6.x86_64.rpm 
warning: cpp-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]

gcc?


[root@oel6test Packages]# rpm -ivh gcc-4.4.4-13.el6.x86_64.rpm 
warning: gcc-4.4.4-13.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]

 

 

再一次gcc安装记录,另加C++

#gcc

rpm -ivh kernel-headers*

rpm -ivh glibc-headers*

rpm -ivh mpfr*

rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm

rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm

rpm -ivh cpp*

rpm -ivh glibc-devel-2.12-1.7.el6.x86_64.rpm

 

#c++

rpm -ivh libstdc++-devel-4.4.4-13.el6.x86_64.rpm

rpm -ivh gcc-c++-4.4.4-13.el6.x86_64.rpm

标签 : ,