Tuesday, 5 December 2017

How to install sublime text editor on CentOS 7

How to install sublime text editor on CentOS 7

To install Sublime Text Editor on CentOS 7

Sublime Text is a cross-platform source code editor developed based on Python's Application Programming Interface (API). It supports many programming and markup languages and its functionality can be extended with the addition of surportive plugins, which are community-built and maintained under free-software licenses. In this tutorial you will be briefed about the installation of Sublime Text Editor on CentOS 7.

Features:-
  • Goto Anything," quick navigation to files, symbols, or lines 
  • "Command palette" uses adaptive matching for quick keyboard invocation of arbitrary commands 
  • Simultaneous editing: simultaneously make the same interactive changes to multiple selected areas 
  • Python-based plugin API 
  • Project-specific preferences 
  • Extensive customizability via JSON settings files, including project-specific and platform-specific settings 
  • Cross platform (Windows, OS X, Linux) 
  • Compatible with many language grammars from TextMate

Installing Sublime Text Editor

Let us begin by downloading the rpm of Sublime Editor by using the following command.
[root@localhost Desktop]# rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg

One it is downloaded, add the required repo file for sublime text editor to your machine as follows.
[root@localhost Desktop]# yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
grabbing file https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo to /etc/yum.repos.d/sublime-text.repo
sublime-text.repo                                                             |  192 B  00:00:00     
repo saved to /etc/yum.repos.d/sublime-text.repo
Now is the time to install the Sublime Text Editor. You can do it by running the following command.
[root@localhost Desktop]# yum install sublime-text -y
Loaded plugins: fastestmirror, langpacks
base                                                                          | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                          | 4.8 kB  00:00:00     
epel                                                                          | 4.3 kB  00:00:00     
extras                                                                        | 3.4 kB  00:00:00    
.
.
.
  Installing : sublime-text-3126-1.x86_64                                                        1/1 
  Verifying  : sublime-text-3126-1.x86_64                                                        1/1 

Installed:
  sublime-text.x86_64 0:3126-1                                                                       

Complete!


Sublime Text Editor has been installed. You can launch it with the help of the following command from your terminal.
[root@localhost Desktop]# subl

Monday, 4 December 2017

Installing and Using PGP with GNU Privacy Guard (GnuPG) on RHEL 6.3

Introduction

In this blog I will show you how to use PGP client GNU Privacy Guard (GnuPG) on RHEL 6.3. PGP can be used to encrypt files which can be stored somewhere on remote disc or by sending as attached files.

Installation

Installation was quite smooth, except founding the missing dependency package pinentry-gtk, which should be installed automatically.
?
1
$ yum install gnupg2 pinentry-gtk

Test your installation

A simple test to see that GnuPG is installed properly is to ask for each version.
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ gpg --version
gpg (GnuPG) 2.0.14
libgcrypt 1.4.5
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Setup

Creating Private Key Pair

The first thing to do, after installation was successful, is to generate the necessary keys used for encrypting and decrypting files. To generate you private key pair, do the following.
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$ gpg --gen-key
gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection?
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 2y
Key expires at Thu 15 Jan 2015 08:39:54 PM CET
Is this correct? (y/N) y
 
GnuPG needs to construct a user ID to identify your key.
 
Real name: YOUR NAME
Email address: your.name@domain.com
Comment:
You selected this USER-ID:
    "YOUR NAME <your.name@domain.com>"
 
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
 
etc.

Exporting Public Key

To be able to receive encrypted files, you need to export your public key. The text files generated below can be emailed as attachment or more preferable distributed in a more secure way, such as manually handed over via USB memory.
?
1
gpg --armor --output "key.txt" --export "YOUR NAME"

Usage

Now you are ready to use GnuPG. A good tutorial guide for the most common usage can be found here http://www.glump.net/howto/gpg_intro.

Troubleshooting