/etc/rc.local Linux 开机自启动项 nginx php mysql redis memcache mongodb rsync iptables cornd mount monit

cat /etc/rc.local

setenforce 0
service iptables start
service crond restart

service mysql start

mount -t tmpfs -o size=256m tmpfs /mnt/tmp
\cp -r /usr/local/nginx/ssl /mnt/tmp/
/usr/local/redis/redis-server &
nginx
/usr/local/php5.3/sbin/php-fpm

/usr/local/mongodb/bin/mongod –dbpath=/usr/local/mongodb/data/ &
/usr/bin/memcached -d -m 512 -p 11211 -u root

/usr/local/redis/redis-server /usr/local/redis/redis.conf &
/usr/bin/rsync –daemon –config=/etc/rsyncd.conf &
/usr/local/bin/monit -Ic /etc/monitrc &

#lsyncd /batch/sync.lua &

#sleep 10 && /usr/local/amoeba/bin/launcher &
#sh /etc/rc.local.sh

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
ulimit -HSn 65536

———————————