mkdir /usr/local/fdfs
cp /usr/bin/stop.sh /usr/local/fdfs
cp /usr/bin/restart.sh /usr/local/fdfs
备份/etc/init.d/fdfs_trackerd
备份/etc/init.d/fdfs_storaged
修改/etc/init.d/fdfs_trackerd
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
PRG=/usr/bin/fdfs_trackerd
if [ ! -f /usr/local/fdfs/stop.sh ]; then
echo "file /usr/local/fdfs/stop.sh does not exist!"
exit 2
fi
if [ ! -f /usr/local/fdfs/restart.sh ]; then
echo "file /usr/local/fdfs/restart.sh does not exist!"
exit 2
stop() {
/usr/local/fdfs/stop.sh $CMD
RETVAL=$?
return $RETVAL
}
restart() {
/usr/local/fdfs/restart.sh $CMD &
}
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
修改/etc/init.d/fdfs_storaged
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
PRG=/usr/bin/fdfs_storaged
if [ ! -f /usr/local/fdfs/stop.sh ]; then
echo "file /usr/local/fdfs/stop.sh does not exist!"
exit 2
fi
if [ ! -f /usr/local/fdfs/restart.sh ]; then
echo "file /usr/local/fdfs/restart.sh does not exist!"
exit 2
stop() {
/usr/local/fdfs/stop.sh $CMD
RETVAL=$?
return $RETVAL
}
restart() {
/usr/local/fdfs/restart.sh $CMD &
}
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
chkconfig --add fdfs_trackerd
chkconfig --add fdfs_storaged
mkdir /usr/local/nginx/logs
修改/usr/local/nginx/conf/nginx.conf
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
pid /usr/local/nginx/logs/nginx.pid;
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
vim /lib/systemd/system/nginx.service
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s quit
PrivateTmp=true
[Install]
WantedBy=multi-user.target
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
网友评论