Tag Archive : ubuntu

/ ubuntu

Creating Chat Server using OpenFire on Ubuntu

December 9, 2015 | Article | No Comments

OpenFire is a real time collaboration (RTC) server licensed under Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). In other word, OpenFire is free open source application used for building a chat server.

In this article we will use OpenFire to build a chat server on ubuntu. In this article I use:

  1. Ubuntu 12.04
  2. Oracle Java Development Kit (JDK)
  3. MySQL
  4. OpenFire

Please note that all the command invoked on terminal are using root privilege!

Preparation

It is always a good choice to update and upgrade your system. To do so, do following:

apt-get update
apt-get upgrade

Update / Install Latest JDK

We will use Oracle JDK instead of OpenJDK. First we need to uninstall OpenJDK (purge it!)

apt-get remove --purge openjdk*

Once the purge complete, install Oracle JDK

apt-get install oracle-java7-installer

Database

The database used here is MySQL server. If you haven’t install it, you can invoke following command to install it.

apt-get install mysql-server

Now, login to mysql

mysql -u root -p

Next, create a database by these series of SQL command:

CREATE DATABASE dbopenfire CHARACTER SET='utf8';
CREATE USER 'openfire'@'localhost' IDENTIFIED BY '0wnByX4thrya';
GRANT ALL PRIVILEGES ON dbopenfire.* TO [email protected] WITH GRANT OPTION;
FLUSH PRIVILEGES;

and then quit. Note that you can change the password identification for user openfire.

Installing OpenFire

Download the latest OpenFire package for Debian-based Linux. The latest version of OpenFire (per September 15th, 2013) is 3.8.2 which can be downloaded here.

Or, you can install it directly.

cd /tmp
wget http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.8.2_all.deb
dpkg -i openfire_3.8.2_all.deb

Now, replace java-6-sun with java-7-oracle (we have install java-7-oracle, right?)

apt-get install rpl
rpl '6-sun' '7-oracle' /etc/init.d/openfire
service openfire start

Set Firewall

Now, set the firewall to allow packet traffic for ports used by openfire.

ufw allow 9090/tcp
ufw allow 9091/tcp
ufw allow 5222/tcp
ufw allow 7777/tcp
ufw allow 7443/tcp
ufw allow 7070/tcp
ufw allow 3478/tcp
ufw allow 3479/tcp

Configuration

Now we will configure the OpenFire by web.

Open your browser and go to http://Your-IP:9090 where Your IP is your server IP.

Click continue until you reach setting for database connection (we omit other default setting). Choose Standard Database Connection. Now you will get a form. Fill the form with setting we use on previous sections. For example:

  • Database Driver Presets = MySQL
  • JDBC Driver Class = com.mysql.jdbc.Driver
  • Database Url = jdbc:mysql://localhost:3306/dbopenfire
  • Username = openfire
  • Password = <the password you set>
  • Minimum connections = 5
  • Maximum connections = 25
  • Connection Timeout = 1.0 Days

On profile setting, choose default and click on continue.

Now set the administrator account. You pick the password by yourself, and should be different from database password.

The configuration is finished.

Add New Account

To add new account, click on User Groups -> Users -> Create New User. Fill the required information.

Client?

Basically, any XMPP/JABBER capable client can connect to this chat server. For an alternative, you can use Spark which is developed by the very same developer who develop OpenFire. You can download it here. Download in respect of your client operating system.

Login as Root in Ubuntu 13.04

December 9, 2015 | Article | No Comments

Do you want to enable root logon in Ubuntu 13.04?

Root account is an account who has power over the system.

Login as root / administrator account is not recommended, because people make mistakes. It’s easier to exploit human than machine. Making smallest mistakes while logging in as root can completely render your computer useless (or at least inoperable). Even though it’s not recommended, it’s still possible to logon as root on Ubuntu.

This article will discuss about how to enable root login on Ubuntu 13.04.

To enable root account, press CTRL + ALT + T or open terminal and run following command:

sudo passwd root

That command will set password for root account. You should enter new password twice (the last one for confirmation).

After that, you need to configure DM (Desktop Manager) to allow login as root account in the Login Screen. By default, Ubuntu 13.04 use LightDM. To configure, edit /etc/lightdm/lightdm.conf and add following line:

greeter-show-manual-login=true

Or you can invoke this at command line (make sure you type correctly):

echo 'greeter-show-manual-login=true' >> /etc/lightdm/lightdm.conf

Next time you login, you should enter the account name and its password.

To disable root account, run this command:

sudo passwd -l root

Install Kernel on Ubuntu

December 9, 2015 | Article | No Comments

One advantage of using Linux is you can change your kernel when the latest one out. For Ubuntu, you can have  a painless way to install a new kernel.

In this article, we will discuss about generic (and painless) way to install new kernel. For this case, I use Ubuntu 12.10 and the kernel we will install is 3.10 version.

How to Check Kernel Version?

To check your current linux kernel version, enter this command on terminal:

uname -r

or

cat /proc/version

Ubuntu and Precompiled Kernel

Unlike compiling kernel by yourself, Ubuntu provide you with precompiled kernel. It means, they compile the kernel for you. It might good for anyone who want to install new kernel effortlessly. However, the drawback for this precompiled kernel is the kernel is optimized for general machine. It want to address all the hardware and machine condition resulting in bigger size. Yes it can run on any machine, but might not be optimized. If you want to optimized the kernel for your machine in specific way, you might want to consider compiling kernel from source.

Obtain the Material

First, grab the material, the kernel. Go to this link, and find your preferred kernel. For example, I will use kernel labelled by v3.10-saucy.

Note that the Ubuntu release two kind of package: linux image and linux headers. The kernel itself is packaged as linux image. The linux headers are collection of headers file used for compile third party driver. Or in generic way: it is header file of linux.

For each kind, there are two package namely package for 32 bit and for 64 bit architecture. Download the kernel suitable for your Ubuntu, i.e if you use 32 bit ubuntu then choose the i686 version. Otherwise, download the amd64 version.

For v3.10-saucy, we have following options:

[32 bit]

  1. Linux Image
  2. Linux Headers

[64 bit]

  1. Linux Image
  2. Linux Headers

The rest of this article will use Kernel to refer Linux Kernel / Image you have downloaded (.deb format) while the Headers will refer to Linux Headers.

Installation

Put both Kernel and Headers into the same location. Open terminal and navigate to that directory. To install, use following commands (with root privilege):

dpkg -i *.deb

Next, reboot the system

reboot

And check the version:

uname -a

It should give you version 3.10 😀

Installing Lightread RSS Reader on Ubuntu

December 9, 2015 | Article | No Comments

RSS or Rich Site Summary, is a family of web feed formats used to publish frequently updated works – such as blog entries, news headlines, audio, and video – in a standardized format. An RSS document (which then called “feed”, “web feed”, or “channel”) includes full or summarized text, plus metadata such as publishing dates, and authorship.

Using RSS, one can subscribe to a site and when a new content arrive, he can be notified.

Lightread is a RSS reader client which enable user to sync with news or RSS online then read them offline without internet connection. Lightread also can synchronize with google account.

In this article we will discuss about how to install Lightread for Ubuntu from ppa. Any Ubuntu version and any architecture is fine. However in this article I will use Ubuntu 12.10 desktop edition.

Preparation

As said before, we will install Lightread from ppa. Therefore we need to add the ppa key. Do this with root privileges.

add-apt-repository ppa:cooperjona/lightread

Then update the repository to get the latest index.

apt-get update

Installation

The installation goes smooth like other application. Invoke following command with root privilege:

apt-get install lightread

At this point, Openshot has been installed successfully.

Installing XAMPP on Ubuntu Manually

December 9, 2015 | Article | No Comments

XAMPP, a free open source cross platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts (PHP script). XAMPP is plenty helpful when you don’t want to install Apache, MySQL, and PHP individually, or if you want portability. However, it is strongly recommended to install Apache, MySQL, and PHP and configure it by yourself.

In this article we will discuss about how to install XAMPP for Ubuntu manually by downloading the binary. Any Ubuntu version and any architecture is fine. However in this article I will use Ubuntu 12.10 desktop edition.

Obtain the Material

Download XAMPP for Linux from here. The latest is recommended. At the time of writing this article, the latest version is 1.8.2. For Ubuntu 32 bit you can download this version, while 64-bit user can download this version. Both will bring you to sourceforge page of the corresponding version.

The rest of this article will assume you have download the installer. For simplicity, I also refer the installer file as xampp.run, regardless the version.

Installation

Open up terminal, and switch to super user (root). The rest of this article will assume we are as root account.

Go to the directory where the xampp.run is and make sure xampp.run is executable. Then run the installer.

chmod +x xampp.run
./xampp.run

When the installation finish, you can find XAMPP on /opt/lampp directory.

Starting

To start XAMPP, simply invoke following command:

/opt/lampp/lampp start

You should see something like this:

Starting XAMPP 1.8.2...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP start

Testing

Now, check your browser. Type in URL bar http://localhost/ and you would see something like this:

xampp2

Installing XAMPP on Ubuntu

December 9, 2015 | Article | No Comments

XAMPP, a free open source cross platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts (PHP script).

In this article we will discuss about how to install XAMPP for Ubuntu using ppa method. Any Ubuntu version and any architecture is fine. However in this article I will use Ubuntu 12.10 desktop edition.

Prerequisite

The XAMPP version used here is the one supplied by ppa. Invoke following commands using enough privilege

add-apt-repository ppa:upubuntu-com/xampp

Now update to download the list of packages.

apt-get update

Installation

Installation is as easy as other software installation. Enter this command into terminal:

apt-get install xampp

Once the installation complete, we have successfully install XAMPP.

Testing

XAMPP can be accessed like any other application. You can find start find and run XAMPP control panel. Click on start button. When you successful, you would have something similar to this:

xampp1

Next, check your browser. Type in URL bar http://localhost/ and you would see something like this:

xampp2

At this point, we are successfully install XAMPP using ppa.

Easy Installing Metasploit on Ubuntu

December 9, 2015 | Article | No Comments

Metasploit is popular penetration tools exists by using exploitation of operating system, application, or other exploit.

In this article we will discuss about how to install Metasploit for Ubuntu. For this purpose I use Ubuntu. Any version and any architecture is fine. However in this article I will use Ubuntu 12.10 desktop edition.

Prerequisite

The metasploit version used here is the one used by Backtrack. You can also use the version used by Kali Linux. However, let’s stick to Backtrack’s version.

wget http://all.repository.backtrack-linux.org/backtrack.gpg
apt-key add backtrack.gpg

Now edit /etc/apt/source.list. Add backtrack’s official repository, or alternatively the mirror. Here I (in my case) have two options:

Using official repository:

deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing
deb http://32.repository.backtrack-linux.org revolution main microverse non-free testing
deb http://source.repository.backtrack-linux.org revolution main microverse non-free testing

using repository from IDWS:

deb http://backtrack.indowebster.com/repo/all revolution main microverse non-free testing
deb http://backtrack.indowebster.com/repo/32 revolution main microverse non-free testing
deb http://backtrack.indowebster.com/repo/source revolution main microverse non-free testing

Both are fine. Save the file and do update to download list of packages.

apt-get update

Installation

Installation is as easy as other software installation. Enter this command into terminal:

apt-get install metasploit

Once the installation complete, we have successfully install metasploit.

Testing

Let’s test whether our metasploit work or not. Before running metasploit, let’s do update.

msfupdate

Next, try to run it.

msfconsole

Android Operating System is one of popular operating system for mobile device beside Windows Phone, Apple iOS, etc. The popularity comes from the fact that Android is open source, used by various vendor. You have a freedom to modify and do anything to your Android, though you will void your warranty.

This article main focus would be concentrated on installation of development tools, which is Eclipse IDE, Android SDK, and Android Developer Tool.

Why Eclipse? Eclipse is an open source Integrated Development Environment and has full support for Android. It’s also quite simple.

In the time i write this article, I use GNU/Linux Ubuntu 10.10. Of course you can use other linux distribution if you like, especially Debian or Ubuntu derivative distribution. I might encourage you to use later version if possible. You must also have active internet connection to do installation and fetching required packages.

Table of Content

  1. Installation
    1. Eclipse IDE
    2. Oracle Java JDK
    3. Android Developer Tool Plugin
    4. SDK and SDK Platform
  2. Create Android Virtual Device

Installation

[x] Installing Eclipse IDE

First, installing Eclipse. In this article I will use latest Eclipse (per September 6th, 2012) version. It’s Eclipse 4.2 Juno for Linux 32 bit. You can download it at this link.

I pick eclipse-SDK-4.2-linux-gtk.tar.gz, it is a ready to use version means no installation required. Download it and then extract the file.

tar xvzf eclipse-SDK-4.2-linux-gtk.tar.gz

We will have a new extracted directory named eclipse. Move this directory to /opt. This is a good practice for FHS (Filesystem Hierarchy Standard) as an optional software installed to this. In my case I extracted eclipse in /home/xathrya/Downloads. I will invoke following command and remember the command need privileges as /opt is usually owned by root:

mv /home/xathrya/Downloads/eclipse  /opt

Create symbolic link to eclipse in /usr/bin (use root privilege):

ln -s /opt/eclipse/eclipse /usr/bin/eclipse

[x] Installing Oracle Java (Replace OpenJDK)

You can use OpenJDK and skip this. However if you want

Next you must have a running JAVA Runtime Environment. We need to install Oracle Java. Ubuntu has come with a default OpenJDK Environment so we will replace it.

In Ubuntu, the JAVA is located on repository partner which indicated it is a proprietary repository. To install JAVA first we have to add the repository. In this case I use maverick meerkat (Ubuntu 10.10 distribution), if you have other distribution, you can replace maverick with your Ubuntu codename (ex: lucid for lucid lynx, natty for natty narwhal)

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
sudo apt-get update

After that you can install JAVA JRE

sudo apt-get install sun-java6-jre galternatives

last we need to change the default java environment for OpenJDK to Sun JRE 6

sudo galternatives

Select java in left panel and select java-6-sun as shown by image below:

Now, verify your java installation. Invoke this command:

java -version

This should gives you message like this:

java version "1.6.0.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, moxed mode,sharing)

[x] Android Developer Tool Plugin

Now let’s moving to installation of Androit Developer Tool (ADT). It is a special Eclipse plugin contains integrated android environment for building Android application using eclipse. Reminder: my eclipse version is 4.2 (Juno)

Start eclipse. Now navigate to:

Help - Install New Software - Add

enter the following information:

Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/

Click on OK. Now select “Developer Tools” and/or “NDK Plugins”. Click Next to begin installation. Wait for installation to finish its work. With my connection around 50KB/s the installation done in 30 minutes.

[x] Install the SDK and SDK Platform

Next we will install Android SDK. Downlad Android SDK starter pack from this link

Download the latest SDK. By the time I write this article, the latest version is 20.0.3. You can download linux version directly in this link:

Extract the content of Android SDK pack:

tar xvzf android-sdk_r20.0.3-linux.tgz

In my case I will leave the SDK on /home/xathrya/android-sdk.

Now we need to install platforms and optional additional plugins or sample codes. Start SDK manager:

/home/xathrya/android-sdk/tools/android

Seleck SDK Platforms you want. I choose Android 2.3.3 API 10 as my smartphone Sony Xperia U use this one. When you have selected all packages you want, click Install Selected. You will be prompted to Accept License. Click Accept All and then Install.

Create Android Virtual Device

Now we have to join Eclipse IDE with Android SDK and create and Android Virtual Device (AVD). Android Virtual Device is an emulator to run your application on top of your computer.

In Eclipse, navigate to: Window -> Preferences -> Android

Enter location of your Android SDK installation. In my case it is in /home/xathrya/android-sdk/. Press OK.

Now navigate to Window -> AVD Manager -> New

Insert following information into:

Name: AndroidVirtualDevice
Target: [chose any desired Android version and API level available]

Click Create AVD. The new Android Virtual Device will be created in the directory:

~/.android/avd

We are done!

Social media & sharing icons powered by UltimatelySocial