关于程序安装问题!

BruceJu 2007-10-13 04:10:20
我装了openssh-3.9p1.tar.gz
装完之后service sshd start可以启动服务.
后来我把它删除,再重装,中间没有重启过机器。
装好后用上面的命令启动服务时说没有这个命令。

rpm -qa |grep sshd 一个结果都找不到。

这上为什么啊?望高手指点!
...全文
56 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
BruceJu 2007-10-14
  • 打赏
  • 举报
回复
问题解决!万分感谢!
hefuhua 2007-10-13
  • 打赏
  • 举报
回复
http://www.linuxfromscratch.org/blfs/view/stable/server/openssh.html
你还可以参考下blfs编译的ssh..
hefuhua 2007-10-13
  • 打赏
  • 举报
回复
/sbin/service 是发行版自带启动服务的命令,一搬都是启动时加载的服务..

如果你用root用法去/sbin/service的话,应该删除了,如果有看看有没有ls -la /sbin/service
有没有x执行权限..

源码安装的需要自己加启动服务:)
可以给你个启动脚步参考
root:~#cat /etc/rc.d/init.d/sshd
#!/bin/sh
# Begin $rc_base/init.d/sshd

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org

#$LastChangedBy: bdubbs $
#$Date: 2006-04-15 17:34:16 -0500 (Sat, 15 Apr 2006) $

. /etc/sysconfig/rc
. $rc_functions

case "$1" in
start)
boot_mesg "Starting SSH Server..."
[ -f /etc/ssh/ssh_host_key ] || ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_ key -N ""
[ -f /etc/ssh/ssh_host_rsa_key ] || ssh-keygen -t rsa -f /etc/ssh/ssh_ho st_rsa_key -N ""
[ -f /etc/ssh/ssh_host_dsa_key ] || ssh-keygen -t dsa -f /etc/ssh/ssh_ho st_dsa_key -N ""
# Also prevent ssh from being killed by out of memory conditions
loadproc /usr/sbin/sshd
sleep 1
echo "-16" >/proc/`cat /var/run/sshd.pid`/oom_adj
;;

stop)
boot_mesg "Stopping SSH Server..."
killproc /usr/sbin/sshd
;;

reload)
boot_mesg "Reloading SSH Server..."
reloadproc /usr/sbin/sshd
;;

restart)
$0 stop
sleep 1
$0 start
;;

status)
statusproc /usr/sbin/sshd
;;

*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac

# End $rc_base/init.d/sshd


# /etc/rc.d/init.d/sshd
Usage: /etc/rc.d/init.d/sshd {start|stop|reload|restart|status}

root:~# /etc/rc.d/init.d/sshd stop
Stopping SSH Server... [ OK ]
root:~# /etc/rc.d/init.d/sshd start
Starting SSH Server...
BruceJu 2007-10-13
  • 打赏
  • 举报
回复
以前启动程序都是用

安装目录/sbin/service sshd start

运行的,

现在到这个目录下,说找不到service这个命令!

这是什么原因?
BruceJu 2007-10-13
  • 打赏
  • 举报
回复
sshd的安装路径是可以找到的

我是用源码编译再安装的

那为什么会不能运行呢?
hefuhua 2007-10-13
  • 打赏
  • 举报
回复
which sshd
能不能照到sshd所在路径?

如果你是用源码编译再安装rpm是找不到的..

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧