LaTeX on Debian 8

ai-tee, linux

TeX Live Installation

$ sudo apt-get install texlive-full
$ http://download.opensuse.org/repositories/home:/jsundermeyer/Debian_8.0/amd64/texstudio_2.12.4-3.1_amd64.deb

TeXstudio installation

$ sudo dpkg -i texstudio_2.12.4-3.1_amd64.deb
$ sudo apt-get install -f

Texmaker installation

$ sudo dpkg -i texmaker_debian_jessie_4.5_amd64.deb
$ sudo apt install -f

Sublime installation

$ wget https://download.sublimetext.com/sublime-text_build-3126_amd64.deb
$ sudo dpkg -i sublime-text_build-3126_amd64.deb

Source:

Comments Off on LaTeX on Debian 8

Neo4j Installation on Linux Debian 8

ai-tee, graph-database

Installing Java 8

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Installing Neo4j 3.20 Community Edition

$ wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -

$ echo 'deb http://debian.neo4j.org/repo stable/' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
$ sudo apt-get update
$ sudo apt-get install neo4j=3.2.0

Source(s):

Comments Off on Neo4j Installation on Linux Debian 8

Wildcard SSL Certificate Installation on Zimbra Mail Server

ai-tee, linux

Prepare the necessary files:

  • commercial.key
    Contains private key that is used to generate CSR (for a wildcard certificate, this private key can be from another machine from a same domain)
  • commercial.crt
    Contains a commercial SSL certificate that is generated by a CA, such as “RapidSSL Wildcard certificate” in my case
  • ca_bundle.crt
    Contains CA’s bundle such as “RapidSSL/Wildcard SHA-2 under SHA-1 root” from https://www.namecheap.com/support/knowledgebase/article.aspx/9393/69/where-do-i-find-ssl-ca-bundle)

Installation steps:

# su zimbra
$ ls /opt/zimbra/ssl/zimbra/commercial/
commercial.key
$ ls /tmp/ssl/
ca_bundle.crt  commercial.crt
$ zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /tmp/ssl/commercial.crt /tmp/ssl/ca_bundle.crt
** Verifying '/tmp/ssl/commercial.crt' against '/opt/zimbra/ssl/zimbra/commercial/commercial.key'
Certificate '/tmp/ssl/commercial.crt' and private key '/opt/zimbra/ssl/zimbra/commercial/commercial.key' match.
** Verifying '/tmp/ssl/commercial.crt' against '/tmp/ssl/ca_bundle.crt'
Valid certificate chain: /tmp/ssl/commercial.crt: OK
$ zmcertmgr deploycrt comm /tmp/ssl/commercial.crt /tmp/ssl/ca_bundle.crt
...
** Copying '/tmp/ssl/commercial.crt' to '/opt/zimbra/ssl/zimbra/commercial/commercial.crt'
** Copying '/tmp/ssl/ca_bundle.crt' to '/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt'
** Appending ca chain '/tmp/ssl/ca_bundle.crt' to '/opt/zimbra/ssl/zimbra/commercial/commercial.crt'
** Importing cert '/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt' as 'zcs-user-commercial_ca' into cacerts '/opt/zimbra/common/lib/jvm/java/jre/lib/security/cacerts'
** NOTE: restart mailboxd to use the imported certificate.
...
$ zmcontrol restart
$ zmcertmgr viewdeployedcrt

Verification:

Verify using https://www.ssllabs.com/ssltest/

Source:

Comments Off on Wildcard SSL Certificate Installation on Zimbra Mail Server

Optimizing Debian on Laptop

ai-tee, linux

TLP (advanced power management for Linux)

# echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
# apt-get update
# apt-get install tlp tlp-rdw
# tlp start
# tlp-stat -s

Source:


Brightness Adjusment

Create a script:

# vim brightness.sh
# chmod +x brightness.sh

Content of “brightness.sh” script

function main_menu
{
    sudo clear
    cursetting=$(cat /sys/class/backlight/intel_backlight/brightness)
    maxsetting=$(cat /sys/class/backlight/intel_backlight/max_brightness)
    powersave=$((maxsetting/5))
    conservative=$((powersave*2))
    medium=$((powersave*3))
    performance=$((powersave*4))
    echo ""
    echo "----------------------- Brightness -----------------------"
    echo " 1. Set Display to Minimum (Powersave) brightness setting."
    echo " 2. Set Display to Low (Conservative) brightness setting."
    echo " 3. Set Display to Medium brightness setting."
    echo " 4. Set Display to High (Performance) brightness setting."
    echo " 5. Set Display to Maximum brightness setting."
    echo " 6. Exit."
    echo "----------------------------------------------------------"
    if [ $cursetting -eq $powersave ]; then
     cursetting='Minimum'
    else
     if [ $cursetting -eq $conservative ]; then
      cursetting='Conservative'
     else
      if [ $cursetting -eq $medium ]; then
       cursetting='Medium'
      else
       if [ $cursetting -eq $performance ]; then
        cursetting='Performance'
       else
        if [ $cursetting -eq $maxsetting ]; then
         cursetting='Maximum'
        fi
       fi
      fi
     fi
    fi
    echo "        Current Display Setting - "$cursetting;
    choice=7
    echo ""
    echo -e "Please enter your choice: \c"
}

function press_enter
{
    echo ""
    echo -n "Press Enter to continue."
    read
    main_menu
}

main_menu
while [ $choice -eq 7 ]; do
read choice

if [ $choice -eq 1 ]; then
 echo $powersave | sudo tee /sys/class/backlight/intel_backlight/brightness
 main_menu
else
 if [ $choice -eq 2 ]; then
  echo $conservative | sudo tee /sys/class/backlight/intel_backlight/brightness
  main_menu
 else
  if [ $choice -eq 3 ]; then
   echo $medium | sudo tee /sys/class/backlight/intel_backlight/brightness
   main_menu
  else
   if [ $choice -eq 4 ]; then
    echo $performance | sudo tee /sys/class/backlight/intel_backlight/brightness
    main_menu
   else
    if [ $choice -eq 5 ]; then
     echo $maxsetting | sudo tee /sys/class/backlight/intel_backlight/brightness
     main_menu
    else
     if [ $choice -eq 6 ]; then
      exit;
     else
      echo -e "Please enter the NUMBER of your choice: \c"
      choice = 7
     fi
    fi
   fi
  fi
 fi
fi
done

Source


Add Sudo user

# apt-get install sudo
# adduser [new-user]
# adduser [new-user] sudo

If it is still failed, add the [new-user] directly with visudo

# visudo
Add the [new-user] on this section # User privilege specification
root ALL=(ALL:ALL) ALL
[new-user] ALL=(ALL:ALL) ALL

Source:


UTC or Local Time Management

Synchronizing UTC or local time between two OS (Windows and Linux) in dual boot Laptop.

$ sudo timedatectl
      Local time: Thu 2017-05-11 21:42:06 WIB
  Universal time: Thu 2017-05-11 14:42:06 UTC
        RTC time: Thu 2017-05-11 14:42:06
       Time zone: Asia/Jakarta (WIB, +0700)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
$ sudo timedatectl set-local-rtc 1
$ sudo timedatectl
      Local time: Thu 2017-05-11 21:45:00 WIB
  Universal time: Thu 2017-05-11 14:45:00 UTC
        RTC time: Thu 2017-05-11 21:45:00
       Time zone: Asia/Jakarta (WIB, +0700)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: yes
      DST active: n/a

Source:


Remote Desktop Protocol

$ sudo apt-get install rdesktop

Source:


TeamViewer

$ wget https://downloadus1.teamviewer.com/download/version_12x/teamviewer_12.0.76279_i386.deb
$ sudo dpkg -i teamviewer_12.0.76279_i386.deb
$ sudo apt-get install -f

Source:


Improve Font Rendering

Subpixel-hinting and Font-smoothing
Create a file “.fonts.conf” in the home folder

$ more ~/.fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

Install Infinality

$ more /etc/apt/sources.list
...
deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main
deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main
...
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E985B27B
$ sudo apt-get update
$ sudo apt-get install fontconfig-infinality
$ sudo bash /etc/fonts/infinality/infctl.sh setstyle
Select a style:
1) debug       3) linux          5) osx2         7) win98
2) infinality  4) osx          6) win7         8) winxp
#? 3
conf.d -> styles.conf.avail/linux
$ more /etc/profile.d/infinality-settings.sh
...
# USE_STYLE="DEFAULT"
USE_STYLE="UBUNTU"
...

Install Ubuntu Font

$ wget http://mirrors.kernel.org/ubuntu/pool/main/u/ubuntu-font-family-sources/ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb
$ sudo dpkg -i ttf-ubuntu-font-family*.deb
$ sudo apt-get install gnome-tweak-tool
$ gnome-tweak-tool

Configure Fonts on gnome-tweak-tool:

  • Window Titles [ Ubuntu Regular – 11 ]
  • Interface [ Ubuntu Regular – 11 ]
  • Documents [ Ubuntu Regular – 11 ]
  • Monospace [ Ubuntu Mono Regular – 13 ]
  • Hinting [ Slight ]
  • Antialiasing [ Rgba ]
  • Scaling Factor [ 1.00 ]

Install Microsoft Font

$ sudo apt-get install ttf-mscorefonts-installer
$ wget http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe
$ unar PowerPointViewer.exe
$ cd PowerPointViewer/
$ unar ppviewer.cab
$ cd ppviewer/
$ mkdir ~/.fonts
$ cp *.TTF *.TTC ~/.fonts

Logout and login again to see the change.

Source:


Browser

Chrome install

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb

Source:


Show Desktop

Settings => Keyboard => Shortcut => Navigation => Hide all normal windows (Super + D)

Source:

Comments Off on Optimizing Debian on Laptop

Upgrading Debian Wheezy (7) to Jessie (8)

linux

I’ve just upgraded a Debian server from Wheezy to Jessie with these steps:

# apt-get update && apt-get upgrade && apt-get dist-upgrade
# dpkg --audit && dpkg --get-selections | grep hold
# vim /etc/apt/sources.list
[add these list - for Indonesian user]
deb http://kambing.ui.ac.id/debian/ jessie main contrib non-free
deb-src http://kambing.ui.ac.id/debian/ jessie main contrib non-free
deb http://kambing.ui.ac.id/debian/ jessie-updates main contrib non-free
deb-src http://kambing.ui.ac.id/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
# apt-get update && apt-get upgrade && apt-get dist-upgrade
# more /etc/debian_version && more /etc/os-release
# reboot

Add apache-mysql-php:

# apt-get install mysql-server mysql-client
# apt-get install apache2 apache2-doc
# apt-get install php5 libapache2-mod-php5 php5-mysql
# service apache2 restart

Source:
https://www.howtoforge.com/tutorial/how-to-upgrade-debian-wheezy-to-jessie-stable-release/

Comments Off on Upgrading Debian Wheezy (7) to Jessie (8)

Debian Jessie 8.6

obrolan ringan

After long time ignoring my Debian, I installed 8.6 Jessie version of Debian last week on my Lenovo Y450.

Here is some troubleshooting and tweaking I’ve done for Jessie:

A. Driver for Intel Wireless Card

# vim /etc/apt/sources.list
  [add these list - for Indonesian user]
  deb http://kambing.ui.ac.id/debian/ jessie main contrib non-free
  deb http://kambing.ui.ac.id/debian/ jessie-updates main contrib non-free
  deb http://kambing.ui.ac.id/debian-security/ jessie/updates main contrib non-free 
# apt-get update && apt-get install firmware-iwlwifi
# modprobe -r iwlwifi ; modprobe iwlwifi

Source: https://wiki.debian.org/iwlwifi

[B]. Flash Player for Mozilla Firefox

https://wiki.debian.org/FlashPlayer

Comments Off on Debian Jessie 8.6

Configure SSH Access on Cisco IOS

router

How to configure SSH access on Cisco IOS (switch or router):

1. Setting hostname and domain-name

switch# configure terminal
switch(config)#hostname catalyst
catalyst(config)#ip domain-name itmaranatha.org

2. Generate RSA keys (use 1024 bit for SSHv2 enabled)

catalyst(config)#crypto key generate rsa

3. Configure line vty

catalyst(config)#line vty 0 15
catalyst(config-line)#login local
catalyst(config-line)#transport input ssh

4. Create local user/pass

catalyst(config)#username [user] privilege 15 secret [password]

5. Fine tuning

catalyst(config)#line vty 0 15
catalyst(config-line)#exec-timeout 5
catalyst(config-line)#exit
catalyst(config)#ip ssh version 2

 

Source:
https://www.pluralsight.com/blog/tutorials/configure-secure-shell-ssh-on-cisco-router

Comments Off on Configure SSH Access on Cisco IOS

Error Restarting Network Service in CentOS 7

linux

Today I got this error message when restarting network service with # systemctl restart network.service or # service network restart:

Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.

Browsing around for a while, then found this solution:

# systemctl stop NetworkManager
# systemctl disable NetworkManager

After disabling NetworkManger, restarting network service succeeded.

Source:
http://unix.stackexchange.com/questions/220750/centos-7-failed-to-bring-up-down-networking-configure-interface-for-a-trunk-in
http://www.linuxquestions.org/questions/linux-newbie-8/centos-7-failed-to-bring-up-down-networking-configure-interface-for-a-trunk-interfa-4175550117/

Comments Off on Error Restarting Network Service in CentOS 7

All-in-One Software Defined Network (SDN) VM

SDN

If you want to jumpstart learning SDN without installing every single software on operating system, Srini Seetharaman has all-in-one VM that already installed with necessary SDN learning software.

The sofware and tools installed on the VM (listed by SDNhub.org):

  • SDN Controllers: OpenDaylight, ONOS, RYU, Floodlight, Floodlight-OF1.3, POX, and Trema
  • Example code for a hub, L2 learning switch, traffic tap, and other applications
  • Open vSwitch 2.3.0 with support for Openflow 1.2, 1.3 and 1.4, and LINC switch
  • Mininet to create and run example topologies
  • Pyretic
  • Wireshark 1.12.1 with native support for OpenFlow parsing
  • JDK 1.8, Eclipse Luna, and Maven 3.3.3

These are the instruction steps:

  1. Install VirtualBox or Vmware Player/Fusion
  2. Install Putty and Xming (for Windows) or Xquartz (for Mac)
  3. Download appliance from one of these link:
    http://yuba.stanford.edu/~srini/tutorial/SDN_tutorial_VM_32bit.ova
    http://yuba.stanford.edu/~srini/tutorial/SDN_tutorial_VM_64bit.ova
  4. Import downloaded file (SDN_tutorial_VM_XXbit.ova) to VirtualBox or Vmware Player/Fusion
  5. Start the VM (user/password: ubuntu/ubuntu)

Source:
http://sdnhub.org/tutorials/sdn-tutorial-vm/
http://yuba.stanford.edu/~srini/Beginners_OpenFlowTutorial_Meetup_June_2013.pptx

Comments Off on All-in-One Software Defined Network (SDN) VM

Apt-get update error

linux, server

As Debian big fan, sometime I found that apt-get update command reveal this error:
“E: Some index files failed to download. They have been ignored, or old ones used instead.”

This command is very simple solution I found:

# rm /var/lib/apt/lists/partial/*

After that, apt-get update && apt-get upgrade command should be fine.

Source:
http://forums.debian.net/viewtopic.php?f=10&t=108618

Comments Off on Apt-get update error
« Older Posts