Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

CentOS su Amazon EC2 e avvio dei servizi

Luca Dell'Oca, November 29, 2010December 4, 2016

Per la serie: non si smette mai di imparare!

Utilizzo da qualche tempo su amazon le virtual machines CentOS 5.4 prefatte di Rightscale, sono ottime e ben configurate. Qualche giorno fa mi chiama un cliente che ha impallato una macchina a causa del processore. Decidiamo quindi di riavviarla, e dopo aver dato il comando rientro nel sistema a verificare il tutto.

Con mia grande sorpresa, nessuno dei servizi lamp che avevo impostato per l’autostart era risalito!!! Postfix, apache, mysql, tutti in stato inattivo. Ovviamente, per prima cosa controllo con chkconfig:

httpd              0:off    1:off    2:on    3:on    4:on    5:on    6:off
mysqld             0:off    1:off    2:on    3:on    4:on    5:on    6:off
postfix            0:off    1:off    2:on    3:on    4:on    5:on    6:off

come si vede, sembrerebbe tutto ok, a runlevel 3 e 5, i due classici modi di avvio di CentOS tutto è su ON. Peccato che invocando la visualizzazione del runlevel attuale, scopro che le AMI Rightscale girano sul 4!!!! Il livello 4 è un custom level che può essere usato per configurazioni di boot particolari, e molto probabilmente rightscale l’ha fatto per questo motivo.

Quindi, il classico comando che davo su tutti i miei server CentOS:

chkconfig --level 235 pure-ftpd on

va modificato in

chkconfig --level 2345 pure-ftpd on

Per andare a recuperare i servizi messi on a runlevel 3 ma ai quali manca il 4, possiamo trovarli con:

chkconfig --list | grep -i 3:on | grep -i 4:off

Avremo una lista dei servizi da attivare poi a runlevel 4.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tecnologia amazonchkconfigec2runlevel

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy