VPSã§é㶠-ãã®ï¼ ServersMançã®OpenVZç³»VPSã§ã¯ /etc/init/ssh.confå ã® oom never ã¯çµ¶å¯¾ã«ç¡å¹ã«ãã¦ãããã¨ï¼ï¼ï¼æå¹ã«ããããã³ã¡ã³ãã¢ã¦ããå¤ãããããã¨ãªã¯ã¿ï¼¼(^o^)ï¼ç¶æ ã«ãªããï¼
çæ§ãä¹ ãã¶ãã§ããæ¬æ¥ã¯æ³¨æåèµ·ã®å°ãã¿ã
å æ¥ServersMan VPS ã®Ubuntuåãaptitude upgrade ããæã«ããã£ã¦ãã¾ã£ãå°ãã¿ã§ãã
ServersMançã®OpenVZç³»VPSã®Ubuntu(確èªããã®ã¯10.04ï¼ã§ã¯
/etc/init/ssh.confå
ã® oom neverãæå¹ã«ããã¨ãupstartã§ssh-serverãéå§åºæ¥ãå¤ããsshã§ç¹ãããªããªã¯ã¿ï¼¼(^o^)ï¼é¯ãã§ããããã¾ãã
決ãã¦aptitude upgrade㧠/etc/init/ssh.confãå ¥ãæ¿ããªãããã«ã
å ¥ãæ¿ããã¨ãããªã oom never è¡ãæå¹ã®/etc/init/ssh.confãè¨ç½®ãããssh端æ«ãéããç¬éããäºåº¦ã¨ç¹ãããªããªãã¾ãã(aptitude éä¸ã§serviceã®èªååèµ·åãèµ°ãå°é·è¨å®ãã¡ã¤ã«ãèªã¿è¾¼ã¾ããããï¼
ssh(openssh-server)ã®aptitude upgradeéä¸ã«è¨å®ãã¡ã¤ã«å
¥ãæ¿ãããããããã[y/N] ã¿ãããªè³ªåãåºã¾ãã
ããã®ããã©ã«ãé¸æè¢ã¯Nãªã®ã§ãã y ã«ããã¨ãããªãå°é·ãä»è¾¼ã¾ãã¾ãããæ°ãã¤ããã ããã
NG ãªã¯ã¿ï¼¼(^o^)ï¼é¯ã®ä¾
/etc/init/ssh.confoom neverãæå¹ã§ããã®ç¶æ ã§ç«¯æ«ãéããã¨ãããªãsshã§ç¹ãããªããªãã¾ãã
sshæ¥ç¶NGã®ä¾ï¼
# ssh - OpenBSD Secure Shell server # # The OpenSSH server provides secure shell access to the system. description "OpenSSH server" start on filesystem stop on runlevel S respawn respawn limit 10 5 umask 022 # replaces SSHD_OOM_ADJUST in /etc/default/ssh oom never #<<<<<-----ã³ã¬ãçãã¦ãã¨çµäºã®ãç¥ãã pre-start script test -x /usr/sbin/sshd || { stop; exit 0; } test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; } test -c /dev/null || { stop; exit 0; } mkdir -p -m0755 /var/run/sshd end script # if you used to set SSHD_OPTS in /etc/default/ssh, you can change the # 'exec' line here instead exec /usr/sbin/sshd -D
OK ã¤ã³ã¹ã³ç´å¾ã®/etc/init/ssh.conf
/etc/init/ssh.confããããªã oom never ã¯ã³ã¡ã³ãã¢ã¦ãããã¦ã¾ãã
sshæ¥ç¶OKã®ä¾ï¼
# ssh - OpenBSD Secure Shell server # # The OpenSSH server provides secure shell access to the system. description "OpenSSH server" start on filesystem stop on runlevel S expect fork respawn respawn limit 10 5 umask 022 # replaces SSHD_OOM_ADJUST in /etc/default/ssh #oom never pre-start script test -x /usr/sbin/sshd || { stop; exit 0; } test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; } test -c /dev/null || { stop; exit 0; } mkdir -p -m0755 /var/run/sshd end script # if you used to set SSHD_OPTS in /etc/default/ssh, you can change the # 'exec' line here instead exec /usr/sbin/sshd
åèï¼
"oom never" makes ssh upstart job fail to start in OpenVZ container
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/634900
åè2ï¼ Upstart issues
http://linux-vserver.org/Upstart_issues
Init procedure doesn't complete
SSHIf you've completed all above steps and some init scripts doesn't get invoked at all (most notably old SYSV init scripts) you might have encountered same error that I did. In Lucid guest I had to comment out following line in /etc/init/ssh.conf:
# replaces SSHD_OOM_ADJUST in /etc/default/ssh
oom neverto
# replaces SSHD_OOM_ADJUST in /etc/default/ssh
#oom neverAfter commenting out this line initialization completed successfully.
ãã¼ç§ã¯ããããã¦ãã¾ãã¾ãããæ°æ§ã§æ´æ°å¾ã«é¯ä¸å°ç¨ããã¯ã¢ããããåã¤ã³ã¹ã³ãã¾ãããã注æããã
ã§ã¯ã§ã¯ï¼