Wednesday, July 8, 2015

Installing JDK 8 on Debian Wheezy

By default, Debian Wheezy repository does not provide JDK-8 and JRE-8. You can download it from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. If you install JDK-8 using remove SSH, you can follow these steps:
  1. Download JDK-8 from URL above
    # wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz
  2. Extract it
    # tar xvzf jdk-8u45-linux-x64.tar.gz
  3. Create directory /usr/lib/JVM, if it does not exist. By default JDK will install on these folder
    # mkdir /usr/lib/jvm/
  4. Move JDK-8 folder to /usr/lib/JVM
    # mv jdk1.8.0_45 /usr/lib/jvm/
  5. Update alternative Java
    # update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_45/bin/java 100
    update-alternatives: using /usr/lib/jvm/jdk1.8.0_45/bin/java to provide /usr/bin/java (java) in auto mode
    # update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_45/bin/javac 100
    update-alternatives: using /usr/lib/jvm/jdk1.8.0_45/bin/javac to provide /usr/bin/javac (javac) in auto mode

Installing LAMP on Debian 8.0 (Jessie)

Here are steps to install LAMP on Debian 7.1 Wheezy:
1. Open your terminal as a root (Super User)
2. Installing MySQL
# apt-get install mysql-server mysql-client
set password for root (super user)
3. Installing Apache
# apt-get install apache2
4. Install PHP
# apt-get install php5 libapache2-mod-php5
5. Restart your apache2
# /etc/init.d/apache2 restart
6. Search module
# apt-cache search php5
7. Install other modules
# apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp php5-tidy php5-sqlite php5-xmlrpc
8. Restart your apache2 using step 5, and test your installation using browser with URL http://localhost

Tuesday, July 7, 2015

Installing Debian 7 x64 ethernet card & wifi in Lenovo B490

Last week, I got problem for enabling ethernet card & wifi in Lenovo B490 after installing Debian 7.1 x64. I need to install it offline for at least enabling ethernet card or wifi to make it online. After googling, i decided to enable ethernet card first to make it online (easier).
To install ethernet card in lenovo B490, it uses chipset realtek r8169 and it needs to install its firmware manualy from debian.org. follow these step to install it:
  1. Download realtek r8169 firmware https://packages.debian.org/wheezy/all/firmware-realtek/download
  2. Install it by run this command
    # dpkg -i firmware-realtek_0.36+wheezy.1_all.deb
After that, make it online, and add repository required to update your system. Wifi in lenovo B490 uses chipset bcm43142 that does not exist in debian repository. I follow this guide http://forums.debian.net/viewtopic.php?f=30&t=109498 to install its wifi. Here are steps to do:
  1. Download the driver from https://mega.co.nz/#!qIUySZYJ!PgfNRVCcXO-enbDuhziUqVCriMcDhbU-houaQ97c0yM
    or the link was broken just search in google "download wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb" or from this server
  2. Install it manualy bu run this command
    # dpkg -i download wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb
  3. Install network-manager by run this command
    # apt-get install network-manager
References are provided in content.

Installing ODOO 8 in Debian

Odoo was formerly known as OpenERP until May 2014. It was rebranded because version 8 of the software included apps including website builder, e-commerce, point of sale and business intelligence. The software conforms to standard expectations of ERP systems, while providing additional modules beyond the coverage of traditional ERP systems.
These are steps to install ODOO/OpenERP version 8 (latest release) in Debian (in my case):
  1. Add this into your /etc/apt/sources.list
    deb http://nightly.odoo.com/8.0/nightly/deb/ ./
    or
    deb http://nightly.odoo.com/master/nightly/deb/ ./
  2. Install odoo key
    # wget https://nightly.odoo.com/odoo.key
    # apt-key add odoo.key
  3. update by run this command
    sudo apt-get update
  4. install ODOO 8 by run this command
    sudo apt-get install odoo
Source: http://nightly.odoo.com/

Shellshock Vulnerability on Bash Shell

This is how you test your bash shell whether its vulnerable or not for 'shellsock' bug.
Run this on your linux shell (you don't need super user account for this):
 $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" 
if the result like this:
   vulnerable
   this is a test
then, you need to upgrade your bash version.

Just run (as superuser or sudo)
 # apt-get update
 # apt-get upgrade

It will show bash upgrade like this:
 Get:1 http://security.debian.org/ wheezy/updates/main bash amd64 4.2+dfsg-0.1+deb7u3 [1,501 kB]

After I upgrade my bash, the result becames like this:
   this is a test

I use bash version : GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)

Reference: http://www.debiantutorials.com/how-to-detect-if-your-server-is-vulnerable-to-the-shellshock-bug-and-fix-it/