Wednesday, April 15, 2015

How to install Sublime 3 on CentOS 7 / RHEL 7

This guide will tell you how to install Sublime3 on CentOS 7 ( Currently, I am using CentOS 7.0). The reason why I start using Sublime3 is Eclipse takes so much time to open a big file ( greater than 1000 lines), especially PHP with PDP.

Step 1. Download [ http://www.sublimetext.com/ ]

There are multiple ways of downloading files. I will download file with wget command. If you want you can download sublime with FireFox.
$ cd ~/Downloads
 
## On 32bit
$ wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3065_x32.tar.bz2
 
## On 64bit
$ wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3065_x64.tar.bz2

Step 2. Extract Sublime package (example to /opt directory)

You can store Sublime any place you want. Here, I will put Sublime under /opt directory. 
## On 32bit
$ sudo tar -vxjf sublime_text_3_build_3065_x32.tar.bz2 -C /opt
 
## On 64bit
$ sudo tar -vxjf sublime_text_3_build_3065_x64.tar.bz2 -C /opt

Step 3. Make a symbolic link to the installed Sublime3

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

Step 4. Run Sublime3 if it is installed correctly.

If you finish Step1 to Step3, you can run sublime from your terminal by executing sublime3.
$ sublime3

Step 5. Create Gnome desktop launcher

You can run Sublime3 on desktop by clicking a icon.
$ sudo sublime3 /usr/share/applications/sublime3.desktop

Step 6. Append this and close file.

[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 Applications/Programming !!
Enjoy!!
You can run Sublime3 on desktop by clicking a icon.

No comments:

Post a Comment