ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Installing Snipe-IT on CentOS 7 and MariaDB

    IT Discussion
    how to snipe-it centos linux centos 7 centos 7.1
    37
    290
    2.9m
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • hobbit666H
      hobbit666 @DustinB3403
      last edited by

      @dustinb3403 Yes but got errors during it which confused me as to what method I used in the first place to install it.

      DustinB3403D 1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403 @hobbit666
        last edited by

        @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?

        hobbit666H 1 Reply Last reply Reply Quote 0
        • hobbit666H
          hobbit666 @DustinB3403
          last edited by

          @dustinb3403 Not yet that's my next step is to try again and then talk to the Dev's

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @hobbit666
            last edited by

            @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.

            1 Reply Last reply Reply Quote 2
            • hobbit666H
              hobbit666
              last edited by

              Running V4 now.
              Not sure what I did different to the first 2 times I tried but works now

              1 Reply Last reply Reply Quote 1
              • RobbleheadR
                Robblehead
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • RomoR
                  Romo
                  last edited by Romo

                  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.

                  RobbleheadR 1 Reply Last reply Reply Quote 2
                  • larsen161L
                    larsen161 @Alex Sage
                    last edited by

                    @aaronstuder does anything replace this step in v4 or it's just no longer needed?

                    1 Reply Last reply Reply Quote 0
                    • larsen161L
                      larsen161
                      last edited by

                      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?

                      DustinB3403D black3dynamiteB 2 Replies Last reply Reply Quote 0
                      • DustinB3403D
                        DustinB3403 @larsen161
                        last edited by

                        @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).

                        1 Reply Last reply Reply Quote 0
                        • black3dynamiteB
                          black3dynamite @larsen161
                          last edited by

                          @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 to APP_URL=https://snipeit.domain.com

                          https://snipe-it.readme.io/docs/configuration

                          1 Reply Last reply Reply Quote 0
                          • RobbleheadR
                            Robblehead @Romo
                            last edited by

                            @romo Worked first time. The -u apache was what I was missing in my code.

                            1 Reply Last reply Reply Quote 0
                            • RobbleheadR
                              Robblehead
                              last edited by

                              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?

                              T 1 Reply Last reply Reply Quote 0
                              • rejivincentcR
                                rejivincentc @JaredBusch
                                last edited by

                                @jaredbusch

                                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.sh

                                0_1509522239425_Capture.PNG

                                nano /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

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  tiagom @rejivincentc
                                  last edited by

                                  @rejivincentc

                                  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 ?

                                  rejivincentcR 1 Reply Last reply Reply Quote 1
                                  • T
                                    tiagom @Robblehead
                                    last edited by

                                    @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.

                                    1 Reply Last reply Reply Quote 1
                                    • rejivincentcR
                                      rejivincentc @tiagom
                                      last edited by

                                      Hi @tiagom ,

                                      Please find the log file from the below link.

                                      https://wetransfer.com/downloads/8ca0b75bf502b5baa4e8c595acda438e20171106130805/86ba914f3d2e2896463766880230c1c520171106130805/f09704

                                      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

                                      rejivincentcR black3dynamiteB 2 Replies Last reply Reply Quote 1
                                      • rejivincentcR
                                        rejivincentc @rejivincentc
                                        last edited by

                                        @tiagom Kindly assist

                                        rejivincentcR 1 Reply Last reply Reply Quote 0
                                        • rejivincentcR
                                          rejivincentc @rejivincentc
                                          last edited by

                                          Dear All,
                                          @JaredBusch @tiagom
                                          Please assist me. 😞

                                          1 Reply Last reply Reply Quote 0
                                          • black3dynamiteB
                                            black3dynamite @rejivincentc
                                            last edited by

                                            @rejivincentc said in Installing Snipe-IT on CentOS 7 and MariaDB:

                                            Hi @tiagom ,

                                            Please find the log file from the below link.

                                            https://wetransfer.com/downloads/8ca0b75bf502b5baa4e8c595acda438e20171106130805/86ba914f3d2e2896463766880230c1c520171106130805/f09704

                                            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

                                            I suggest you also post your issue to...
                                            https://github.com/snipe/snipe-it/issues
                                            https://gitter.im/snipe/snipe-it

                                            rejivincentcR 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 14
                                            • 15
                                            • 4 / 15
                                            • First post
                                              Last post