在centos下安装sublimeText的步骤和方法
方法一:通过yum安装(比较简单但是版本无法最新)
- 安装 GPG key:
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
- 选择稳定版还是开发版:
- 稳定版:
sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
- 开发版:
sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
- Update yum and install Sublime Text
sudo yum install sublime-text
方法二:从源码安装:(步骤较多但是能安装最新版本)
- 下载并解压:
wget https://download.sublimetext.com/sublime_text_3_build_3143_x64.tar.bz2
sudo tar -vxjf sublime_text_3_build_3065_x64.tar.bz2 -C /usr/local/sublime
- 建立软链接,以方便终端打开
ln -s /usr/local/sublime/sublime_text_3 /usr/bin/sublime
- 建立桌面快捷
cp /usr/local/sublime/sublime_text.desktop /usr/share/applications
cd /usr/share/applications
vim sublime_text.desktop
#修改
Icon=/usr/local/sublime/Icon/48x48/sublime-text.png"
Exec=sublime -n
#将图标复制到桌面