Installing Snipe-IT on CentOS 7 and MariaDB
-
@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 ?
-
@robblehead You restore the database and then restore the files to the appropriate place. I don't have a backup in front of me but the file structure is preserved in the backup.
If you're extracting on windows don't use the builtin unzip. You need to use 7zip or another file archiver.
SnipeIT currently as far as i am aware does not have an automated restore backup feature.
-
Hi @tiagom ,
Please find the log file from the below link.
var/log/httpd/snipeIT.error.log
[Mon Nov 06 15:13:41.998634 2017] [php7:error] [pid 20711] [client 127.0.0.1:43457] PHP Fatal error: require(): Failed opening required '/var/www/html/snipeit/vendor/composer/../psy/psysh/src/Psy/functions.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/snipeit/vendor/composer/autoload_real.php on line 66 -
@tiagom Kindly assist
-
Dear All,
@JaredBusch @tiagom
Please assist me. -
@rejivincentc said in Installing Snipe-IT on CentOS 7 and MariaDB:
Hi @tiagom ,
Please find the log file from the below link.
var/log/httpd/snipeIT.error.log
[Mon Nov 06 15:13:41.998634 2017] [php7:error] [pid 20711] [client 127.0.0.1:43457] PHP Fatal error: require(): Failed opening required '/var/www/html/snipeit/vendor/composer/../psy/psysh/src/Psy/functions.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/snipeit/vendor/composer/autoload_real.php on line 66I suggest you also post your issue to...
https://github.com/snipe/snipe-it/issues
https://gitter.im/snipe/snipe-it -
@rejivincentc The install script on Fedora and CentOS works perfectly. I do not know what your problem is. You are obviously doing something abnormal.