linux 下开发环境安装
配置git存储账号密码
sh
gitVersion=`git --version`
if [ -z "$gitVersion" ] ; then
echo "git不存在,请先安装git..."
exit 0
else
echo "git已经安装过了..."
fi
# git用户信息
git config --global user.name "kulaiyin"
git config --global user.email "kly0214@163.com"
# 保存账号密码
git config --global credential.helper store
# 清除账号密码
git config --global --unset credential.helper清除系统web凭证
控制面板 -> 用户账户 -> 凭证管理器 -> Windows凭据 -> 删除对应凭据
创建桌面图标
sh
echo "创建桌面图标..."
[Desktop Entry]
Name=CLion
Comment=开发C++工具
Exec=/works/UsedTools/clion/bin/clion.sh
Type=Application
Terminal=false
Icon=/works/UsedTools/clion/bin/clion.png
# 修改权限
chmod 744 /usr/share/applications/CLion.desktop安装rbenv
sh
# 安装
bash -c "$(curl -fsSL https://gitee.com/RubyMetric/rbenv-cn/raw/main/tool/install.sh)"
# 卸载
# bash -c "$(curl -fsSL https://gitee.com/RubyMetric/rbenv-cn/raw/main/tool/uninstall.sh)"
# 使其在当前终端生效
source ~/.bashrc
# 查看版本
rbenv -v
# 查看ruby可安装版本
rbenv cninstall -l
# 安装所需依赖
sudo apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev libffi
# 下载过程中openssl需要从github进行下载,需要能够访问github
rbenv cninstall 3.4.6
# 查看ruby版本号
ruby -v
# gem换源
gem source -r https://rubygems.org/
gem source -a https://gems.ruby-china.com
# 安装bundle
gem install bundler
bundle config 'mirror.https://rubygems.org' 'https://gems.ruby-china.com'