Archive

Archive for March, 2015

Installing Linuxbrew on Ubuntu

March 29, 2015 Leave a comment

Linuxbrew is fork form famous package manager homebrew for mac os. You can read about how to install Homebrew on OSX machine here.

Below will be explained how to install linuxbrew on Ubuntu Box.

The Steps Are :

  • At least Linuxbrew need Ruby 1.8.6 and gcc 4.2
  • Install all dependencies using following simple command :

Server Elastic 1 [Running] 2015-03-30 12-32-57

  • Then install linuxbrew using simple ruby command :

 

Server Elastic 1 [Running] 2015-03-30 12-34-38

  • Wait till finished, then add the following line too .bashrc file

Server Elastic 1 [Running] 2015-03-30 12-36-45

  • Restart Terminal or console if needed, then execute the following command to check linuxbrew installed properly
  • Server Elastic 1 [Running] 2015-03-30 12-38-33
  • If you got Message Above [your System is ready to brew], means your linux now powered by linuxbrew engine .. then happy brewing ..

 

Jakarta, 30 Maret 2015

 

 

A, Ahmad Kusumah

 

 

Advertisements

Installing Elasticsearch on Ubuntu 14.04

March 29, 2015 Leave a comment

Elasticsearch is one of most powerfull opensource platform for distributed REStFull Search and Analysis engine.

you can read further about elasticsearch here . In this Post, will explain how to setup and running elasticsearch on ubuntu 14.04 Server version box.

These are the steps :

  • Install Java, you can use OpenJDK or proprietary  Oracle JDK. How to install Oracle JDK, will be described on separated article
  • Download Latest elasticsearch (deb version)

Server Elastic 1 [Running] 2015-03-29 21-45-59

  • Install Using sudo dpkg -i elasticsearch-1.5.0.deb

Server Elastic 1 [Running] 2015-03-29 21-50-33

  • Install Java Service Wrapper for elastic search

Server Elastic 1 [Running] 2015-03-29 21-51-48

  •  Create Simbolic Link for elasticsearch service and other directory

Server Elastic 1 [Running] 2015-03-29 21-55-40

  • Start elastic search start

Server Elastic 1 [Running] 2015-03-29 21-56-23

  • Then try execute curl http://localhost:9200 , if all currently running well, you will see message above …

 

 

Jakarta, 30 March 2015

 

A. Ahmad Kusumah

Install stuff what apple didn’t provide [HomeBrew]

March 21, 2015 1 comment

Just like other unix based machine, apple provide repository called app store for installing various tools and  software. But not like any other unix machine which provide package manager that makes user easy to install unix tools, such as yum apt-get or aptitude, apple didn’t, and  let user resolve all dependency problem when installing from source. Fortunately, there are tools in the market which help apple user , the popular one is HomeBrew.

Below short step installing homebrew on apple machine [in this case yosemite 10.10].

1. Install Xcode at least Xcode 6.1. you can get the latest from app store for free

 

Screen Shot 2015-03-21 at 10.17.17 PM2. Install Command Line tools, if not installed

Screen Shot 2015-03-21 at 10.19.04 PM

 

3. Make sure Quartz installed

4. Invoke the following command to install homebrew, ruby is installed by default on yosemite

Screen Shot 2015-03-21 at 10.20.36 PM

5. Check the installation using the following command, it will tell what’s need to do in order to make brew works properly

Screen Shot 2015-03-21 at 10.25.20 PM

 

there are some essential command in brew :

brew search #to search application

brew install [application_name] #to install application

brew remove [application_name] #to remove application

brew list #list application installed by brew

brew update #update brew

the reset functionality and command in brew can be explored using : man brew

All brew stuff and software installed in the /usr/local/Cellar folder

 

Jakarta, 21 March 2015

 

A. Ahmad Kusumah

 

Scheduler FTP Upload for multiple files

March 16, 2015 Leave a comment

ssh 2015-03-16 12-59-12

Upload multiple files is pretty easy when invoked manually, using command line or ftp client.

but a little bit tricky when we need to upload multiple file, scheduled, let say every 10 minutes.

Below, i’ll explain short step to make such mechanism using ftp client and cron , using unix machine.

Assumed, user ftp already created.

Step 1:

Lets create the script. obviously it just simple script :

#!/bin/bash
cd [Location of Files will be uploaded]

ftp -n [ftp_server]<<END

user [username] [password]

prompt ##turn off interactive mode

mput *.* ##the command to upload all files inside folder
quit
END

Save it, for example in /opt/script/uploadftp.sh

add grant for execution to the script

Step 2 ;

Create Cron :

  1. invoke crontab -e 
  2. insert */10 * * * * sh /opt/script/uploadftp.sh
  3. save then close

if needed, please restart the cron job.

 

And voila, now cron has been setup for executing ftp upload regularly every 10 minutes

for further reading about cron and configuration read this 

 

Jakarta, 16 March 2015

 

A. Ahmad Kusumah