简体   繁体   English

如何在 CentOS 7 / RHEL 7 上安装 Sublime 3?

[英]How to install Sublime 3 on CentOS 7 / RHEL 7?

Sublime is really cool.崇高真的很酷。 Loved the slick user interface, a perfect developer environment and an amazing performance.喜欢流畅的用户界面、完美的开发环境和惊人的性能。 Today I was re-installing the sublime as my OS has some problem.今天我正在重新安装 sublime,因为我的操作系统有一些问题。 Thought to share the steps to install the Sublime, as this is a great tool for developers- Its really a editor which you'll fall in love with.想分享安装 Sublime 的步骤,因为这对开发人员来说是一个很棒的工具 - 它真的是一个你会爱上的编辑器。

Here are the Steps:以下是步骤:
Step 1: Download Sublime: You can either download from their website or use the wget as I did:第 1 步:下载 Sublime:您可以从他们的网站下载,也可以像我一样使用 wget:

$ cd ~/Downloads
## On 32bit
$ wget https://download.sublimetext.com/sublime_text_3_build_3126_x32.tar.bz2

## On 64bit
$ wget https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2

Step 2. Extract Sublime package (example to /opt directory)步骤 2. 解压 Sublime 包(例如到 /opt 目录)
You can store Sublime at any place you want.你可以将 Sublime 存储在任何你想要的地方。 Here, I saved under /opt directory.在这里,我保存在 /opt 目录下。

## On 32bit
$ sudo tar -vxjf sublime_text_3_build_3126_x32.tar.bz2 -C /opt
## On 64bit
$ sudo tar -vxjf sublime_text_3_build_3126_x64.tar.bz2 -C /opt

Step 3. Now, let's make a symbolic link to the installed Sublime3 so that we can run the same from command line第 3 步。 现在,让我们创建一个指向已安装 Sublime3 的符号链接,以便我们可以从命令行运行它

# sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime3

Step 4. Now, let's test whether the Sublime3 is installed correctly or not. Step 4. 现在,让我们测试一下 Sublime3 是否安装正确。
Type sublime3 in command line and it will open up the sublime window.在命令行中输入 sublime3,它将打开 sublime 窗口。

$ sublime3

Step 5. Create Gnome desktop launcher You can run Sublime3 on desktop by clicking a icon.步骤 5. 创建 Gnome 桌面启动器您可以通过单击图标在桌面上运行 Sublime3。

$ sudo sublime3 /usr/share/applications/sublime3.desktop

Step 6. Append this and close file.步骤 6. 附加此文件并关闭文件。

[Desktop Entry]
Name=Sublime3
Exec=sublime3
Terminal=false
Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png
Type=Application
Categories=TextEditor;IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow

[NewWindow Shortcut Group]
Name=New Window
Exec=sublime -n
TargetEnvironment=Unity

Now, you can see the Sublime3 icon on under Applications → Programming.现在,您可以在 Applications → Programming 下看到 Sublime3 图标。
You can run Sublime3 on desktop by clicking this icon.您可以通过单击此图标在桌面上运行 Sublime3。 Enjoy!!享受!!

To install sublime on CentOS, RHEL and older version of Fedora, run the following commands-要在 CentOS、RHEL 和旧版 Fedora 上安装 sublime,请运行以下命令-

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 install sublime-text

Sublime is Installed安装了 Sublime

# Check the version of Sublime 

subl --version

Hope this works!!!希望这有效!!!

Enter into SU then copy and paste into terminal.进入 SU 然后复制粘贴到终端。

rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg && yum update && yum install yum-utils -y && sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo && yum update && yum install sublime-text -y rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg && yum update && yum install yum-utils -y && sudo yum-config-manager --add-repo https:// download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo && yum update && yum install sublime-text -y

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM