7

पर एनपीएम वैश्विक इंस्टॉल पर मैं aws लोचदार beanstalk पर वैश्विक स्तर पर pm2 स्थापित करने में एक समस्या में भाग रहा हूँ। मैं स्थापित करने PM2 के लिए निम्न स्क्रिप्ट बनाया:लोचदार बीनस्टॉक

option_settings: 
    - option_name: NODE_ENV 
    value: production 
container_commands: 
    01_enable_rootaccess: 
    command: echo Defaults:root \!requiretty >> /etc/sudoers 
    02_install_imagemagic: 
    command: yum install -y ImageMagick 
    03_download_new_relic: 
    command: rpm -Uvh http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm 
    ignoreErrors: true 
    04_install_new_relic: 
    command: yum install -y newrelic-sysmond 
    ignoreErrors: true 
    05_add_license_key: 
    command: /usr/sbin/nrsysmond-config --set license_key=xxxxxxx 
    ignoreErrors: true 
    06_start_new_relic: 
    command: /etc/init.d/newrelic-sysmond start 
    ignoreErrors: true 
    07_install_pm2: 
    command: sudo /opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/npm install pm2 -g 
    ignoreErrors: true  
    08_stop_old_pm2_processes: 
    command: sudo /opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/pm2 delete all 
    ignoreErrors: true 
    09_start_pm2: 
    command: sudo /opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/pm2 startup -u ec2-user 
    ignoreErrors: true 

मैं का उपयोग कर की कोशिश की है बस 'PM2 हटा के आदेशों का 8 & 9 डाल मैं सिर्फ पाने के आदेश नहीं मिला के लिए और' PM2 स्टार्टअप '। जब मैं pm2 के लिए विशिष्ट पथ देता हूं (मैंने ec2 पर लॉग ऑन किया है और सत्यापित किया है) मुझे "पंक्ति 4: exec:: नहीं मिला" मिलता है। कोई विचार है कि मैं यहाँ क्या गलत कर रहा हूँ? आपकी सहायता के लिये पहले से ही धन्यवाद!

उत्तर

0

आपको यह सुनिश्चित करने की आवश्यकता हो सकती है कि nodejs-legacy मॉड्यूल स्थापित है। यदि pm2node नामक निष्पादन योग्य के आधार पर है, तो यह सिस्टम विफल हो जाएगा जब सिस्टम इसे वैश्विक रूप सेके रूप में स्थापित करता है क्योंकि कुछ लिनक्स सिस्टम (उबंटू, डेबियन) अक्सर करते हैं।

5

मैं एक .ebextensions/your_file_name.config फ़ाइल में एम्बेड निम्नलिखित कोड का टुकड़ा के साथ लोचदार बीनस्टॉक पर विश्व स्तर पर PM2 स्थापित करने में कामयाब रहे

container_commands: 
    01_node_symlink: 
    command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node" 
    02_npm_symlink: 
    command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/npm /bin/npm" 
    03_pm2_install: 
    command: "if [ ! -e /bin/pm2 ]; then npm install pm2 -g; fi" 
    ignoreErrors: true 
संबंधित मुद्दे