« ubuntu关机重启命令介绍 (转) Liunx 安装 Memcache »

ubuntu下开机自动运行

  • 分类: Ubuntu
  • 评论:0
  • 浏览:246

简单的处理开机自运行的方法是修改rc.local文件。

此文件位于/etc目录下面. 在默认情况下,

rc.local是一个空的脚。您只要修改它就可以了。

自动启动 memcached
自动挂载虚拟机主机共享盘

例如:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/memcached -d -m 200 -u root -p 11211 -P /opt/config/memcached.pid
mount -t vboxsf sharp /mnt/shard

exit 0


 


本文首发于 炽(MyChy)个人主页 ,本文地址: http://www.jeanwen.com/blog/page/140

相关文章  

关于精彩评论  

发表评论
发送中发表评论中......