免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1966 | 回复: 7
打印 上一主题 下一主题

如何在solaris中实现proftp自启动。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-23 18:58 |只看该作者 |倒序浏览
如何在solaris中实现proftp自启动。试过一些方法 但都没什么作用。哪位大侠会这个东东。教教我 谢谢了

论坛徽章:
7
荣誉会员
日期:2011-11-23 16:44:17水瓶座
日期:2013-08-28 21:20:16丑牛
日期:2013-10-02 21:01:462015年迎新春徽章
日期:2015-03-04 09:54:45操作系统版块每日发帖之星
日期:2016-06-05 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-20 08:24:0515-16赛季CBA联赛之四川
日期:2016-08-18 15:02:02
2 [报告]
发表于 2006-07-23 22:52 |只看该作者
在/etc/rc3.d创建启动和停止脚本就OK了。

论坛徽章:
0
3 [报告]
发表于 2006-07-24 10:34 |只看该作者
#!/sbin/sh

case "$1" in
start)
        /usr/local/proftpd/sbin/proftpd &
;;
stop)
        pkill proftpd
;;
*)
        echo "Usage: $0 { start | stop }"
        exit 1
;;
esac
exit 0

论坛徽章:
0
4 [报告]
发表于 2006-07-24 10:35 |只看该作者
放在/etc/rc3.d 里面。起个名字S55proftpd

论坛徽章:
0
5 [报告]
发表于 2006-07-24 10:36 |只看该作者
原帖由 yhn8114 于 2006-7-24 10:34 发表
#!/sbin/sh

case "$1" in
start)
        /usr/local/proftpd/sbin/proftpd &
;;
stop)
        pkill proftpd
;;
*)
        echo "Usage: $0 { start | stop }"
        e ...



/usr/local/proftpd 为安装的路径

论坛徽章:
0
6 [报告]
发表于 2006-07-24 14:00 |只看该作者
谢谢 我试试看

论坛徽章:
0
7 [报告]
发表于 2006-07-24 14:39 |只看该作者
以前整理的,参考一下吧

六. 制作自启动脚本
制作启动脚本命名为S97proftpd文件放到/etc/rc3.d/下
1,确保启动脚本写正确。不只是直接运行命令,还要看是不是需要设置相应的环境变量。
2,启动脚本的命名。必须以大写的S开头,后边根数字标志该目录下各个文件的执行顺序。再后边的字母随便起。
3,当系统进入运行级别3时会执行/etc/rc3.d目录下所有以大写S开头的脚本,相应的系统进入运行级别2时执行/etc/rc2.d目录下的以大写S开头的脚本。
S97proftpd内容:
#!/bin/sh
# description: ProFTPD is an enhanced FTP server with \
#              a focus toward simplicity, security, and ease of configuration. \
#              It features a very Apache-like configuration syntax, \
#              and a highly customizable server infrastructure, \
#              including support for multiple 'virtual' FTP servers, \
#              anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /usr/local/etc/proftpd.conf

pid=`/usr/bin/ps -ef | /usr/bin/grep proftpd | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`

case "$1" in
'start')
                /usr/local/sbin/proftpd &
                ;;

'stop')
                if [ "${pid}" != ""];
                then
                        ps -ef|grep proftpd| grep -v grep|awk '{print "kill -9 " $2}'
                fi
                ;;
*)
                echo "usage: /usr/local/etc/proftpd.conf"
                ;;
esac
exit 0



+Proftpd为默认FTP服务器(Solaris 8 本身默认安装一个ftp)
  默认ftp停用的方法:/etc/inet/inet.conf中ftp 服务mask掉 以后再重新启动inetd服务
    proftpd.conf->     #DefaultServer  on

论坛徽章:
0
8 [报告]
发表于 2006-07-24 22:24 |只看该作者
搞定,谢谢楼上的兄弟了。又长见识了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP