| 5 | |
| 6 | == Setting the Hostname and FQDN == |
| 7 | |
| 8 | Remember this VM is a clone of your pc.userX.ws.ac.lk. Therefore you have to change some settings in order to make this vm unique. |
| 9 | |
| 10 | === Setting up hostname === |
| 11 | |
| 12 | - Login to the vm. change to root user |
| 13 | {{{ |
| 14 | $sudo su |
| 15 | }}} |
| 16 | - Give your password |
| 17 | - Edit /etc/hostname |
| 18 | {{{ |
| 19 | #nano /etc/hostname |
| 20 | }}} |
| 21 | * Change '''pc''' to '''www''' |
| 22 | * Save and Exit |
| 23 | - also edit /etc/hosts file to change 127.0.0.1 pc."your domain".ws.ac.lk pc to 127.0.0.1 www."your domain".ws.ac.lk www |
| 24 | |
| 25 | === IP Set up === |
| 26 | |
| 27 | Edit /etc/network/interfaces files to include your IP addresses in your pc |
| 28 | |
| 29 | - Login to the vm. change to root user |
| 30 | {{{ |
| 31 | $sudo su |
| 32 | }}} |
| 33 | - Give your password |
| 34 | - Edit /etc/network/interfaces |
| 35 | {{{ |
| 36 | #vi /etc/network/interfaces |
| 37 | }}} |
| 38 | - Find the following line |
| 39 | {{{ |
| 40 | iface eth0 inet dhcp |
| 41 | }}} |
| 42 | '''Note''': "eth0" is the name of your virtual interface. It could also be something like "enp0s3". If so you will use that instead of eth0 |
| 43 | - Change it to |
| 44 | {{{ |
| 45 | #iface eth0 inet dhcp |
| 46 | }}} |
| 47 | - Add the following lines (Get your ldap IP Address from [wiki:ipallocation iptable]) |
| 48 | {{{ |
| 49 | iface eth0 inet static |
| 50 | address "Your ldap IP address" |
| 51 | netmask 255.255.255.0 |
| 52 | network 192.248.6.0 |
| 53 | broadcast 192.248.6.255 |
| 54 | gateway 192.248.6.254 |
| 55 | dns-nameservers 192.248.1.161 |
| 56 | dns-search yourdmain |
| 57 | }}} |
| 58 | |
| 59 | When you completed the IP settings of of VM, restart the vm and then login to confirm correct IP settings. |
| 60 | |
| 61 | Before you get started, make sure you set up your server so that it correctly resolves its hostname to fully qualified domain name (FQDN). This will be necessary in order for your certificates to be validated by clients. |
| 62 | |
| 63 | check FQDN by |
| 64 | {{{ |
| 65 | hostname -f |
| 66 | }}} |
| 67 | |