Installing Snipe-IT on CentOS 7 and MariaDB
-
@hobbit666 said in Installing Snipe-IT on CentOS 7 and MariaDB:
@black3dynamite OK will but that on the check list when I try again tomorrow.
Snipe is currently on Version 4 and there should be nothing wrong with the installer.
Upgrading a previously install v3 to v4 is more complicated, but isntalling a clean v4 should jsut work.
-
@jaredbusch It's an upgrade from v3
-
@hobbit666 said in Installing Snipe-IT on CentOS 7 and MariaDB:
@jaredbusch It's an upgrade from v3
Did you follow the instructions that I posted 17 days ago?
-
@black3dynamite said in Installing Snipe-IT on CentOS 7 and MariaDB:
Have anyone installed Snipe-IT by using option 1 and then upgraded successfully to v4?
I did, but I was on gitter and received assistance directly from 2 of the developers there.
-
The upgrade from v3 to v4 was the most painful part, since upgrading my upgrades to keep current have been very simple.
#!/bin/bash #Should update Snipe-IT Automatically 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
-
@dustinb3403 Yes but got errors during it which confused me as to what method I used in the first place to install it.
-
@hobbit666 said in Installing Snipe-IT on CentOS 7 and MariaDB:
@dustinb3403 Yes but got errors during it which confused me as to what method I used in the first place to install it.
And did you proceed with the process of jumping onto gitter and asking for assistance there?
-
@dustinb3403 Not yet that's my next step is to try again and then talk to the Dev's
-
@hobbit666 said in Installing Snipe-IT on CentOS 7 and MariaDB:
@dustinb3403 Not yet that's my next step is to try again and then talk to the Dev's
Why keep spinning your wheels? Just jump on gitter and speak with them directly.
@tiagom is one of the people who helped me to get upgraded.
-
Running V4 now.
Not sure what I did different to the first 2 times I tried but works now -
Scratching my head trying to update from 3.6.3. @JaredBusch was super helpful in getting us up and running.
We are looking to move our VM to a new server so I installed a fresh version of 4.0.13 with the above method and its working great.
I am attempting to update the existing server so I can do a backup then restore it on the new server.
I have tried following above directions and can not do a git pull as I used the install.sh script originally. I tried doing an install.sh on top again and no luck. I tried a git clone on top as well and no change. I am still loading up to the 3.6.3 version. Gitter hasn't been super helpful so I am crossing my fingers here.
-
Do steps 1 -4 from the official guide - https://snipe-it.readme.io/docs/upgrading-to-v4. Step 3 is not required if no one else is using the app. Run the commands as the apache user (
sudo -u apache .........)
5- Follow along the first part from @JaredBusch guide to upgrade you install to use 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/
6- Run the following as apache user as @JaredBusch guide recommends.
sudo -u apache php composer.phar install --no-dev --prefer-source sudo -u apache php composer.phar dump-autoload
7- Add
APP_LOCALE=en
to your .env file.8- Double-check that your storage directory and all sub-directories are writable by apache user
9- Apply db migrations as the apache user
sudo -u apache php artisan migrate
10- Open your .env file again and change your current APP_KEY to LEGACY_APP_KEY and add a new APP_KEY= to the file. So assuming both fields are the last ones of the file, your .env file should look like this with the changes:
.... .... LEGACY_APP_KEY=thisisyourpreviouskey APP_KEY=
Save your .env file with the changes and run
sudo -u apache php artisan key:generate sudo -u apache php artisan config:clear sudo -u apache php artisan snipeit:legacy-recrypt
If you get a "Whoops" error when you try to login or refresh your Snipe-IT page, you probably forgot to clear your browser cookies. That error happens because we use a more encryption cipher to encrypt your data (including sessions), and clearing your browser should fix that.
11 - If you put the site on maintenance bring it up (
sudo -u apache php artisan up
)and go to your snipeit url. -
@aaronstuder does anything replace this step in v4 or it's just no longer needed?
-
when heading to Step 3, Create Admin User, the server defaults to an http connection. Is there anyway to configure snipe with https before getting to the setup page for the first user?
-
@larsen161 said in Installing Snipe-IT on CentOS 7 and MariaDB:
when heading to Step 3, Create Admin User, the server defaults to an http connection. Is there anyway to configure snipe with https before getting to the setup page for the first user?
I think you can modify the .env file to use https://your-ip (or installation name).
-
@larsen161 said in Installing Snipe-IT on CentOS 7 and MariaDB:
when heading to Step 3, Create Admin User, the server defaults to an http connection. Is there anyway to configure snipe with https before getting to the setup page for the first user?
In your .env config file, you would change
APP_URL=http://snipeit.domain.com
toAPP_URL=https://snipeit.domain.com
-
@romo Worked first time. The -u apache was what I was missing in my code.
-
What is the best practice for restoring backups?
It looks like exporting and importing CSV you lose some data. I am obviously not super familiar with linux but can probably figure out SSH if that is preferred method?
-
Greetings of the Day!
We installed snipe-it but the pre-flight check page is not appearing.
The below command we used to install...
setenforce 0
mkdir -p /var/www/html; cd /var/www/html/
wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh && chmod 744 install.sh && ./install.shnano /var/log/httpd/snipeIT.error.log
[Wed Nov 01 08:27:56.547689 2017] [php7:warn] [pid 9026] [client 192.168.173.175:49699] PHP Warning: require(/var/www/html/snipeit/vendor/composer/../psy/psysh/src/Psy/functions.php): failed to open stream: No such file or directory in /var/www/html/snipeit/vendor/composer/autoload_real.php on line 66 -
You don't need to run
setenforce 0 mkdir -p /var/www/html; cd /var/www/html/
The script handles selinux setup on CentOS 7.
I just tested it and successfully install on CentOS 7. Can you provide the output of /var/log/snipeit-install.log ?