≡ Menu

software packages

CentOS / RHEL Configure Yum Automatic Update Retrieval and Installation

The yum command line tool is used to install and update software packages under RHEL / CentOS Linux server. I know how to apply updates using yum update command line, but I'd like to use cron to manually update packages where appropriate. How do I configure yum to install software patches / updates automatically with cron?
[click to continue…]

FreeBSD Install .TBZ Package File

I've download .tbz file from the FreeBSD ftp server. How do I install this binary file using command line options?
[click to continue…]

FreeBSD Obtain and Install Ports File in /usr/ports

Q. I've installed FreeBSD server without ports. When installing my FreeBSD system, sysinstall asked my, if I would like to install the Ports Collection? I chose not to install it. Now, how do I obtain and install the FreeBSD ports collection in /usr/ports?
[click to continue…]

FreeBSD List All Outdated Package

Q. How do I know what packages are available to be updated on my FreeBSD Server system? How do I list all outdated packages under FreeBSD / OpenBSD operating system?
[click to continue…]

Linux rpm List Installed Packages

How do I list all installed packages using rpm command on CentOS/Suse/Fedora/RHEL/Scientific and Red Hat Enterprise Linux?
[click to continue…]

How do I install and search FreeBSD ports or a package?

Q. I’ve just moved from a Linux server to a new FreeBSD server. I'm confused with FreeBSD ports system. Can you tell me - how do I find a package file (port) and install the same?

A. Under Linux you use rpm / up2date / yum or apt-get command to install a package. Under FreeBSD you can use pkg_add command or ports system.

The FreeBSD Ports Collection is a package management system that provides an easy and consistent way of installing software packages on the FreeBSD. Usually ports is located at /usr/ports directory.

Task: Find out FreeBSD port name or package name

There are 3 different methods available to search a port name. Use any one of the following method only.

#1 : Using whereis command

If you know the exact name of the port, but just need to find out which category it is in, you can use the whereis(1) command. Simply type whereis file, where file is the program you want to install.
# whereis php5

php5: /usr/ports/lang/php5

# whereis lighttpd

lighttpd: /usr/ports/www/lighttpd

#2: Using make command

Change directory to /usr/ports
# cd /usr/ports

To search type the command as follows:
# make search name="package-name"
For example search a package called lighttpd or php
# make search name="php"
# make search name="lighttpd"

Port:   lighttpd-1.4.13_2
Path:   /usr/ports/www/lighttpd
Info:   A secure, fast, compliant, and very flexible Web Server
Maint:  mnag@FreeBSD.org
B-deps: autoconf-2.59_2 libtool-1.5.22_4 m4-1.4.8_1 pcre-7.0_1 perl-5.8.8
R-deps: pcre-7.0_1
WWW:    http://www.lighttpd.net/

#3: Using locate command

You can also use locate command:
# locate php
# locate php | grep php5

Task: Install FreeBSD port

Above output displays port Path - /usr/ports/www/lighttpd. Just change directory to /usr/ports/www/lighttpd
# cd /usr/ports/www/lighttpd
Now install a port:
# make; make install
Clean the source code tree:
# make clean