supervisor

  1. cd /etc/supervisord.d
  2. sudo touch oms-snyc-official-customer.ini
  3. [program:oms-snyc-official-customer]
  4. command=/usr/local/php/bin/php /data/web/app/oms/oms-backend/yii official-customer/import
  5. user=root
  6. numprocs=1
  7. autostart=true
  8. autorestart=true
  9. startsecs=5
  10. startretries=3
  11. priority=1
  12. stopasgroup=false
  13. killasgroup=true
  14. redirect_stderr=true
  15. stdout_logfile=/var/log/oms-snyc-official-customer.log
  16. stdout_logfile_maxbytes=2MB
  17. stdout_logfile_backups=5
  18. sudo supervisorctl
  19. > update
  20. > start oms-snyc-official-customer

生产RSA公钥私钥

  1. # 生成私钥
  2. openssl genrsa -out rsa_private_key.pem 2048
  3. # 从私钥生成公钥
  4. openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

设置开启自启动进程sysv-rc-conf

安装 sysv-rc-conf

  1. apt install sysv-rc-conf
  2. ssysv-rc-conf
  3. ## 点[x]的表示启动

image.png

ssh

  1. apt install openssh-server #安装ssh
  2. cd /etc/ssh
  3. cp sshd_config sshd_config.bak
  4. vi sshd_config
  5. ## 修改成下面的值
  6. ListenAddress 0.0.0.0
  7. PasswordAuthentication yes
  8. PermitRootLogin yes
  9. #StrictModes yes
  10. # 如果提示“sshd error: could not load host key”
  11. rm /etc/ssh/ssh*key
  12. dpkg-reconfigure openssh-server
  13. #编辑后,重启ssh
  14. service ssh restart

重启后,即可远程连接 地址 127.0.0.1 端口号 22 用户名 root 密码 *

解压tar.xz

  1. tar xvJf node-v6.10.1-linux-x64.tar.xz