Quantcast
Image

Search Results for: home

How to install Internet Explorer in Linux

By  •  May 28, 2018

The prerequisites for installing IE in Linux is wine and cabextract. To install these 2 packages in Ubuntu, simply run the following command;

$ sudo apt-get install wine cabextract

Next is to download and run the installer script provided by the nice guys at the IEs4Linux project;

$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
$ tar xf ies4linux-latest.tar.gz
$ ies4linux-*/ies4linux

The installer will then download and install the neccessary files and programs after clicking the Ok button at the following screen;

In the end, just execute the following command to run the installed Internet Explorer version of choice;

$ ~/bin/ie6

How to install full version of Vim in Red Hat / CentOS

By  •  May 28, 2018

CentOS and Red Hat comes with vim-minimal installed by default which lacks support for syntax highlighting and many other features.

To see currently installed version, run vi --version at the command line and note the list of enabled and disabled features.

[root@centos ~]# vi --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  2 2017 00:45:54)
Included patches: 1-160
Modified by <[email protected]>
Compiled by <[email protected]>
Small version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_sgr       -tag_old_static
-arabic          -file_in_path    -mouse_sysmouse  -tag_any_white
-autocmd         -find_in_path    -mouse_urxvt     -tcl
-balloon_eval    -float           -mouse_xterm     +terminfo
-browse          -folding         +multi_byte      -termresponse
+builtin_terms   -footer          -multi_lang      -textobjects
-byte_offset     +fork()          -mzscheme        -title
-cindent         -gettext         -netbeans_intg   -toolbar
-clientserver    -hangul_input    -path_extra      -user_commands
-clipboard       +iconv           -perl            -vertsplit
-cmdline_compl   -insert_expand   -persistent_undo -virtualedit
+cmdline_hist    +jumplist        -printer         +visual
-cmdline_info    -keymap          -profile         -visualextra
-comments        -langmap         -python          -viminfo
-conceal         -libcall         -python3         -vreplace
-cryptv          -linebreak       -quickfix        +wildignore
-cscope          -lispindent      -reltime         -wildmenu
-cursorbind      -listcmds        -rightleft       +windows
-cursorshape     -localmap        -ruby            +writebackup
-dialog          -lua             -scrollbind      -X11
-diff            -menu            -signs           -xfontset
-digraphs        -mksession       -smartindent     -xim
-dnd             -modify_fname    -sniff           -xsmp
-ebcdic          -mouse           -startuptime     -xterm_clipboard
-emacs_tags      -mouse_dec       -statusline      -xterm_save
-eval            -mouse_gpm       -sun_workshop    -xpm
-ex_extra        -mouse_jsbterm   -syntax
-extra_search    -mouse_netterm   -tag_binary
   system vimrc file: "/etc/virc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -Wl,-z,relro  -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux -lncurses -lacl -lattr -ldl

To use the version of vim with most of the features enabled in CentOS / Red Hat, you’ll have to install vim-enhanced. This could be done by following these steps at the command line;

Use administrator account or sudo to perform the installation.

  1. Remove the installed vim-minimal.

    yum remove -y vim-minimal
  2. Update package list from the repositories.

    yum -y update
  3. Install vim-enhanced and related dependencies.

    yum install -y vim-enhanced

Running vim --version should produce a more desirable output.

Note that the command is now vim instead of vi.

[root@centos ~]# vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  2 2017 00:45:39)
Included patches: 1-160
Modified by <[email protected]>
Compiled by <[email protected]>
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -Wl,-z,relro  -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl  -lselinux  -lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector  -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc

How to check installed PHP version

By  •  May 28, 2018

Here are some ways that you can check the installed version of PHP in your system;

  1. Run php -v from the command line.

    $ php -v
    PHP 7.0.19 (cli) (built: Jun 21 2017 07:13:57) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
  2. Run php -i from the command line.

    $ php -i | grep "PHP Version"
    PHP Version => 7.0.19
    PHP Version => 7.0.19
  3. Print PHP_VERSION_ID from PHP script.

    <?php 
    echo PHP_VERSION_ID;
    //Sample output: 70019
    ?>
  4. Print phpversion() output from PHP script.

    <?php 
    echo phpversion();
    //Sample output: 7.0.19
    ?>
  5. View from phpinfo() output

    <?php 
    phpinfo();
    ?>

  6. Query your package manager where the PHP packages are installed from. Here’s a list of some common package managers and the corresponding commands;
Platform Location
homebrew brew list –versions php
Debian/Ubuntu
RedHat/CentOS

How to install full version of Vim in Ubuntu

By  •  May 28, 2018

Vim is a very powerful text editor and is available in almost all modern computing platforms. It is bundled in the default installation of almost Linux distribution, though Ubuntu ships with the minimal version of Vim which lack features such as syntax highlighting making it less powerful or useful as it could be.

Details about the currently installed version could be gathered by running vi --version from the command line;

Note the list of enabled and disabled features.

$ vi --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43)
Included patches: 1-197, 322, 377-378, 422, 550
Modified by [email protected]
Compiled by [email protected]
Small version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_netterm   +tag_binary
-arabic          -file_in_path    -mouse_sgr       -tag_old_static
-autocmd         -find_in_path    -mouse_sysmouse  -tag_any_white
-balloon_eval    -float           -mouse_urxvt     -tcl
-browse          -folding         -mouse_xterm     -termguicolors
+builtin_terms   -footer          +multi_byte      +terminfo
-byte_offset     +fork()          -multi_lang      -termresponse
-channel         -gettext         -mzscheme        -textobjects
-cindent         -hangul_input    -netbeans_intg   -timers
-clientserver    +iconv           -num64           -title
-clipboard       -insert_expand   +packages        -toolbar
-cmdline_compl   -job             -path_extra      -user_commands
+cmdline_hist    +jumplist        -perl            +vertsplit
-cmdline_info    -keymap          -persistent_undo -virtualedit
-comments        -lambda          -printer         +visual
-conceal         -langmap         -profile         -visualextra
-cryptv          -libcall         -python          -viminfo
-cscope          -linebreak       -python3         -vreplace
-cursorbind      -lispindent      -quickfix        +wildignore
-cursorshape     -listcmds        -reltime         -wildmenu
-dialog          -localmap        -rightleft       +windows
-diff            -lua             -ruby            +writebackup
-digraphs        -menu            -scrollbind      -X11
-dnd             -mksession       -signs           +xfontset
-ebcdic          -modify_fname    -smartindent     -xim
-emacs_tags      -mouse           -startuptime     -xpm
-eval            -mouse_dec       -statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
-extra_search    -mouse_jsbterm   -syntax          -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux -lacl -lattr -ldl

The full version however is available in the default package repository and can easily be installed by following these steps at the terminal;

  1. Remove vim-tiny which is the default installation package.

    sudo apt -y remove vim-tiny
  2. Update package list.

    sudo apt -y update
  3. Install the full version of Vim.

    sudo apt -y install vim
  4. Verify package is successfully installed and view the list of enabled features.

    $ vi --version
    VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43)
    Included patches: 1-197, 322, 377-378, 422, 550
    Modified by [email protected]
    Compiled by [email protected]
    Huge version without GUI.  Features included (+) or not (-):
    +acl             +file_in_path    +mouse_sgr       +tag_old_static
    +arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
    +autocmd         +float           +mouse_urxvt     -tcl
    -balloon_eval    +folding         +mouse_xterm     +termguicolors
    -browse          -footer          +multi_byte      +terminfo
    ++builtin_terms  +fork()          +multi_lang      +termresponse
    +byte_offset     +gettext         -mzscheme        +textobjects
    +channel         -hangul_input    +netbeans_intg   +timers
    +cindent         +iconv           +num64           +title
    -clientserver    +insert_expand   +packages        -toolbar
    -clipboard       +job             +path_extra      +user_commands
    +cmdline_compl   +jumplist        -perl            +vertsplit
    +cmdline_hist    +keymap          +persistent_undo +virtualedit
    +cmdline_info    +lambda          +postscript      +visual
    +comments        +langmap         +printer         +visualextra
    +conceal         +libcall         +profile         +viminfo
    +cryptv          +linebreak       -python          +vreplace
    +cscope          +lispindent      +python3         +wildignore
    +cursorbind      +listcmds        +quickfix        +wildmenu
    +cursorshape     +localmap        +reltime         +windows
    +dialog_con      -lua             +rightleft       +writebackup
    +diff            +menu            -ruby            -X11
    +digraphs        +mksession       +scrollbind      -xfontset
    -dnd             +modify_fname    +signs           -xim
    -ebcdic          +mouse           +smartindent     -xpm
    +emacs_tags      -mouseshape      +startuptime     -xsmp
    +eval            +mouse_dec       +statusline      -xterm_clipboard
    +ex_extra        +mouse_gpm       -sun_workshop    -xterm_save
    +extra_search    -mouse_jsbterm   +syntax
    +farsi           +mouse_netterm   +tag_binary
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
          user exrc file: "$HOME/.exrc"
           defaults file: "$VIMRUNTIME/defaults.vim"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm

How to fix Remote Host Identification Has Changed error in SSH

By  •  May 28, 2018

SSH by default will check and keep key fingerprint of all the hosts you’ve connected to in ~/.ssh/known_hosts. You’ll get the following warning if the fingerprint changed from the last time you’ve connected to the host;

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
11:5b:16:56:a5:cd:9b:1e:11:aa:2b:1c:a2:91:cd:a2.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:1
RSA host key for docs.oseems.com has changed and you have requested strict checking.
Host key verification failed.

You can fix the problem by whether disabling the key check, or have the right key in your ~/.ssh/known_hosts file.

The check is done for security reason. Proceed only if you know exactly what you’re into.

How to completely remove application and related settings in Ubuntu

By  •  May 28, 2018

Whenever you uninstall or remove a program/package in Ubuntu, only the binaries are removed but some of the related configuration files remain in your system. They can be anywhere in /etc or as a hidden file/folder in your home directory.

At certain time and situation you might need to completely remove both the binaries and settings. There are 2 methods to do this in Ubuntu

How to do automatic backup in Linux

By  •  May 28, 2018

From it’s man page, rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file is being updated.

The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network connection, using an efficient checksum-search algorithm described in the technical report that accompanies this package.

Say 192.168.1.10 (anduril) is the backup destination , herugrim is the host’s hostname, the following step will automatically rsync the home directory to the backup server.

How to extract 7z file in Linux

By  •  May 28, 2018

7-Zip is a file archiver program that claims to compress files into smaller size compared to other programs such as WinRAR and WinZip. The program can pack and unpack various formats such as ZIP, GZIP, BZIP2, TAR, and of course, its own format, 7z. The 7z format itself is actually a container that supports few compression method such as LZMA, Deflate and BZIP2, with LZMA as default.

Top