记录生活 学习SEO优化 | 他日若遂凌云志 敢笑黄巢不丈夫
>>Home > 学习笔记 > vps记录 > ntsysv:command not found解决情况

ntsysv:command not found解决情况

Tags: | | 作者:海天无影

最近海天正在玩VPS,由于是第一次接触linux的系统,当然以前玩过Ubuntu,但那也是桌面系统。和现在弄的centos这样的全部用命令行操作的完全不一样,所以最近弄的VPS对海天来说算是一个新的挑战了。所以最近海天的更新频率可能又要下降了,而且以后海天也会记录一些在使用VPS时的笔记。

海天正在准备给自己的centos装上LAMP,然后看看是不是把论坛和博客一起转上去。

本来海天也准备用WIN的VPS,但据说Linux在相同配置下对php的支持更好,所以就硬着头皮选择了差不多是一窍不通的linux下的系统。

海天奔来准备选择效率更高的LNMP,但是发现Nginx与apache下的伪静态是不一样的,所以为了方便市面上的伪静态语句,海天就还是装LAMP环境吧,反正海天的站也不是什么大站。

今天在学习linux语句的时候,看到了ntsysv操作,用来查看、关闭系统的服务的语句。

但是当海天执行ntsysv时,却提示bash:ntsysv:command not found

海天在网上翻了不少教程,都是因为环境变量的原因,因此直接执行ntsysv时提示,找不到程序,所以解决的办法由两种:
1、找到执行程序的路径,然后进入到程序所在的文件夹运行
2、将必要的系统文件夹,添加到系统的变量环境 。

先来说说第一种方法吧,找到程序所在的文件夹,我们可以用“ whereis ”来查找程序[command]所在文件夹,然后进入文件夹,运行“ ./[command] ”即可。比如,“ whereis ifconfig ”命令可得知ifconfig所在路径是/sbin/ifconfig,即在sbin目录下,然后到sbin目录下运行" ./ifconfig "就完成了。

第一种方法适合使用次数少的程序,如果你经常需要使用这个程序,最好还是将程序的路径加入到系统环境变量中去,这样我们就可以直接运行程序[command]就可以了。方法:编辑.bash_profile,将一些常用的路径/bin ,/usr/bin,/sbin,/usr/sbin添加到环境变量。

vi ~/.bash_profile(gedit  ~/.bash_profile)

如果是:PATH=$PATH:$HOME/bin 则需要添加成如下:
PATH=$PATH:$HOME/bin:/sbin:/usr/bin:/usr/sbin

然后就可以直接执行程序了。

而海天今天碰到的“ ntsysv:command not found ”还需要多一部操作,因为是全新的centos系统,所以还没有ntsysv,需要安装,执行下列语句安装即可。

yum install ntsysv

日志信息 »

该日志于2010-12-08 17:17由 海天无影 发表在vps记录分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下转载到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

39条评论▼点击进行评论


  1. Warning: copy(/home/wwwroot/haitian/blog/avatar/c4668a51a1479f6c344c7b79636c2236.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    用VPS的多起来了不过我没弄,


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 现在vps也不算贵了~


  2. Warning: copy(/home/wwwroot/haitian/blog/avatar/e79b68291d7cca7f06d4a71c11c1607a.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    VPS 不懂这个 VPS主机倒是很贵啊


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      现在比原来好多了
      不算很贵~


  3. Warning: copy(/home/wwwroot/haitian/blog/avatar/2609da278d5471eb39a88bde90c3b4f0.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    感觉win的vps支持PHP不比linux的差啊!


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 还是有点区别的
      特别是访问量多的时候~


  4. Warning: copy(/home/wwwroot/haitian/blog/avatar/91d4b8b766d671885ca91df1529fd3db.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    感觉win的vps支持PHP不比linux的差啊!
    同感啊,确实是这样


  5. Warning: copy(/home/wwwroot/haitian/blog/avatar/271b1d7eba6592eaefe9cdc0a79b3e4b.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    vps 还真没玩过


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      相信以后vps越来越便宜
      vps也要流行的 呵呵~


  6. Warning: copy(/home/wwwroot/haitian/blog/avatar/3a6d76790a7f616507cedd378f3cabd4.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复


    装面板,管理起来就方便了


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 装面板 又要70多M内存……


  7. Warning: copy(/home/wwwroot/haitian/blog/avatar/3a7238474a6287e9e48f463695091fbb.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    过来学习一下!


  8. Warning: copy(/home/wwwroot/haitian/blog/avatar/0a2301287868347dcd1ee52245d26305.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    这个有钱才玩的起哦~


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 vps现在也不是像原来那么超贵了 呵呵~


  9. Warning: copy(/home/wwwroot/haitian/blog/avatar/0dcedda7123567217b5ce259e203a209.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    VPS啊,好遥远啊。。。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额……
      其实 我也想玩玩的呵呵~


  10. Warning: copy(/home/wwwroot/haitian/blog/avatar/a92ebe69ad03ccb002e59f1f08031183.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    VPS太贵,来看看完全自主的个人服务器吧:http://www.wendousi.com/post/171.html


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 不行 家里的adsl上行太少


  11. Warning: copy(/home/wwwroot/haitian/blog/avatar/d94967b298c3fcfed3f8e5a6c5181f42.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    多少钱的啊


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      一个月要100多吧……
      我内存是700多的
      不过有好几个网站 呵呵


  12. Warning: copy(/home/wwwroot/haitian/blog/avatar/1372951de07ec759bd864b8a97472df5.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    加加加, 找找找,找朋友, 嘿嘿 , 博主,踩踩。加加人气哈


  13. Warning: copy(/home/wwwroot/haitian/blog/avatar/e8b5fd85e83137c626f8c6eac6ad569b.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    vps说实话不怎么样。。。


  14. Warning: copy(/home/wwwroot/haitian/blog/avatar/aeac975dd070cf20c8fdb3167502e144.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    又是 服务器 。。。。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 弄的玩的~


  15. Warning: copy(/home/wwwroot/haitian/blog/avatar/8a696fb2b60f79867e39e7803303fc7a.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    越玩越深奥了啊,我演装过centos 不过基本没研究就卸载了。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我都没装过
      来呢linux都没玩过
      但听过linxu下才是对PHP支持最好的 所以就硬着头皮接触啊~


  16. Warning: copy(/home/wwwroot/haitian/blog/avatar/f627c19e5411a19613c22a8b722d4034.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    又学习了一些关于Linux的知识!


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也正在学习~


  17. Warning: copy(/home/wwwroot/haitian/blog/avatar/ceb3235f28780ecf2f4be92b50d691a9.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    不懂的飘过。。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也在学习·


  18. Warning: copy(/home/wwwroot/haitian/blog/avatar/c338dbe71bccbcc6c35befd199894fbf.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    哎。。。不懂 :sad:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也是才学习的~


  19. Warning: copy(/home/wwwroot/haitian/blog/avatar/09ca292bc5f52f27c4153e1fd4ef39bc.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    写的不错 支持下哦


  20. Warning: copy(/home/wwwroot/haitian/blog/avatar/5d4a8dc54a953b2299abfe49a2e9bb98.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    这个不太懂。vps挺难用吗?


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 是有点难用~


  21. Warning: copy(/home/wwwroot/haitian/blog/avatar/79a9e817c5e3dfd97ce5bda425a1450f.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    vps没用过哦。估计很贵啊


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/fc66e1102af1859834b79bdffeaa8a31.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      VPS用的人确实不多


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 是有点贵……


  22. Warning: copy(/home/wwwroot/haitian/blog/avatar/bf75eb60d8388dff881f5d1bf8b43bc1.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    一直想装 个centos玩玩,一直没装。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也没装过
      直接在vps上用了~


  23. Warning: copy(/home/wwwroot/haitian/blog/avatar/a3aefb0fe7b234e21048df33b142289e.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    学习下


  24. Warning: copy(/home/wwwroot/haitian/blog/avatar/48b155ec6b2ffb3bfb931eba5453ed7e.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    没用过,学习了


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 你用的 才是技术型的~


  25. Warning: copy(/home/wwwroot/haitian/blog/avatar/d4aa12519670fe291cdcfcae3aa792a4.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    现在表示压力还能承受,以后不够用再上VPS


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也是弄着玩先~


  26. Warning: copy(/home/wwwroot/haitian/blog/avatar/3bb7ab06854b38ffdd4ef870f21fdc5e.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    哥,能告诉我你给别人回复的时候,那个大大的admin是怎么弄上去的吗?


  27. Warning: copy(/home/wwwroot/haitian/blog/avatar/ec52c029d7e97ea0daaf113a05fd1bb6.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    呵呵,上次真好网也在玩VPS,海天现在也在弄!不知道VPS贵不贵?


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 比虚拟空间贵不少吧~


  28. Warning: copy(/home/wwwroot/haitian/blog/avatar/12b9ca311887d0c56ef18c36e8dd5fbd.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    你最近在忙这个啊,难怪给你发的邮件都没回复我~


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 不好意思啊 最近有点忙
      额 不过我没收到邮件啊


  29. Warning: copy(/home/wwwroot/haitian/blog/avatar/2667e3794c00b147ea9cda10b88365ae.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    linux还没了解。以后慢慢来。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也是刚接触的~


  30. Warning: copy(/home/wwwroot/haitian/blog/avatar/5e29ff2eb17b2447c034c302eff3a6e1.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    有机会我也玩下


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 学习点东西 呵呵~


  31. Warning: copy(/home/wwwroot/haitian/blog/avatar/292470327acaf74a46ef7aba164c2a79.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    ;-) VPS还没研究过,有机会再去搞一下


  32. Warning: copy(/home/wwwroot/haitian/blog/avatar/bbcf836078ebc4b6e3ace39ecd55a260.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    linux要使用经常一次而命令语句,感觉挺麻烦的


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 这到是……
      现在操作vps都是代码……


  33. Warning: copy(/home/wwwroot/haitian/blog/avatar/bf12d703481f992fb051334a04f27c7b.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    貌似最近玩VPS的很多啊,难道是风向标~ :mrgreen:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 要流行起来了~


  34. Warning: copy(/home/wwwroot/haitian/blog/avatar/06bc2d703214f45eae49453cd3252322.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    Linux对PHP的执行效率比Win会高出很多–当然也要在高负载下才表现的更明显。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也这样认为
      而且windows本身一个系统就要不少内存~


  35. Warning: copy(/home/wwwroot/haitian/blog/avatar/5b22c1d1c3d4391c7ad2681c1f03e750.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    这些东西对我来说太专业了


  36. Warning: copy(/home/wwwroot/haitian/blog/avatar/ceb3235f28780ecf2f4be92b50d691a9.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    不太懂啊,围观。


  37. Warning: copy(/home/wwwroot/haitian/blog/avatar/90397210e69d04e9a6df1ccaef487222.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    不太懂啊,围观。 :!:


  38. Warning: copy(/home/wwwroot/haitian/blog/avatar/8ea92207757857d9b13fac9968f06c43.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    好多软件安装目录都不在环境变量中
    比如/usr/share/bin
    我的习惯是把程序做个软连接过来,比较好管理 :lol:

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

« 失去了才知道美好,在一起不是谁为了谁-《史莱克4》影评 有nginx的高手吗?求助…… »