How did I install memcached in Slackware ? A step by step installation guide

Memcached

What is Memcached ?

According to the Memcached website :

“Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.”

memcached

Dependencies :

Memcached depends only on libevent, an event notification library, and is available in libevent website.

In Linux, we need a kernel with epoll, and epoll isn’t included in Linux 2.4, but don’t worry a backport available through epoll-lt patch.

Before installing memcached make sure that you have installed libevent library properly.

Following are the are the steps to install libevent :

  1. Download the libevent source code from http://libevent.org/
  2. uncompress the file and change the directory to it.
  3. Then do './configure && make' and 'make install' (as root)
    
    $ ./configure --enable-64bit --prefix=/opt/memcached
    
    $ make
    
    $ su -c "make install"
    
    password :

In Slackware 14.1 /usr/local/lib ( which is the default installation path for libevent) is already included in the ld configuration. If in case you are referring this guide for other distributions you might have check it. If it is not included in the ld configuration you can add it by editing /etc/ld.so.conf

If tetc/ld.so.conf is not available create one by

vim /etc/ld.so.conf.d/libevent.conf

or

nano /etc/ld.so.conf.d/libevent.conf
and
## add a line containing:
/usr/local/lib/

then update ld.so.cache by the issuing the command ‘ldconfig -v’

Installation steps :

Step 1 : Download the latest version of Memcached.

$ wget -r -P /home/dev/Software/ http://www.memcached.org/files/memcached-1.4.17.tar.gz

Step 2 : Uncompress the file.

$ cd /home/dev/Software

$ tar -xvzf /home/dev/Software/ http://www.memcached.org/files/memcached-1.4.17.tar.gz

Step 3 : Change the directory to the current uncompressed file directory.

$ cd /home/dev/Software/memcached-1.4.17

Step 4 : run the ./configure with appropriate parameters

$ ./configure --prefix=/opt/memcached

Step 5 : run the make script

$ make && make test

Step 6 : run make install

$ su -c "make install"

password :

Step 7 : run memcached

$ memcached -d -m 256 -u dev -p 11211

Possible pitfalls :

Sometimes an error is shown which says cannot open shared object file : libevent-x.x.so.x : No such file or directory.

Problems can be

  1. You forgot to install libevent.Solution : install libevent library.
  2. You compiled libevent and memcached from source package and did that for different hardware platform’s x86/64 using lib/lib64 folders.Solution : uninstall the current installation using ‘make uninstall’ and reinstall the library properly.
  3. Something is messed up and synlink wasn’t properly generatedSolution : create the symlink for libevent library properly.
    On a 32 bit system:

    ln -s /usr/local/lib/libevent-x.x.so.x /usr/lib/libevent-x.x.so.x

    On a 64 bit system:

    ln -s /usr/local/lib/libevent--x.x.so.x /usr/lib64/libevent-x.x.so.x

References :

Setting up the Java Dev Environment in Slackware 14 – Part 3

IntelliJIDEA

This is the third part in the series ‘Setting up the Java Dev Environment in Slackware‘. The previous part was to discuss about how to install IDEs for java development in Slackware. And it was ending with mentioning IntelliJ IDEA but without giving the steps to install it. So this part will be dealing with that.

Steps for installation :

  1. Download the Gnu/Linux package.
  2. Login as root :
    $ su
    $ Password:
  3. Copy the downloaded file to /opt/ :
    # cp /home/user/downloads/ideaIC-12.1.4.tar.gz   /opt/
  4. Uncompress the file and rename the uncompressed directory :
    # cd /opt/
    # tar -xzvf /opt/ideaIC-12.1.4.tar.gz
    # mv -f ideaIC-12.1.4/ idealC
  5. Create an executable file :
    # touch /usr/bin/IDEA 
    # chmod 755 /usr/bin/IDEA
    Open the file in an editor
    # vim /usr/bin/IDEA
    and paste the following lines

    #!/bin/sh 
    export IDEA_HOME="/opt/idealC/bin" 
    $IDEA_HOME/idea.sh $* 

    OR we can directly link the `IDEA_HOME/idea.sh`

    # ln -fs /opt/idealC/bin/idea.sh /usr/bin/IDEA

    but I think the first approach is the neat one.

  6. Create an entry in menu :
    Create an entry in KDE or XFCE Menu.

How to install Firefox in slackware

firefox-banner_zpsc37a2a6eI am using Slackware 14 in my machine which is coming with firefox 15 pre-installed. But as newer versions of firefox came out I badly wanted to try them out. I could have used slackpkg or txz packages or slackbuild but I thought I could give a shot to the binaries from Mozilla site.

System : Slackware 14 on a Dell Vostro 1015n laptop.
Software version : Firefox 21

so here goes the steps

Ensure that you have all the required libraries

GTK+ 2.18 or higher
GLib 2.22 or higher
Pango 1.14 or higher
X.Org 1.0 or higher (1.7 or higher is recommended)
libstdc++ 4.3 or higher

Mozilla recommends that a Linux system also have the following libraries or packages installed:

NetworkManager 0.7 or higher
DBus 1.0 or higher
HAL 0.5.8 or higher
GNOME 2.16 or higher

Luckily Slackware 14 is coming with all the necessary libraries so don’t have to worry about that.

Download the correct file :

As 32 bit version will not run in 64 bit os without some libraries and viseversa.

Copy the file to /opt/ :

# cp "firefox.tar.bz2" /opt

Extract the file :

# tar -xjvf /opt/firefox.tar.bz2

Create an entry in /usr/bin :

# ln -fs /opt/firefox/firefox /usr/bin/firefox

To remove/uninstall firefox :

#rm -rf /opt/firefox /usr/bin/firefox

 

N.B :

If flash player is not working after the installation, that is probably because in the new installation plugin directory is changed. So you can fix it by copying the ‘libflashplayer.so’ file to the corresponding plugin directory.

How to install Thunderbird in slackware

Mozilla ThunderbirdMozilla Thunderbird is one of the best FOSS mail clients out there and I prefer it over the other mail clients. In Slackware 14 we already have three mail clients out of the box, which are Mail, KMail and Seamonkey Mail respectively. But Thunderbird is not preinstalled with the distro so I had to install that first.

System : Slackware 14 on a Dell Vostro 1015n laptop.
Software version : Thunderbird-17.0.6

  1. Ensure that you have all the required libraries.
    • GTK+ 2.18 or higher
    • GLib 2.22 or higher
    • Pango 1.14 or higher
    • X.Org 1.0 or higher (1.7 or higher is recommended)
    • libstdc++ 4.3 or higher

    Mozilla recommends that a Linux system also have the following libraries or packages installed:

    • NetworkManager 0.7 or higher
    • DBus 1.0 or higher
    • HAL 0.5.8 or higher
    • GNOME 2.16 or higher

    Luckily Slackware 14 is coming with all the necessary libraries so don’t have to worry about that.

  2. Download the correct file.
    This is very important since in a 64 bit system a 32 bit software will not work without some necessary libraries. So if yours is a 32 bit system download the 32 bit version of Thunderbird else get the 64 bit version.
    To get the 64 bit version go here.
    .
  3. login as root.
    login as root
  4. Change directory to /opt.
    I chose this directory as this installation is a custom one.

    change directory to /opt

  5. Copy to tar ball to /opt.
    copy the tar ball to the directory /opt/
  6. Extract the file.
    uncompressing the thunderbird tar ball
  7. Create an entry in /usr/bincreate link in /usr/bin
  8. Create shortcuts to launch Thunderbird (in menu + desktop).
    menu entry Right click on the KDE menu and select the option ‘Edit Application’. Using that utility we can add or edit the application details. To create a desktop shortcut just drag and drop the Menu entry to the desktop (after unlocking the widgets).
    .
  9. To update Thunderbird we will have to launch it as administrator:   #thunderbird
    .
  10. To remove/uninstall Thunderbird, enter:
    #rm -rf /opt/thunderbird /usr/bin/thunderbird
    and remove the thunderbird directory under /opt/.

References: