How to update

Discussion in 'Installation/Configuration' started by DrMartinus, Aug 28, 2019.

Tags:
  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hi,

    I know it is described, and it should be very simple, but whenever I enter the command
    Code:
    ispconfig_update.sh
    
    I get the message
    Code:
    command not found
    
    I have to change to /usr/local/bin in order to issue the command. How can I make sure that the command runs from any place? Or should it always be run from within /usr/local/bin? Then this should be part of the tutorial (https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/).
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You don't have to be in any special directory as its in the search path. so no matter in which directory you are, just type
    ispconfig_update.sh. If that's not possible e.g. because you removed the script or your server is not installed properly, then you can use this procedure:

    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.14p2.tar.gz
    tar xvfz ISPConfig-3.1.14p2.tar.gz
    cd ispconfig3_install/install
    php -q update.php
     
    Richard Foley likes this.
  3. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Thanks, the update worked fine. But how can I get the script back in the search path???
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The script is in /usr/local/bin/ and this folder is normally in the search path. Check if the script is there. If that's the case and it is still not found when you try to run it without using the full path, then you probably altered the PATH variable of your root user to not contain /usr/local/bin/
     
  5. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I checked, the script is there, but I can only execute it from within the folder using
    Code:
    ./ispconfig_update.sh
    Sorry for the following question, but I tend to forget the simple things: how would I check the PATH variable and how do I add the path /usr/local/bin?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You can execute the command from anywhere using full pathname, like so:
    Code:
    /usr/local/bin//ispconfig_update.sh
    
    Code:
    # echo $PATH
    Since I do not know what operating system is involved, I can not give exact advice. Also, I do not know what shell that root user is using. But I would say /usr/local/bin was originally in PATH, so it must have been removed after installation. Try finding out what shell root uses by
    Code:
    echo $SHELL
    Assuming shell is bash, you could try your luck with following commands. Otherwise, adapt to the shell you are using.
    Code:
    # cd  ; grep PATH .bashrc .profile
    If PATH is not set there, try
    Code:
    # ls -lh   /etc/bash.bashrc /etc/profile /etc/profile.d/*
    to see what files you have and examine if PATH is set there.
    If you have forgotten this kind of knowledge about Unix and Linux, get a good book or website as reference material. I learned my Unix and Linux from Sobells "Practical Guide to Unix" and "Practical Guide to Linux".
     
  7. DrMartinus

    DrMartinus Member HowtoForge Supporter

    With the double slash?

    ok, /usr/local/bin is not part of it.

    That would be CentOS 7.6, shell is running bash.
    the file .profile isn't found.
    There is /etc/bashrc, the file /etc/profile seems to be the same or at least similar, but I can't tell if the PATH is set there. It checks the path, and it executes some "pathmunge" command, but I'm not sure if that has any effect.
    Thanks for the hint. We have just moved and are still sitting between boxes and stuff, so my mind is probably not really set for this right now. It takes a little time to get into it again (and the Linux guide will be on my desk).
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    With or without. It does not matter.
     

Share This Page