mysql安装:
1.
git安装:
1.下载安装包:
sudo wget http://learning.happymmall.com/git/git-v2.8.0.tar.gz
2.安装git依赖包:
sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils- MakeMaker
3.解压git压缩包后进入目录
sudo tar -zxvf git-v2.8.0.tar.gz
cd git-2.8.0/
4.sudo make prefix=/usr/local/git all
5.sudo make prefix=/user/local/git install
6.查看git:git --version(提示:command not found)
7.查看git安装到哪里了 whereis git(提示:git: /usr/local/bin/git)之前安装过了
8.配置环境变量:sudo vim /etc/profile:
"PATH="后边添加一条git路径(/usr/local/git/bin:)
然后保存退出:wq!
9.配置生效:source /etc/profile
10.这是查看版本:git --version(提示:git version 2.8.0) 配置成功;
11.配置用户名:
git config --global user.name "immoc"
git config --global user.email "[email protected]"
git config --global core.autocrlf false (配置windows和linux自动换行符转换)
git config --global core.quotepath off (避免中文乱码)
git config --global gui.encoding utf-8
ssh-keygen -t rsa -C "[email protected]"
一路回车
ssh-add ~/.ssh/id_rsa(如果出现:Could not open a connection to your authentication agent.输入:eval `ssh-agent`)
然后在执行 ssh-add ~/.ssh/id_rsa(提示Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)成功)
看一下rsa公钥:cat ~/.ssh/id_rsa.pub
复制到代码托管平台
原文地址:https://www.cnblogs.com/coolcold/p/9181963.html