各种程序的源码安装

2016/09/11 posted in  Linux

nginx

#安装编译nginx必须的依赖
yum install gcc-c++
yum install pcre pcre-devel  
yum install zlib zlib-devel 
yum install openssl openssl--devel

#下载nginx源码
wget http://nginx.org/download/nginx-1.9.15.tar.gz

#解压
tar -zvxf nginx-1.9.15.tar.gz -C ../document/

#编译安装
cd ../document/nginx-1.9.15
./configure
make
make install

setuptools 安装

wget https://bootstrap.pypa.io/ez_setup.py -O - | python

pip源码安装

[pip官网安装](https://pypi.python.org/pypi/pip)

源码安装Git

  1. 安装依赖

     yum install curl
     yum install curl-devel
    yum install zlib-devel
    yum install openssl-devel
    yum install perl
    yum install perl-devel
    yum install cpio
    yum install expat-devel
    yum install gettext-devel
  2. 下载源码编译安装

    wget https://www.kernel.org/pub/software/scm/git/git-2.8.2.tar.gz
    tar xzvf git-2.8.2.tar.gz
    cd git-2.8.2
    autoconf
    ./configure
    make | make install
  3. 配置环境变量

    修改用户目录下的.bashrc或者bash_profile,末尾增加

    export PATH=$PATH:/usr/local/bin
    

    然后重新加载profile

    source ~/.bashrc