Difference between revisions of "Configuring Debian 8.6"
From rdkwiki
(Created page with "== Intro == The steps below are after you have done the initial setup. Assuming you did a minimal installation, didn't create a user and didn't configure the network-interface...") |
|||
Line 14: | Line 14: | ||
== Setting a hostname and configure the network interface == | == Setting a hostname and configure the network interface == | ||
− | * ''' | + | * '''nano /etc/network/interfaces''' --> configure network interface (make sure to set at least IP-address, gateway, DNS) |
comment: '''# iface eth0 net dhcp''' --> disable dhcp for the interface (put the # in front) | comment: '''# iface eth0 net dhcp''' --> disable dhcp for the interface (put the # in front) | ||
add: '''address x.x.x.x''' --> for example 192.168.1.10 | add: '''address x.x.x.x''' --> for example 192.168.1.10 | ||
Line 21: | Line 21: | ||
add: '''dns-domain testexample.com''' --> domain-name | add: '''dns-domain testexample.com''' --> domain-name | ||
add: '''dns-nameservers 192.168.1.200''' --> dns-server to use | add: '''dns-nameservers 192.168.1.200''' --> dns-server to use | ||
− | |||
* '''systemctl restart networking''' --> restart the network with the new configuration | * '''systemctl restart networking''' --> restart the network with the new configuration | ||
* '''hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN | * '''hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN |
Revision as of 20:20, 2 November 2016
Contents
Intro
The steps below are after you have done the initial setup. Assuming you did a minimal installation, didn't create a user and didn't configure the network-interface and hostname during the setup-wizard.
Install sudo
- apt install sudo --> install sudo application
Creating a user with admin-rights (sudo)
- adduser <username> --> create a new user
- passwd <username> --> set a password for the user
- visudo --> to give the new user sudo-rights
add <user> ALL=(ALL:ALL) ALL after root ALL=(ALL:ALL) ALL
Now you can log off and logon and continue as the new non-root user.
Setting a hostname and configure the network interface
- nano /etc/network/interfaces --> configure network interface (make sure to set at least IP-address, gateway, DNS)
comment: # iface eth0 net dhcp --> disable dhcp for the interface (put the # in front) add: address x.x.x.x --> for example 192.168.1.10 add: net mask x.x.x.x --> for example 255.255.255.0 add: gateway x.x.x.x --> for example 192.168.1.1 add: dns-domain testexample.com --> domain-name add: dns-nameservers 192.168.1.200 --> dns-server to use
- systemctl restart networking --> restart the network with the new configuration
- hostnamectl set-hostname <hostname> --> set hostname, make sure it's a FDQN
- hostnamectl status --> check the hostname configuration
Update the system with latest security and software patches
- yum update --> check for new version and updates the system when you accept the installation
- reboot --> restart the system after installation
Securing SSH access
You can find this here: SSH key-based authentication