How to install package by Slackbuild script on Slackware

So,installing package on Slackware is pretty different then other distro.You need to work little more to do that .Fortunately some great guys have done all the hard work for us to do thing in minimal way.In this post I will show you how you can install any package from the Slackbuild.org repository with the help of Slackbuild script.

So I a going to install a forensic package called “chkrootkit” from that repo and installed in Slackware.First get into this page chkrootkit to get the source of it as well as Slackbuild source too.

Okay ,once obtain those then please untar the SlackBuild one and it should look like below:

bhaskar@Slackware:~/Downloads/chkrootkit$ ls
README chkrootkit.SlackBuild chkrootkit.info chkrootkit.tar.gz slack-desc

Yes, that tar file inside that directory not come with that Slackbuild source. It’s the other one I have move to that directory,because SlackBuild script require the source of the package should be inside the SlackBuild dir.

Now, next step to execute the SlackBuild script like below:


bhaskar@Slackware:~/Downloads/chkrootkit$ sudo ./chkrootkit.SlackBuild
Password:
chkrootkit-0.49
chkrootkit-0.49/chkrootkit.lsm
chkrootkit-0.49/README.chkwtmp
chkrootkit-0.49/COPYRIGHT
chkrootkit-0.49/Makefile
chkrootkit-0.49/chkutmp.c
chkrootkit-0.49/ifpromisc.c
chkrootkit-0.49/chkrootkit
chkrootkit-0.49/ACKNOWLEDGMENTS
chkrootkit-0.49/check_wtmpx.c
chkrootkit-0.49/chkdirs.c
chkrootkit-0.49/README.chklastlog
chkrootkit-0.49/chklastlog.c
chkrootkit-0.49/strings.c
chkrootkit-0.49/README
chkrootkit-0.49/chkproc.c
chkrootkit-0.49/chkwtmp.c
*** stopping make sense ***
make[1]: Entering directory `/tmp/SBo/chkrootkit-0.49′
gcc -O2 -march=i486 -mtune=i686 -o chklastlog chklastlog.c
gcc -O2 -march=i486 -mtune=i686 -o chkwtmp chkwtmp.c
chkwtmp.c: In function ‘main':
chkwtmp.c:95:9: warning: incompatible implicit declaration of built-in function ‘exit’
gcc -O2 -march=i486 -mtune=i686 -D_FILE_OFFSET_BITS=64 -o ifpromisc ifpromisc.c
gcc -o chkproc chkproc.c
gcc -o chkdirs chkdirs.c
gcc -o check_wtmpx check_wtmpx.c
gcc -static -o strings-static strings.c
gcc -o chkutmp chkutmp.c
make[1]: Leaving directory `/tmp/SBo/chkrootkit-0.49′

Slackware package maker, version 3.14159.

Searching for symbolic links:

No symbolic links were found, so we won’t make an installation script.
You can make your own later in ./install/doinst.sh and rebuild the
package if you like.

This next step is optional – you can set the directories in your package
to some sane permissions. If any of the directories in your package have
special permissions, then DO NOT reset them here!

Would you like to reset all directory permissions to 755 (drwxr-xr-x) and
directory ownerships to root.root ([y]es, [n]o)? n

Creating Slackware package: /tmp/chkrootkit-0.49-i486-2_SBo.tgz

./
install/
install/slack-desc
usr/
usr/sbin/
usr/sbin/chkrootkit
usr/lib/
usr/lib/chkrootkit/
usr/lib/chkrootkit/bin/
usr/lib/chkrootkit/bin/chkwtmp
usr/lib/chkrootkit/bin/strings-static
usr/lib/chkrootkit/bin/chklastlog
usr/lib/chkrootkit/bin/chkproc
usr/lib/chkrootkit/bin/ifpromisc
usr/lib/chkrootkit/bin/chkrootkit
usr/lib/chkrootkit/bin/chkdirs
usr/lib/chkrootkit/bin/check_wtmpx
usr/lib/chkrootkit/bin/chkutmp
usr/doc/
usr/doc/chkrootkit-0.49/
usr/doc/chkrootkit-0.49/COPYRIGHT
usr/doc/chkrootkit-0.49/README.chklastlog
usr/doc/chkrootkit-0.49/chkrootkit.SlackBuild
usr/doc/chkrootkit-0.49/README.chkwtmp
usr/doc/chkrootkit-0.49/ACKNOWLEDGMENTS
usr/doc/chkrootkit-0.49/README
usr/doc/chkrootkit-0.49/chkrootkit.lsm

Slackware package /tmp/chkrootkit-0.49-i486-2_SBo.tgz created.

We need to install that file. So go to the /tmp dir and execute as superuser like below:


root@Slackware:/tmp# installpkg chkrootkit-0.49-i486-2_SBo.tgz
Verifying package chkrootkit-0.49-i486-2_SBo.tgz.
Installing package chkrootkit-0.49-i486-2_SBo.tgz:
PACKAGE DESCRIPTION:
# chkrootkit (Check Rootkit)
#
# chkrootkit is a common unix-based program intended to help system
# administrators check their system for known rootkits. It is a shell
# script using common UNIX/Linux tools like the strings and grep
# commands to search core system programs for signatures and for
# comparing a traversal of the /proc filesystem with the output of
# the ps (process status) command to look for discrepancies.
#
# Homepage: http://www.chkrootkit.org
#
Package chkrootkit-0.49-i486-2_SBo.tgz installed.

Done!!

Check it where the binary is :

bhaskar@Slackware:~$ whereis chkrootkit
chkrootkit: /usr/sbin/chkrootkit /usr/lib/chkrootkit

Start playing with it:

bhaskar@Slackware:~$ sudo /usr/sbin/chkrootkit
ROOTDIR is `/'
Checking `amd'... not found
Checking `basename'... not infected
Checking `biff'... not infected
Checking `chfn'... not infected
Checking `chsh'... not infected
Checking `cron'... not infected
Checking `crontab'... not infected
Checking `date'... not infected
Checking `du'... not infected
Checking `dirname'... not infected
Checking `echo'... not infected
Checking `egrep'... not infected
Checking `env'... not infected
Checking `find'... not infected
Checking `fingerd'... not infected
Checking `gpm'... not infected
Checking `grep'... not infected
Checking `hdparm'... not infected
Checking `su'... not infected
Checking `ifconfig'... not infected
Checking `inetd'... not infected
Checking `inetdconf'... not infected
Checking `identd'... not infected
Checking `init'... not infected
Checking `killall'... not infected
Checking `ldsopreload'... not infected
Checking `login'... not infected
Checking `ls'... not infected
Checking `lsof'... not infected
...output snipped

Hope this will help.

Cheers!
Bhaskar

About these ads

About unixbhaskar
Sr Consultant GNU/Linux and Networking

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93 other followers

%d bloggers like this: