Sunday, February 7, 2016

Debian 8 basic configurations

Configure static IP address:

1. Use root access the system.
2. Edit the network configuration file:

nano /etc/network/interfaces

3. Sample static IP config:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

#changed allow-hotplug eth0
#changed iface eth0 inet dhcp

#Static IP configurations:
auto eth0
iface eth0 inet static
        address 192.168.1.200
        netmask 255.255.255.0
        network 192.168.1.0
#       broadcast 192.168.1.255
        gateway 192.168.1.100

#DNS configurations:
dns-nameservers 8.8.4.4
dns-nameservers 8.8.8.8

4. Save the file and restart network service:

service networking restart
or
/etc/init.d/networking restart


Update application package, e.g. Node.js:

1. Use root access the system or use sudo command.

2. Make sure the network is connected to the public Internet.  If needed, restart the network interface:

service networking restart

3. If curl is not installed, install it first:

apt-get install curl

4. Remove the package first:

apt-get remove nodejs

5. Get the latest source (say for v4.x):

curl -sL https://deb.nodesource.com/setup_4.x | bash -

If not using root account:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

6. Install the package:

apt-get install nodejs

___ END ___

No comments:

Post a Comment