Friday, October 31, 2014

UBUNTU : How To Install LibreOffice 4.3 in Ubuntu / Elementary OS / Linux Mint via PPA

How To Install LibreOffice 4.3 in Ubuntu / Elementary OS / Linux Mint via PPA 

 

LibreOffice is a powerful office suite; Its clean interface and its powerful tools let you unleash your creativity and grow your productivity. LibreOffice embeds several applications that make it the most powerful Free & Open Source Office suite on the market
In this tutorial, we are going to install LibreOffice 4.3 in Elementary OS Luna / Linux Mint / Ubuntu via PPA.
libreofficea
Open Terminal;
sudo add-apt-repository ppa:libreoffice/libreoffice-4-3
[sudo] password for kojo:
You are about to add the following PPA to your system:
LibreOffice 4.3.x series stable backports ppa (and SRU-testing for utopic)

http://sweetshark.livejournal.com/10977.html

This ppa will:
- not contain alpha and beta releases like 4.3.0~beta2
- not contain updates to the next major (4.4.x)
- contain minor release updates and their release candidates -- these can be
considered stable
Note that for minor release updates (4.3.1, 4.3.2, 4.3.3 ...) an rc2 is almost always exactly the same as the final version.

See: https://wiki.documentfoundation.org/ReleasePlan for details,
and: http://www.libreoffice.org/discover/new-features/ and https://wiki.documentfoundation.org/ReleaseNotes/4.3 for new features and fixes.

More info: https://launchpad.net/~libreoffice/+archive/ubuntu/libreoffice-4-3
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpO9OlJP/secring.gpg' created
gpg: keyring `/tmp/tmpO9OlJP/pubring.gpg' created
gpg: requesting key 1378B444 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpO9OlJP/trustdb.gpg: trustdb created
gpg: key 1378B444: public key "Launchpad PPA for LibreOffice Packaging" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Update your system;
sudo apt-get update
Now install Libre Office:
sudo apt-get install libreoffice
libreoffice-43
Cheers!

 

How To Install Oracle Database 12c On CentOS 7

How To Install Oracle Database 12c On CentOS 7

In this tutorial, we will show you how to install Oracle database 12c on RHEL7 Based linux distros.
OS information:
[root@ora-c7 ~]# cat   /etc/centos-release
CentOS Linux release 7.0.1406 (Core)

Network:
[root@ora-c7 ~]# ip a   | grep inet
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
    inet 192.168.119.139/24 brd 192.168.119.255 scope global dynamic eno16777736
    inet6 fe80::20c:29ff:fe41:1494/64 scope link

Login as root and add required groups:
 /usr/sbin/groupadd -g 501 oinstall
 /usr/sbin/groupadd -g 502 dba
 /usr/sbin/groupadd -g 503 oper
Add user Oracle:
/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle
Change password for user:
passwd oracle
Add kernel parameters to /etc/sysctl.conf.
 kernel.shmmni = 4096
 kernel.shmmax = 4398046511104
 kernel.shmall = 1073741824
 kernel.sem = 250 32000 100 128
 fs.aio-max-nr = 1048576
 fs.file-max = 6815744
 net.ipv4.ip_local_port_range = 9000 65500
 net.core.rmem_default = 262144
 net.core.rmem_max = 4194304
 net.core.wmem_default = 262144
 net.core.wmem_max = 1048586
Apply kernel parameters:
/sbin/sysctl -p
Add following lines to set shell limits for user oracle in file /etc/security/limits.conf
 oracle   soft   nproc    131072
 oracle   hard   nproc    131072
 oracle   soft   nofile   131072
 oracle   hard   nofile   131072
 oracle   soft   core     unlimited
 oracle   hard   core     unlimited
 oracle   soft   memlock  50000000
 oracle   hard   memlock  50000000
Edit /etc/hosts file:
[root@ora-c7 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.119.139 ora-c7.unixmen.local
Verify your network settings:
 [root@ora-c7 ~]# ping -c 1 O7-unixmen
 PING ora-c7.unixmen.local (192.168.119.139) 56(84) bytes of data.
 64 bytes from ora-c7.unixmen.local (192.168.119.139): icmp_seq=1 ttl=64 time=0.017 ms
--- ora-c7.unixmen.local ping statistics ---
 1 packets transmitted, 1 received, 0% packet loss, time 0ms
 rtt min/avg/max/mdev = 0.017/0.017/0.017/0.000 ms
 [root@ora-c7 ~]#
Modify .bash_profile for user oracle in his home directory add at the end file /home/oralce/.bash_profile.
# Oracle Settings
 #Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=O7-unixmen
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Check which packages are installed and which are missing.
as root copy this and  execute this:
yum groupinstall "GNOME Desktop" -y
yum groupinstall "Development Tools" -y
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
Create directory structure:
 mkdir -p   /u01/app/oracle/product/12.1.0
 chown  -R oracle:oinstall /u01/
 chmod  775 /u01/app
Disable selinux  by editing the “/etc/selinux/config” file,
SELINUX=permissive
Install database software
Let’s start with database software installation as oracle user.
su - oracle
Unzip the  database  install files:
unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip 
[oracle@ora-c7 ~]$ cd  database/
[oracle@ora-c7 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 21246 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2447 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-29_05-53-46AM. Please wait ..

Oracle1 Oracle2 Oracle3 Oracle4 Oracle5 Oracle6 Oracle7 Oracle8 Oracle9 Oracle10
During the linking phase, you will see the following error.
    Error in invoking target 'links proc gen_pcscfg procob' of makefile
    '/u01/app/oracle/product/12.1.0.2/db_1/precomp/lib/ins_precomp.mk'.
    See
    '/u01/app/oraInventory/logs/installActions2014-10-29_09-07-03PM.log'
    for details.
To fix it, do the following:
    rm -rf $ORACLE_HOME/lib/stubs/*
    cp $ORACLE_HOME/rdbms/lib/env_rdbms.mk $ORACLE_HOME/rdbms/lib/env_rdbms.mk.orig
Perform the following modifications:
vi $ORACLE_HOME/rdbms/lib/env_rdbms.mk
    # Line 176
    # FROM:
    LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS)
    # TO  :
    LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) -lons

    # Line 279-280
    # FROM:
    LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS)
    LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS)
    # TO  :
    LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS) -Wl,--no-as-needed
    LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS) -Wl,--no-as-needed

    # Line 3041-3042
    # FROM:
    TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
            $(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS)
    # TO  :
    TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
            $(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS) -lnnz12
Click the “Retry” button.
Now, the installation should continue.
[root@O7-unixmen ~]#  /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@O7-unixmen ~]#  /u01/app/oracle/product/12.1.0/db_1/root.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12.1.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@O7-unixmen ~]#

Oracle11
Oracle12 Oracle13 Oracle14

Post installation steps
Edit the “/etc/oratab”,
orcl:/u01/app/oracle/product/12.1.0/db_1:Y

Useful commands
[oracle@O7-unixmen database]$ lsnrctl

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 29-OCT-2014 14:27:04

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                29-OCT-2014 14:00:03
Uptime                    0 days 0 hr. 27 min. 4 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/O7-unixmen/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=O7-unixmen)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=O7-unixmen)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdborcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>

Have a fun :)
if you still have issues with install this database on CentOS 7, please back to install this on cenots6 in the bellow link:
http://www.unixmen.com/install-oracle-database-12-oracle-linux-6-5/

 

Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 14.10/14.04/13.10

Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 14.10/14.04/13.10

 

LAMP is a combination of operating system and open-source software stack. The acronym LAMP comes from the first letters of Linux, Apache HTTP Server, MySQL or MariaDB database, and PHP/Perl/Python.
In this tutorial, we will see how to setup LAMP server on Ubuntu 14.10 system.

Install Apache

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.
To install Apache, enter the following command from your terminal:
sudo apt-get install apache2

Test Apache:

Open your web browser and navigate to http://localhost/ or http://server-ip-address/.
Apache2 Ubuntu Default Page: It works - Mozilla Firefox_004

Install MySQL

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases, though SQLite probably has more total embedded deployments
sudo apt-get install mysql-server mysql-client
During installation, you’ll be asked to setup the MySQL root user password. Enter the password and click Ok.
sk@server: ~_002
Re-enter the password.
sk@server: ~_003
Now, MySQL server has been installed.
You can verify the MySQL server status using command:
sudo service mysql status
Sample output:
mysql start/running, process 11690
Note: If you want to use MariaDB instead of MySQL, then follow these steps.

Install MariaDB

MariaDB is a drop in replacement for MySQL. It is a robust, scalable and reliable SQL server that comes rich set of enhancements.
First you have to remove existing MySQL packages if any. To completely uninstall MySQL along with its configuration files, enter the following command:
sudo apt-get purge mysql*
Run the following command to remove unwanted packages.
sudo apt-get autoremove
After removing MySQL, run the following command to install MariaDB.
sudo apt-get install mariadb-server mariadb-client
Alternatively, you can install it from MariaDB repository if you want to try most recent version of MariaDB. Run the following commands to add PPA. As of writing this, MariaDB PPA is not yet updated to Ubuntu 14.10. However, we can use the repository of Ubuntu 14.04 instead.
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/5.5/ubuntu trusty main'
Update the software sources list and install MariaDB using following commands:
sudo apt-get update 
sudo apt-get install mariadb-server mariadb-client
During installation you will be asked to set mysql ‘root’ user password.
sk@server: ~_004
Re-enter password:
sk@server: ~_005
Check if mariadb is running or not, using the following command:
sudo service mysql status
Sample output:
 * /usr/bin/mysqladmin  Ver 9.0 Distrib 5.5.40-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Server version        5.5.40-MariaDB-1~trusty-log
Protocol version    10
Connection        Localhost via UNIX socket
UNIX socket        /var/run/mysqld/mysqld.sock
Uptime:            15 sec

Threads: 1  Questions: 571  Slow queries: 0  Opens: 332  Flush tables: 4  Open tables: 22  Queries per second avg: 38.066

Install PHP

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML.
Install PHP with following command:
sudo apt-get install php5 php5-mysql libapache2-mod-php5
To test PHP, create a sample “testphp.php” file in Apache document root folder.
sudo nano /var/www/html/testphp.php
Add the following lines.
<?php
phpinfo();
?>
Restart apache2 service:
sudo service apache2 restart
Navigate to http://server-ip-address/testphp.php. It will display all the details about php such as version, build date and commands etc.
phpinfo() - Mozilla Firefox_001
If you want to install all php modules, enter the command sudo apt-get install php* and restart the apache2 service. To verify the modules, open web browser and navigate to http://server-ip-address/testphp.php. You will able to see all installed php modules.

Manage MySQL Databases (Optional)

Install phpMyAdmin

phpMyAdmin is a free open-source web interface tool used to manage your MySQL databases. It is available in the Official Debian repositories. So install it with command:
sudo apt-get install phpmyadmin
Select the Web server you use. In my case, it is apache2.
sk@server: ~_007
Select ‘Yes’ to configure database for phpmyadmin wjth dbconfig-common.
sk@server: ~_008
Enter password of the database’s administrative user.
sk@server: ~_009
Enter MySQL application password phpmyadmin.
sk@server: ~_010
Re-enter the password.
sk@server: ~_011
Success, phpMyAdmin installation has been completed now.

Access phpMyAdmin Web Console

Now, you can access the phpmyadmin console by navigating to http://server-ip-address/phpmyadmin/ from your browser.
Enter your MySQL username and password which you have given in previous steps. In my case its “root” and “ubuntu”.
phpMyAdmin - Mozilla Firefox_002
You will be redirected to PhpMyAdmin main web interface.
192.168.1.100 - localhost | phpMyAdmin 4.2.6deb1 - Mozilla Firefox_003
Now, you can manage your MySQL databases from phpMyAdmin web interface.
That’s it. Your LAMP server is up and running now.

 

Saturday, October 18, 2014

CentOS: Install PXE Server On CentOS 7

Install PXE Server On CentOS 7

A PXE server allows your client computers to boot and install a Linux distribution over the network, without the need of burning Linux iso images, or human interaction.
For this test, I use vmware worksation (Bridged IP).
  • My IP = 192.168.0.199 (Required STATIC IP).
  • Selinux Disabled.
  • FirewallCMD disabled.
To install a PXE server, you will need the following components:
  • DHCP Server
  • TFTP Server
  • NFS/FTP/HTTPD server (to store installing files)
Note:
  • DHCP Server will listen only on eno16777736  (old name  etho).
In this tutorial, I will use vsftpd server.
1. Install required packages
yum install dhcp tftp tftp-server syslinux wget vsftpd
2. Configure DHCP Server
vim /etc/dhcp/dhcpd.conf
 # DHCP Server Configuration file.
 #   see /usr/share/doc/dhcp*/dhcpd.conf.example
 #   see dhcpd.conf(5) man page
 #
 # option definitions common to all supported networks...
 ddns-update-style interim;
 ignore client-updates;
 authoritative;
 allow booting;
 allow bootp;
 allow unknown-clients;
 # A slightly different configuration for an internal subnet.
 subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.50 192.168.0.253;
 option domain-name-servers 192.168.0.199;
 option domain-name "server1.example.com";
 option routers 192.168.0.199;
 option broadcast-address 10.5.5.31; #not important
 default-lease-time 600;
 max-lease-time 7200;
 
 # PXE SERVER IP
 next-server 192.168.0.199; #  DHCP server ip
 filename "pxelinux.0";
 }
3. Configure TFTP Server. Set disable from yes to no, and change the root directory on startup to /tftpboot
vim /etc/xinetd.d/tftp
service tftp
 {
 socket_type             = dgram
 protocol                = udp
 wait                    = yes
 user                    = root
 server                  = /usr/sbin/in.tftpd
 server_args             = -s /tftpboot
 disable                 = no
 per_source              = 11
 cps                     = 100 2
 flags                   = IPv4
 }
4. Setup TFTP Server network boot files
mkdir -p /tftpboot
chmod 777 /tftpboot
 cp -v /usr/share/syslinux/pxelinux.0 /tftpboot
 cp -v /usr/share/syslinux/menu.c32 /tftpboot
 cp -v /usr/share/syslinux/memdisk /tftpboot
 cp -v /usr/share/syslinux/mboot.c32 /tftpboot
 cp -v /usr/share/syslinux/chain.c32 /tftpboot
mkdir /tftpboot/pxelinux.cfg
mkdir -p /tftpboot/netboot/
5. Mount Cenots ISO to FTP folder /var/ftp/pub.
mount Centos7_xx.iso /var/ftp/pub
6. Copy initrd.img  and vmlinuz from FTP folder to /tftpboot/netboot/.
cp /var/ftp/pub/images/pxeboot/vmlinuz /tftpboot/netboot/
cp /var/ftp/pub/images/pxeboot/initrd.img /tftpboot/netboot/

7. Encode root password used for clients
Example: 000000
 openssl passwd -1 "000000"
 $1$w2UlrRDP$rk9zBcY1PP3fUC3Xv6P6i/
8. Create a new kickstart file (you can change it for your needs)
 vim /var/ftp/pub/ks.cfg
 #platform=x86, AMD64, or Intel EM64T
 #version=DEVEL
 # Firewall configuration
 firewall --disabled
 # Install OS instead of upgrade
 install
 # Use NFS installation media
 url --url="ftp://192.168.0.199/pub/"
 # Root password [i used here 000000]
 rootpw --iscrypted $1$xYUugTf4$4aDhjs0XfqZ3xUqAg7fH3.
 # System authorization information
 auth  useshadow  passalgo=sha512
 # Use graphical install
 graphical
 firstboot disable
 # System keyboard
 keyboard us
 # System language
 lang en_US
 # SELinux configuration
 selinux disabled
 # Installation logging level
 logging level=info
# System timezone
 timezone Europe/Amsterdam
 # System bootloader configuration
 bootloader location=mbr
 clearpart --all --initlabel
 part swap --asprimary --fstype="swap" --size=1024
 part /boot --fstype xfs --size=200
 part pv.01 --size=1 --grow
 volgroup rootvg01 pv.01
 logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow

%packages
 @core
 wget
 net-tools
 %end
 %post
 %end

9. Create PXE menu file
vim /tftpboot/pxelinux.cfg/default
 default menu.c32
 prompt 0
 timeout 30
 MENU TITLE CentOS PXE Install Menu

 LABEL centos7_x64
 MENU LABEL CentOS 7 X64
 KERNEL /netboot/vmlinuz
 APPEND  initrd=/netboot/initrd.img  inst.repo=ftp://192.168.0.199/pub  ks=ftp://192.168.0.199/pub/ks.cfg
10. Final service setup
 chkconfig dhcpd on
 chkconfig xinetd on
 chkconfig vsftpd on
11. Restart the services
 Service vsftpd  restart
 service dhcpd restart
 service xinetd   restart
12. Now create new virtual machine and start from network and enjoy.

Thursday, October 16, 2014

UBUNTU : Debian-goodies: A must-have Set of Utilities For Debian/Ubuntu Administrators

Debian-goodies: A must-have Set of Utilities For Debian/Ubuntu Administrators


Are you a Debian/Ubuntu Administrator or a regular user, then you may use the dpkg and APT commands often. These commands are used to install, remove, update or upgrade a package or the whole system. Mostly, we use the above two tools only for our day to day operations, But believe me, there are many useful commands are exist that most users aware of.
If you want to know which packages occupy the most disk space, or which package might have broken another, or to get a most recent version of a package, or just to get a particular version of a package, then you probably needDebian-goodies.
According to the Official site,
Debian-goodies are a set of small toolbox style of utilities for Debian, and derivatives. These programs are designed to integrate with shell tools, extending them to operate on the Debian packaging system.
In-fact, Debian-goodies will bring more information than dpkg, and apt tools. In this tutorial, let us explore some useful Debian-goodies utilities.
First, let us install debian-goodies on our system using the following command. This command should work on Debian, Ubuntu, and its derivatives.
sudo apt-get install debian-goodies

Usage

1. dgrep Utility

This utility will search all files for a particular pattern or regex in a specified package, whereas “grep” utility search specified regex in a specified file.
Example:
To search a word “mozilla” in the firefox package, run the following command
sudo dgrep "mozilla" firefox
Sample output:
[...]
/usr/lib/firefox/distribution/searchplugins/locale/en-GB/google.xml:<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
 /usr/lib/firefox/distribution/searchplugins/locale/en-GB/wikipedia.xml:   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 /usr/lib/firefox/distribution/searchplugins/locale/en-GB/wikipedia.xml:<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
 /usr/lib/firefox/distribution/searchplugins/locale/en-GB/chambers-en-GB.xml:   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 /usr/lib/firefox/distribution/searchplugins/locale/en-GB/chambers-en-GB.xml:<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
To view the list if installed packages in your Debian based system, run the following command:
dpkg -l

2. dglob Utility

This utility will list package names matching a specified string. By default, it will list only the installed packages. If you want to list all packages, use the flag “-a”.
Example:
sudo dglob firefox
Sample output:
firefox
firefox-locale-en

3. debget Utility

This command is somewhat similar to apt-get tool. Apt-get will download and install a specified package, but debget command will download a specified package from a public mirror, and saves the downloaded package in the current directory.
Example:
sudo debget transmission
Sample Output:
(transmission -> 2.82-1.1ubuntu3.1)
(transmission -> 2.82-1.1ubuntu3)
Downloading transmission from http://archive.ubuntu.com/ubuntu/pool/universe/t/transmission/transmission_2.82-1.1ubuntu3.1_all.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1200  100  1200    0     0    570      0  0:00:02  0:00:02 --:--:--   570
As you see in the above output, the transmission package is downloaded and saved in the current working directory.

4. dpigs Utility

This utility is one of the important and useful among other debian-goodies utitlities. It will display which installed package occupy the most space in your system. Be mindful that, It won’t show exact size of disk space occupied by a particular package, instead it will only show the name of the packages.
Example:
sudo dpigs
Sample output:
148409 linux-image-extra-3.13.0-37-generic
148328 linux-image-extra-3.13.0-35-generic
147551 virtualbox-4.3
131814 libreoffice-core
120489 wine1.6-amd64
115449 wine1.6-i386
87671 firefox
82957 fonts-horai-umefont
75667 libreoffice-common
64375 linux-firmware
As you see above, the dpigs command displays the top 10 installed packages which use most space along with their process id. If you want to display more packages, then use the flag “n” as shown below.
For example, let us bring the top 15 packages that use most space.
dpigs -n 15
Sample output:
148409 linux-image-extra-3.13.0-37-generic
148328 linux-image-extra-3.13.0-35-generic
147551 virtualbox-4.3
131814 libreoffice-core
120489 wine1.6-amd64
115449 wine1.6-i386
87671 firefox
82957 fonts-horai-umefont
75667 libreoffice-common
64375 linux-firmware
61822 linux-headers-3.13.0-37
61820 linux-headers-3.13.0-35
56274 openjdk-7-jre-headless
45906 wine-mono0.0.8
41094 linux-image-3.13.0-37-generic

5. checkrestart Utility

This is another useful tool in the debian-goodies family. It will notify you the list of services that you need to restart after upgrading your system. As you may know, after you upgrade your system, some running applications might use the old libraries or configuration files. So you can quickly find out which processes need to be restarted after installing a software. So checkrestart will audit the system to find out the outdated versions of libraries in use.
Example:
Please note that you should run this command as root user.
sudo checkrestart
Sample output:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
Found 0 processes using old versions of upgraded files
As per the above result, I don’t need to restart any services.

6. dhomepage Utility

dhomepage will take you directly to the website of any specified package. This tool will be very useful if you are looking for more details of any package.
Example:Example:
dhomepage transmission
The above command will automatically open the transmission home page in your default browser.
Transmission - Mozilla Firefox_001
Very cool, isn’t it?

7. which-pkg-broke Utility

This is yet another useful utility in the debian-goodies list. It will display the list of a specified package along with all its dependencies including the time of installation. So if something went wrong when upgrading the system or a package, you can easily find, at what time, and which packages have broken your system.
Example:
For example, if firefox didn’t work properly, you can find out which package is responsible for the breakage as shown below.
which-pkg-broke firefox
Sample output:
Package ttf-bitstream-vera has no install time info
Package <debconf-2.0> has no install time info
Package gsfonts-x11 has no install time info
debianutils                                            Wed Jul 23 04:30:56 2014
debconf                                                Wed Jul 23 04:30:56 2014
coreutils                                              Wed Jul 23 04:30:56 2014
liblzma5:amd64                                         Wed Jul 23 04:30:57 2014
libacl1:amd64                                          Wed Jul 23 04:30:57 2014
libdb5.3:amd64                                         Wed Jul 23 04:30:57 2014
libattr1:amd64                                         Wed Jul 23 04:30:57 2014
libbz2-1.0:amd64                                       Wed Jul 23 04:30:57 2014
[...]
This list is not over. Debian-goodies has lot of the more useful utilities. Though we might not use all of them regularly, but they are worth to learn. They will be very useful at the right time for sure.
Cheers!