Get the most out of your Centmin Mod LEMP stack
Become a Member

[Solved] Fresh install with betainstaller-latest (dmotd errors)

Discussion in 'Bug Reports' started by Nik, Feb 4, 2019.

  1. Nik

    Nik Member

    85
    5
    8
    Dec 7, 2015
    Ratings:
    +13
    Local Time:
    2:11 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 6 32bit or 64bit / CentOS 7 64bit ?
    • 7 64
    • Centmin Mod Version Installed: i.e. 123.08stable or 123.09beta01
    • 123.09 Beta
    • Nginx Version Installed: i.e. 1.15.3
    • PHP Version Installed: i.e. 5.6.37, 7.0.31, 7.1.21, 7.2.9
    • 7.3.1
    • MariaDB MySQL Version Installed: i.e. 10.0.x or 10.1.xx or 10.2.xx
    • 10.3
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2 or cmupdate command
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Code:
      
      NGINX_PAGESPEED=y
      NGINX_ZLIBCUSTOM='y'
      ORESTY_LUANGINX=n
      NGINX_XSLT='n'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_XSLT='n'
      NGXDYNAMIC_IMAGEFILTER='y'
      NGXDYNAMIC_GEOIP='y'
      NGXDYNAMIC_STREAM='y'
      NGXDYNAMIC_HEADERSMORE='y'
      NGXDYNAMIC_SETMISC='y'
      NGXDYNAMIC_ECHO='y'
      NGXDYNAMIC_SRCCACHE='y'
      NGXDYNAMIC_MEMC='y'
      NGXDYNAMIC_REDISTWO='y'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGXDYNAMIC_BROTLI='y'
      PHPMSSQL='y'
      PHP_PGO='y'
      PHP_PGO_CENTOSSIX='y'
      NGINX_DEVTOOLSETGCC='y'
      GENERAL_DEVTOOLSETGCC='y'
      CLANG='n'
      LIBRESSL_SWITCH='n'
      MARIADB_INSTALLTENTHREE='y'
      MARCH_TARGETNATIVE='n'
      LETSENCRYPT_DETECT='y'
      DISABLE_IPVSIX='y'
      ALERTEMAIL='my@email.com'
      PHPFINFO=y
      
      
    This is what I get on login (as root):


    -bash: ls: command not found
    /usr/libexec/grepconf.sh: line 5: grep: command not found
    /usr/local/bin/dmotd: line 11: date: command not found
    /usr/local/bin/dmotd: line 12: whoami: command not found
    /usr/local/bin/dmotd: line 13: uname: command not found
    /usr/local/bin/dmotd: line 14: cat: command not found
    /usr/local/bin/dmotd: line 14: sed: command not found
    /usr/local/bin/dmotd: line 15: ps: command not found
    /usr/local/bin/dmotd: line 15: wc: command not found
    /usr/local/bin/dmotd: line 16: users: command not found
    /usr/local/bin/dmotd: line 16: wc: command not found
    /usr/local/bin/dmotd: line 58: dos2unix: command not found
    /usr/local/bin/dmotd: line 61: id: command not found
    /usr/local/bin/dmotd: line 66: date: command not found
    /usr/local/bin/dmotd: line 67: [: too many arguments
    /usr/local/bin/dmotd: line 69: [: too many arguments
    /usr/local/bin/dmotd: line 76: cat: command not found
    /usr/local/bin/dmotd: line 76: cut: command not found
    /usr/local/bin/dmotd: line 83: cat: command not found
    /usr/local/bin/dmotd: line 83: awk: command not found
    /usr/local/bin/dmotd: line 84: cat: command not found
    /usr/local/bin/dmotd: line 84: awk: command not found
    /usr/local/bin/dmotd: line 85: cat: command not found
    /usr/local/bin/dmotd: line 85: awk: command not found
    /usr/local/bin/dmotd: line 88: free: command not found
    /usr/local/bin/dmotd: line 89: df: command not found
    /usr/local/bin/dmotd: line 222: id: command not found
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,277
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    4:11 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Wow.. who is your web host as most of those commands should be provided by default centos OS image out of the box and any missing would usually be installed by Centmin Mod. And generally if those commands didn't exist/were installed, you wouldn't be able to install Centmin Mod in the first place.

    what's output for these commands
    Code (Text):
    cmds='awk cat cut date df dos2unix free grep id ls ps sed uname users wc whoami'; for c in $cmds; do which $c; done; echo
    yum -q list coreutils dos2unix procps-ng gawk sed
    

    for posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,277
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    4:11 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Also output for
    Code (Text):
    echo $PATH
    
     
  4. Nik

    Nik Member

    85
    5
    8
    Dec 7, 2015
    Ratings:
    +13
    Local Time:
    2:11 AM
    This is fresh install of centminmod on Vultr. Those commands all definitely exist and centmin works just fine.
     
  5. Nik

    Nik Member

    85
    5
    8
    Dec 7, 2015
    Ratings:
    +13
    Local Time:
    2:11 AM
    Code:
    /usr/local/sbin:/usr/sbin:$PATH:/usr/local/jdk-11.0.2/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin
    
    Code:
    /bin/awk
    /bin/cat
    /bin/cut
    /bin/date
    /bin/df
    /bin/dos2unix
    /bin/free
    alias grep='grep --color=auto'
            /bin/grep
    /bin/id
    alias ls='ls --color=auto'
            /bin/ls
    /bin/ps
    /bin/sed
    /bin/uname
    /bin/users
    /bin/wc
    /bin/whoami
    
    [16:23][root@tor-v-1.ca ~]# yum -q list coreutils dos2unix procps-ng gawk sed
    Installed Packages
    coreutils.x86_64                    8.22-23.el7                         @CentOS
    dos2unix.x86_64                     6.0.3-7.el7                         @base
    gawk.x86_64                         4.0.2-4.el7_3.1                     @CentOS
    procps-ng.x86_64                    3.3.10-23.el7                       @CentOS
    sed.x86_64                          4.2.2-5.el7                         @CentOS
    
     
  6. Nik

    Nik Member

    85
    5
    8
    Dec 7, 2015
    Ratings:
    +13
    Local Time:
    2:11 AM
    Aaah... My issue totally, had some garbage in /etc/environment .... Sorry sorry :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,277
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    4:11 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Ah i see... the output you gave for commands looks good too. Just prompted me to update dmotd.sh to force/hard code $PATH just in case it was messed up $PATH, so cmupdate SSH command will update your 123.09beta01 installs
    Code (Text):
    cmupdate
    No local changes to save
    remote: Enumerating objects: 9, done.
    remote: Counting objects: 100% (9/9), done.
    remote: Compressing objects: 100% (1/1), done.
    remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0
    Unpacking objects: 100% (5/5), done.
    From https://github.com/centminmod/centminmod
       8e05bc4..20944cf  123.09beta01 -> origin/123.09beta01
    Updating 8e05bc4..20944cf
    Fast-forward
     config/motd/dmotd.sh | 8 ++++++++
     1 file changed, 8 insertions(+)
    
     
  8. Nik

    Nik Member

    85
    5
    8
    Dec 7, 2015
    Ratings:
    +13
    Local Time:
    2:11 AM
    Saw that, super quick update. Thanks.