Closed ZarxAarox closed 2 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Is this a fresh CENTOS 7 server? Did you have any errors during the install script?
Edit: Testing with the install script, seems to install php 7.1 on CentOS, mine failed saying it cannot find the packages...but your issue says your php is 7.4.
This is a fresh VM CENTOS 7 server.
I updated PHP because php-pdo and php-mysqlnd wasn't installed.
Here is a php -v for you.
$ php -v PHP 7.4.30 (cli) (built: Jun 7 2022 08:38:19) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
EDIT: I have taken snapshots the whole way. through this process. So I can zip back if we need to.
What steps did you take on installing? For me this was the end of my install.sh: `* Creating Snipe-IT user.
Further up it had output:
* Installing Apache httpd, PHP, MariaDB and other requirements.
* Installing httpd
* Installing mariadb-server
* Installing git
* Installing unzip
* Installing php71u
* Installing php71u-mysqlnd
* Installing php71u-bcmath
* Installing php71u-cli
* Installing php71u-common
* Installing php71u-embedded
* Installing php71u-gd
* Installing php71u-mbstring
* Installing php71u-mcrypt
* Installing php71u-ldap
* Installing php71u-json
* Installing php71u-simplexml
* Installing php71u-process
Which clearly the php packages didn't install since my CentOS install says they were not found.
Can you post your /var/logs/snipeit-install.log
?
Ok I see in another issue someone else had a problem with the install.sh and CentOS 7. https://github.com/snipe/snipe-it/issues/10581
Ideally I would use CentOS 8 at the least. Also since CentOS is EOL as of Dec 2021, maybe you should look into Rocky or another distro.
/ ___/____ (_)___ ___ / _/_ __/
\__ \/ __ \/ / __ \/ _ \______ / / / /
___/ / / / / / /_/ / __/_____// / / /
/____/_/ /_/_/ .___/\___/ /___/ /_/
/_/
Welcome to Snipe-IT Inventory Installer for CentOS, Rocky, Fedora, Debian and Ubuntu!
The installer has detected centos version 7. Q. What is the FQDN of your server? (localhost): Setting to PFS Assets
Q. Do you want to automatically create the database user password? (y/n) Q. What do you want your snipeit user password to be?
Dependencies Resolved
Installing: git x86_64 1.8.3.1-23.el7_8 base 4.4 M Installing for dependencies: perl-Error noarch 1:0.17020-2.el7 base 32 k perl-Git noarch 1.8.3.1-23.el7_8 base 56 k perl-TermReadKey x86_64 2.30-20.el7 base 31 k
Install 1 Package (+3 Dependent packages)
Total 3.3 MB/s | 4.5 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:perl-Error-0.17020-2.el7.noarch 1/4
Installing : perl-TermReadKey-2.30-20.el7.x86_64 2/4
Installing : perl-Git-1.8.3.1-23.el7_8.noarch 3/4
Installing : git-1.8.3.1-23.el7_8.x86_64 4/4
Verifying : git-1.8.3.1-23.el7_8.x86_64 1/4
Verifying : 1:perl-Error-0.17020-2.el7.noarch 2/4
Verifying : perl-Git-1.8.3.1-23.el7_8.noarch 3/4
Verifying : perl-TermReadKey-2.30-20.el7.x86_64 4/4
Installed: git.x86_64 0:1.8.3.1-23.el7_8
Dependency Installed:
perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-23.el7_8
perl-TermReadKey.x86_64 0:2.30-20.el7
Complete!
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.
Enter current password for root (enter for none): OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.
Set root password? [Y/n] New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.
Remove anonymous users? [Y/n] ... Success!
Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] ... Success!
By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
Remove test database and access to it? [Y/n] - Dropping test database... ... Success!
Reloading the privilege tables will ensure that all changes made so far will take effect immediately.
Reload privilege tables now? [Y/n] ... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB installation should now be secure.
Thanks for using MariaDB!
Composer (version 2.3.7) successfully installed to: /home/snipeitapp/composer.phar Use it: php composer.phar
Running composer. Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
To enable extensions, verify that they are enabled in your .ini files:
php --ini
in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-pdo --ignore-platform-req=ext-simplexml --ignore-platform-req=ext-dom --ignore-platform-req=ext-dom --ignore-platform-req=ext-dom --ignore-platform-req=ext-sodium --ignore-platform-req=ext-dom --ignore-platform-req=ext-dom --ignore-platform-req=ext-zip --ignore-platform-req=ext-simplexml --ignore-platform-req=ext-bcmath --ignore-platform-req=ext-dom
to temporarily ignore these required extensions.
chgrp: cannot access ‘/var/www/html/snipeit/vendor’: No such file or directory
Above is my snipe-it install logs.
Let me know if you need anything else.
I had to change a few things from this in the httpd like my Server Name
Ok I see in another issue someone else had a problem with the install.sh and CentOS 7. #10581
Ideally I would use CentOS 8 at the least. Also since CentOS is EOL as of Dec 2021, maybe you should look into Rocky or another distro.
Any recommendations? I am not opposed to switching OS/Distros
I use ubuntu personally.
The install.sh script does not support CentOS Stream 9 apparently. Checking others.
Going with Ubuntu Server 22.04.
Let's see if that changes how this installation goes.
I should just throw the image on an VM: Then install SNIPEIT through the website and it should work? (In theory)
Let me know.
Thanks,
Yea any version of CentOS over 7 doesn't appear to be supported in the install script and if it was it would still install these packages that don't exist apprently.
I would fresh install Ubuntu, install updates, and then do the install script. OF course you can manually install apache/php/mysql and setup that way too.
I'll give it a whirl and let yall know. But it will more than likely be tomorrow before I have an update! Thanks for the ideas
Okay, I am back. But with a slightly different issue. Ubuntu 22.04 Ran through the server setup. I got through everything when I tried to get to PreFlight Check I got an Internal Server 500 error. Turned on De-Bugging And here is what it says. I gave permissions to the storage, reloaded apache2 and no change. Any thoughts?
The stream or file "/var/www/html/snipeit/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: UnexpectedValueException: The stream or file "/var/www/html/snipeit/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: UnexpectedValueException: The stream or file "/var/www/html/snipeit/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: Your APP_URL in your .env is misconfigured - it is: 192.168.136.132. Many things will work strangely unless you fix it. in /var/www/html/snipeit/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146
Stack trace:
Stack trace:
What is your APP_URL exactly in .env? What permissions did you set on the storage folder? This was the install script right?
APP_URL is: 192.168.136.132 I ran: sudo Chmod $775 /Path/ Yes I used the install.sh
APP_URL should be like APP_URL=http://192.168.136.132
I changed the APP_URL and it did take away the error for: _Permission denied The exception occurred while attempting to log: Your APPURL in your .env is misconfigured - it is: 192.168.136.132. Many things will work strangely unless you fix it. in /var/www/html/snipeit/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146
However, everything else changes.
I am looking back at my logs and it looked like I didn't change the permissions on the path. I get an error that chown: cannot access the path.
How do I change the permissions to the path? EDIT: I can't even make this change with super user/Root.
I tested the installer on a fresh Ubuntu 22.04 and I have a permission issue as well.
try this:
sudo chown -R www-data:www-data /var/www/html/snipeit
Looks like that worked!
This is the only/new error
Unsupported cipher or incorrect key length. Supported ciphers are: aes-128-cbc, aes-256-cbc, aes-128-gcm, aes-256-gcm.
EDIT: I found how to fix this on my own. I had to run: php artisan key:generate
THANK YOU FOR YOUR SUPPORT!
So just to make it very straight forward.
I installed Ubuntu 22.04 Created a user and gave it permissions to the sudo group configured the firewall (ufw) Installed Apache2 Configured the firewall more (ufw) Installed MySQL Installed PHP Ran the install.sh (This did all the work for me) Configured my apache file configured my .env Needed help with finer details: APP_URL Permissions to the Web Folder
That's all I had to do to get this installed! Hope it helps others.
Glad to hear you're all sorted! In the future, if you've resolved your issue, please try to remember to close your ticket - it helps us out a lot. (We have to manage a lot of tickets.)
Debug mode
Describe the bug
I should be landing on the pre-flight checks page, however, instead I just get a blank white screen. No errors. Debugger doesn't bring anything up. Just Blank white.
I have double checked my httpd, env, config files Everything looks right.
I am using CENTOS 7, Apache, MariaDB, PHP v7.4.30
$ php -m
[PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl zip zlib
[Zend Modules]
Reproduction steps
...
Expected behavior
when I go to http://myserver to get the pre-flight check
Screenshots
No response
Snipe-IT Version
6.0.5
Operating System
CENTOS 7
Web Server
Apache
PHP Version
7.4
Operating System
CENTOS 7
Browser
FireFox
Version
91.10.0esr
Device
PC
Operating System
CENTOS
Browser
No response
Version
No response
Error messages
Additional context
Fresh install
CENTOS 7
install.sh
Only error I got along the way was my appache server wasn't setup right and my smtp information was wrong in the .env
I have not touched the database manually