Git基本環境配置

來源:互聯網
上載者:User

Git基本環境配置

yum源中已有的git版太低,所以選擇源碼編譯,也比較簡單,由於git上許多項目需要python環境不同,因此保留系統內建的python2.x版本,並編譯python3.x

# wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz# tar xvf Python-3.5.2.tgz -C /usr/local/src# cd /usr/local/src/Python-3.5.2# ./configure --prefix=/usr/local/python3# make && make install# ln -sv /usr/local/python3/bin/python3.5 /usr/local/bin/python3

python編譯報錯
urllib.error.URLError: <urlopen error unknown url type: https>

安裝openssl,openssl-devel後取消如下關於SSL的注釋,在重新編譯

vim Python-path/Modules/Setup.dist207 #SSL=/usr/local/sslSL)/include -I$(SSL)/include/openssl \208 #_ssl _ssl.c \ib -lssl -lcrypto209 #       -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \210 #       -L$(SSL)/lib -lssl -lcryptoefault because it breaks builds

安裝setuptools&&pip
https://pypi.python.org/pypi/setuptools
http://peak.telecommunity.com/DevCenter/EasyInstall

# python --versionPython 2.7.5# wget https://bootstrap.pypa.io/ez_setup.py -O - | python ##系統內建python2.x# wget https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip8.1.2.tar.gz#md5=87083c0b9867963b29f7aba3613e8f4a ##安裝pip# tar xvf pip-8.1.2.tar.gz -C /usr/local/# cd /usr/local/pip-8.1.2/# python setup.py install# pip --versionpip 8.1.2 from /usr/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg (python 2.7)# python3 -VPython 3.5.2# wget https://bootstrap.pypa.io/ez_setup.py -O - | python3自訂python# cd /usr/local/pip-8.1.2/# python3 setup.py install# pip3 -Vpip 8.1.2 from /usr/local/python3/lib/python3.5/site-packages/pip-8.1.2-py3.5.egg (python 3.5)

安裝git

 # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x # tar xvf git-2.9.2.tar.gz -C /usr/local/src/ # cd /usr/local/src/git-2.9.2/ # make configure # ./configure --prefix=/usr/local # make && make install

GitHub 教程系列文章: 

通過GitHub建立個人技術部落格圖文詳解 

GitHub 使用教程圖文詳解   

Git 標籤管理詳解  

Git 分支管理詳解  

Git 遠程倉庫詳解  

Git 本地倉庫(Repository)詳解  

Git 伺服器搭建與用戶端安裝   

Git 概述  

分享實用的GitHub 使用教程  

GitHub 的詳細介紹:請點這裡
GitHub 的:請點這裡

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.