Installing git on Debian 8.x

You should edit your sources.list , by adding the following line:

deb http://ftp.ca.debian.org/debian/ jessie main contrib

Then upgrade your package and install git:

apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get -f install
apt-get install git

nJoy ;-)

(more…)

Change Hostname Permanently on Debian or Ubuntu

Debian based systems use the file /etc/hostname to read the hostname of the computer at boot time and set it up using the init script /etc/init.d/hostname.sh

We can edit the file /etc/hostname and change the hostname and then run:

/etc/init.d/hostname.sh start

Steps:

1. sudo vim /etc/hostname
2. Save the file with the hostname you like to set
3. sudo /etc/init.d/hostname.sh start

Ref: http://sysblogd.com/50/change-hostname-permanently-on-debian-or-ubuntu.htm

 

nJoy 😉

Convert DEB to RPM or RPM to DEB Package

You can convert DEB file to RPM package and RPM to DEB package using alien command, if you have a *.rpm file that you want to install on a Debian or Ubuntu.

Convert RPM to DEB

Install alien command on Ubuntu as mentioned here:

# sudo apt-get install alien

Now, use alien command to convert rpm to deb file,

# alien clamav-0.92.1-1.el5.rf.i386.rpm

clamav-0.92.1-1.el5.rf.i386.deb generated

Finally, Install deb packages using the dpkg command,

# dpkg -i clamav-0.92.1-1.el5.rf.i386.deb

Where,
-i = install a package

Convert DEB to RPM

Use alient -r option to convert a deb file to rpm file.

# alien -r clamav-0.92.1-1.el5.rf.i386.deb

clamav-0.92.1-1.el5.rf.i386.rpm generated

Once you generate the rpm file, you can install it on Red Hat, Fedora or CentOS.
Finally install rpm,

# rpm -ivh clamav-0.92.1-1.el5.rf.i386.rpm

Where,
-i = Install RPM
-v = Install in verbose Mode
-h = Print  50  hash  marks  as the package archive is unpacked

nJoy 😉