Ubuntu Server 16.04.1 LTS e MongoDB não funcionam

0

Eu instalei o Ubuntu Server 16.04.1 LTS e tenho tido problemas nos últimos 5 dias. Um dos problemas é este após inserir este comando: mongo

Server has startup warnings:
2016-12-19T08:40:14.039-0800 I STORAGE  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-19T08:40:15.984-0800 I CONTROL  [initandlisten]

Sou novo no Ubuntu e espero uma solução passo a passo

    
por mwall90278 20.12.2016 / 06:30

1 resposta

0

Você tem dois problemas para resolver:

  1. Você não configurou os recursos de segurança no seu mongodb :

    • Siga as etapas oficiais para fazer isso aqui
  2. Desativar páginas enormes e transparentes (THP):

    • existem duas opções aqui , veja a segunda resposta, mas se a resposta aceita funciona bem para você:

      • adicionando o seguinte ao arquivo /etc/rc.local antes da sair 0

        if test -f /sys/kernel/mm/transparent_hugepage/khugepaged/defrag; then
        echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
        fi
        if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
          echo never > /sys/kernel/mm/transparent_hugepage/defrag
        fi
        if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
          echo never > /sys/kernel/mm/transparent_hugepage/enabled
        fi
        
      • edite /etc/default/grub :

        • acrescentar transparent_hugepage=never a GRUB_CMDLINE_LINUX_DEFAULT then
        • executar update-grub

Fontes:

Como eu modifico "/ sys / kernel / mm / transparent_hugepage / enabled "

link

link

    
por George Udosen 20.12.2016 / 08:36