Solaris下tftp配置-创新互联
1.修改inetd.conf,将tftp前面的注释符号去掉,该行最后一个参数/tftpboot即为默认的工作目录,可按需修改
创新互联是一家集网站建设、做网站、网站页面设计、网站优化SEO优化为一体的专业网站制作公司,已为成都等多地近百家企业提供网站建设服务。追求良好的浏览体验,以探求精品塑造与理念升华,设计最适合用户的网站页面。 合作只是第一步,服务才是根本,我们始终坚持讲诚信,负责任的原则,为您进行细心、贴心、认真的服务,与众多客户在蓬勃发展的市场环境中,互促共生。vi /etc/inetd.conf
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)inetd.conf 1.56 04/10/21 SMI"
#
# Legacy configuration file for inetd(1M). See inetd.conf(4).
#
# This file is no longer directly used to configure inetd.
# The Solaris services which were formerly configured using this file
# are now configured in the Service Management Facility (see smf(5))
# using inetadm(1M).
#
# Any records remaining in this file after installation or upgrade,
# or later created by installing additional software, must be converted
# to smf(5) services and imported into the smf repository using
# inetconv(1M), otherwise the service will not be available. Once
# a service has been converted using inetconv, further changes made to
# its entry here are not reflected in the service.
#
#
# CacheFS daemon. Provided only as a basis for conversion by inetconv(1M).
#
100235/1 tli rpc/ticotsord wait root /usr/lib/fs/cachefs/cachefsd cachefsd
# TFTPD - tftp server (primarily used for booting)
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
_tgw3_52200 stream tcp nowait root /opt/ericsson/bin/emt_tgw_telnetd emt_tgw_telnetd -h -P /opt/ericsson/bin
# IMH service for FM
#
IMH_com_rec stream tcp nowait nmsadm /etc/opt/ericsson/fm_core/startscript/IMH_com_rec IMH_com_rec
2.把服务添加到svc的控制列表中
inetconv -i /etc/inet/inetd.conf 1>/dev/null 2>&1
3.创建相关目录
# mkdir /tftfboot ; ln -s /tftpboot/. /tftpboot/tftpboot
# chmod -R 777 /tftpboot
# ls -la /tftpboot
total 4
drwxrwxrwx. 2 root root 21 Oct 11 11:43 .
drwxr-xr-x. 19 root root 4096 Oct 11 11:43 ..
lrwxrwxrwx. 1 root root 11 Oct 11 11:43 tftpboot -> /tftpboot/.
4.用svcadm命令开启服务
$ svcadm enable svc:/network/tftp/udp6:default
5.检测服务运行状态:
$ svcs -a |grep tftp
online Jan_11 svc:/network/tftp/udp6:default
$ netstat -a |grep tftp
*.tftp Idle
*.tftp Idle
$ lsof -i:69
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
inetd 2298 root 31u IPv6 0x60091ddbd40 0t0 UDP *:tftp
$
//////////////////////////注意
上传文件时报错: Error code 2: Access violation 是因为系统安全策略原因,需要在tftp工作目录中创建了一个同名文件,并修改文件权限chmod 777
例如需要上传文件名为 testfile.txt,服务端操作步骤如下:
cd /tftpboot
touch testfile.txt
vi testfile.txt ///不需要写任何内容
chmod 777 testfile.txt
另外,因该目录挂在根目录,上传文件前需要注意目录剩余空间,并及时清理不需要的文件,或者更改tftp服务默认的工作目录
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网页名称:Solaris下tftp配置-创新互联
浏览地址:http://cdiso.cn/article/goisg.html