How to upgrade Snipe-IT on CentOS 7 that did not use git
-
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/upgradingsudo -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:
After:
-
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.
-
@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.
-
@JaredBusch
I just tried to upgrade my snipeit version and got an errorphp artisan migrate ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > y [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale' (SQL: ALTER TABLE users CHANGE locale locale VARCHAR(10) DEFAULT 'en_US.UTF-8' COLLATE utf8_unicode_ci) [Doctrine\DBAL\Driver\PDOException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale' [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'locale'
Anyone came across such issue?
-
@ambarishrh said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
Invalid default value for 'locale'
I just updated .env and added APP_LOCALE=en executed again and it worked!
-
@ambarishrh said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
@ambarishrh said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
Invalid default value for 'locale'
I just updated .env and added APP_LOCALE=en executed again and it worked!
I never go that, it might be related to 4.
-
@jaredbusch said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
@ambarishrh said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
@ambarishrh said in How to upgrade Snipe-IT on CentOS 7 that did not use git:
Invalid default value for 'locale'
I just updated .env and added APP_LOCALE=en executed again and it worked!
I never go that, it might be related to 4.
It is step 7 of the upgrade process to version 4.
-
I have not upgraded any of my systems to 4 yet. Glad to see my supposition was correct.