Procedures for installing a tftp phone server with CentOS
Install Centos 7
Install Centos from DVD using the minimal installation option.
Note: You will need to set a root password and one username and password for a normal user.
Configure Networking
Centos minimal installs have networking disabled. After you have IP address, Gateway, and DNS, follow the directions below to enable/configure the network card.
Note: Your network card name my differ from the example. Just follow the directions to edit your particular NIC.
How to setup network after RHEL/CentOS 7 minimal installation
After installingRHEL/CentOS 7 minimal, You may not able to connect network in that machine. This will happen because Ethernet interfaces are not enabled by default.
This guide explain you to setup network on RHEL/CentOS 7.
Setup network on CentOS 7 minimal
Log in as root.
Type “nmcli d” command in your terminal for quick listethernet cardinstalled on your machine.
Type “nmtui” command in your terminal to open Network manager. After opening Network manager chose “Edit connection” and press Enter (Use TAB button for choosing options).
Now choose you network interface and click “Edit
Choose “Manual” and fill out necessary info in IPv4 CONFIGURATION. You will need to choose add for IP addresss, DNS, etc. Check “Automatically connect” check box and press OK and quit from Network manager.
Reset network services:
service network restart
Now your reboot your server to update network settings. Use the command “shutdown –r now. After reboot log back in as root. Type “ifconfig” at root prompt to make sure the settings are correct.
Update CentOS
Assuming networking is working, you now need to update the machine.
Log in as root if not already.
Type in “yum –y update” and wait for it to complete.
Reboot the server with “shutdown –r now”.
Install tftp services
Log in as root.
Type “yum –y install tftp tftp-server xinetd”.
Type “systemctl enable xinetd”
Type “systemctl enable tftp”
By default, the SELinux uses enforcing policy, which does not accept any change. To make any change to SELinux, first modify /etc/selinux/config and change the policy to permissive.
Configure firewalld
A more standard way to allow TFTP is to use firewall-cmd command:
firewall-cmd –zone=public –add-service=tftp –permanentfirewall-cmd –-zone=public –-add-service=tftp -permanent
Let’s add SSH as well for managing the server remotely:
firewall-cmd –zone=public –add-service=tftp –permanentfirewall-cmd –-zone=public –-add-service=ssh -permanent
Where the –permanent option is used to permanently enable the TFTP and SSH ports. Command firewall-cmd –reload is needed every time changing the firewall config.
To check the status or enable firewalld, following commands can be used:
systemctl status firewalldsystemctl enable firewalldsystemctl start firewalldsystemctl enable sshdsystemctl start sshd
Writing files to the server.
The easiest way to write config or flash update files to the server is to use an sftp client like Filezilla. Optionally, for the unimpaired with linux, you could use the sftp command. Either way, login as root in your client and write the files to the /var/lib/tftpboot/ directory.
Appendix A – DHCP configurations for tftp services by phone type.
Most phones, Cisco, Polycom, Aastra, etc., use dhcp server option 66 for configurations. This can be a server option or a global scope option. Select option 66 and the string value is the ip address of the server you configured above.