How to upgrade Snipe-IT on CentOS 7 that did not use git


  • Service Provider

    If you installed Snipe-IT on CentOS 7 with the install.sh script as recommended on their website prior to July 13, 2017, then your install did not use git to pull the code down.

    This makes it quite a bit more annoying to update than if you used git.

    Here is a quick little guide on how to get your system switched to using git.

    git clone https://github.com/snipe/snipe-it temp
    rm -rf /var/www/html/snipeit/.git*
    mv temp/.git* /var/www/html/snipeit/
    rm -rf temp/
    cd /var/www/html/snipeit/
    git reset --hard origin/master
    git pull --force
    chown -R apache:apache /var/www/html/snipeit/
    

    Now that the code is updated, you need to run these commands as the apache user. This is normal for all upgrades and is in their guide.
    https://snipe-it.readme.io/docs/upgrading

    sudo -u apache php composer.phar install --no-dev --prefer-source
    sudo -u apache php composer.phar dump-autoload
    sudo -u apache php artisan migrate
    sudo -u apache php artisan config:clear
    sudo -u apache php artisan config:cache
    

    Before: 0_1500062315635_0d32ada8-23b6-4d03-961a-ff5db4513e85-image.png

    After: 0_1500062327800_1116557d-cb20-4bc0-a359-62eacbaf4a4d-image.png


  • Service Provider

    Going forward all you will ever need to do is:

    cd /var/www/html/snipeit
    git pull
    chown -R apache:apache /var/www/html/snipeit/
    sudo -u apache php composer.phar install --no-dev --prefer-source
    sudo -u apache php composer.phar dump-autoload
    sudo -u apache php artisan migrate
    sudo -u apache php artisan config:clear
    sudo -u apache php artisan config:cache
    


  • Used this process today and the update went smoothly.


  • Service Provider

    @dustinb3403 said in How to upgrade Snipe-IT on CentOS 7 that did not use git:

    Used this process today and the update went smoothly.

    I hope so. I never post instructions that I have not done twice.

    Once to write the instructions. then once following the instructions.


Log in to reply
 

Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.