Installing Snipe-IT on CentOS 7 and MariaDB
-
@JaredBusch said:
Can someone provide screen shots of stuff being tracked and such? I do need to get our company assets all tracked someplace. I am always up for something more than a spreadsheet.
http://mangolassi.it/topic/6984/snipe-it-asset-management-screenshots
-
Couple questions,
- can I assume that fail2ban will work out of the box since it is just apache?
- Has anyone seen a community support channel for snipe-it? Because I have not seen one.
-
Hello Team,
i'm facing the below issue while open the http://localhost/ with my ip address
**
Error **Error in exception handler: The stream or file "/var/www/html/snipeit/app/storage/logs/log-apache2handler-2015-12-19.txt" could not be opened: failed to open stream: Permission denied in /var/www/html/snipeit/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87
Kindly let me know how to fix the issue,
Thanks Team,
Golden John S -
@golden3 said:
Hello Team,
i'm facing the below issue while open the http://localhost/ with my ip address
**
Error **Error in exception handler: The stream or file "/var/www/html/snipeit/app/storage/logs/log-apache2handler-2015-12-19.txt" could not be opened: failed to open stream: Permission denied in /var/www/html/snipeit/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87
Kindly let me know how to fix the issue,
Thanks Team,
Golden John SDid you ensure selinux was disabled?
setenforce 0
That is pretty much a standard troubleshooting step on CentOS 7. If that fixes it, then you can look into what specific thing need allowed. -
@JaredBusch This seemed to work for me. I'm extremely new to the linux world. How would one go about finding out why I need to do this every time I restart the server?
-
@hartmm90 said:
@JaredBusch This seemed to work for me. I'm extremely new to the linux world. How would one go about finding out why I need to do this every time I restart the server?
Here are the selinux info
https://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable-enforcement.html
-
@hartmm90 said:
@JaredBusch This seemed to work for me. I'm extremely new to the linux world. How would one go about finding out why I need to do this every time I restart the server?
You will want to change the context of the files instead of disabling SELinux. Most likely you will need to run
chcon -R -t httpd_sys_rw_content_t /var/www/html
Then if you type
ls -lZ
In /var/www/html/ it should show the context for each file and it should be
httpd_sys_rw_content_t
-
@hartmm90 said:
@JaredBusch This seemed to work for me. I'm extremely new to the linux world. How would one go about finding out why I need to do this every time I restart the server?
The high level reason is because whatever your setup is, it is not set up properly for SELinux. And the command being used does not change the SELinux setting but disables it temporarily. When your system reboots it turns SELinux back on since the configuration for it was not changed - it is still set to run when the system starts.
-
@scottalanmiller said:
@hartmm90 said:
@JaredBusch This seemed to work for me. I'm extremely new to the linux world. How would one go about finding out why I need to do this every time I restart the server?
The high level reason is because whatever your setup is, it is not set up properly for SELinux. And the command being used does not change the SELinux setting but disables it temporarily. When your system reboots it turns SELinux back on since the configuration for it was not changed - it is still set to run when the system starts.
Right, using
setenforce 0
is a troubleshooting step only. by using it to disable SELinux, and everything then worked, you know that you then just need to look at what the application is doing that SELinux does not like. Starting with what @johnhooks said above. Then usesetenforce 1
to turn it back on and see if it still works right. -
If installing a CentOS7 on a local VM, what base enviroment/addons are needed to have the one line installer work?
-
@subi15wrx said:
If installing a CentOS7 on a local VM, what base enviroment/addons are needed to have the one line installer work?
Good question. This was done before I had our Scale HC3 cluster with capacity to do all of our testing on vanilla OSes. It was only tested on DO, as far as I know. I'll test this on a CentOS 7 Minimal and let you know....
-
@subi15wrx and welcome to the community, by the way!!
-
@subi15wrx said:
If installing a CentOS7 on a local VM, what base enviroment/addons are needed to have the one line installer work?
All I did on a min install was add net-tools and wget.
Then followed the step by step commands as the one line command didn't work for me. In fact I've just created a new VLAN for "Misc" servers so will be re-installing Snipe very soon (today if I get time - FogServer First) -
Just ran through the one line installer and it worked.
Indeed wget is missing. So before starting you need to...
yum -y install wget
And on some CentOS 7 minimal installs there is no firewall. If that is the case for you, you should be good. If you have a firewall you will need to open port 80 like so...
firewall-cmd --zone=public --add-port=80/tcp --permanent; firewall-cmd --reload
-
In theory, this single line should do the trick:
yum -y install wget; setenforce 0 && yum -y install epel-release; 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 && cd snipeit; sed -i "s/'timezone' => '',/'timezone' => 'UTC',/" app/config/app.php; php artisan app:install; firewall-cmd --zone=public --add-port=80/tcp --permanent; firewall-cmd --reload
Assuming that you run as root.
-
I updated the command up top to add in the installation of a firewall, wget and to configure the firewall.
-
@scottalanmiller said:
I updated the command up top to add in the installation of a firewall, wget and to configure the firewall.
Will give that a go once I got Fog installed.
-
@scottalanmiller Thanks Scott got everything up and running, except I get a nasty red bar across the top of my screen "WARNING: This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the debug value app/config/production/app.php to false."
Could you point me in the right direct.
-
@subi15wrx said:
@scottalanmiller Thanks Scott got everything up and running, except I get a nasty red bar across the top of my screen "WARNING: This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the debug value app/config/production/app.php to false."
Could you point me in the right direct.
nano /var/www/html/app/config/production/app.php
Change the Disable debug mode line to end with false instead of true.
Save and close. Restart the webserversystemctl restart httpd
Shouldn't be all that difficult, the error message spells it out quite clearly.
-
@travisdh1 said:
@subi15wrx said:
@scottalanmiller Thanks Scott got everything up and running, except I get a nasty red bar across the top of my screen "WARNING: This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the debug value app/config/production/app.php to false."
Could you point me in the right direct.
nano /var/www/html/app/config/production/app.php
Change the Disable debug mode line to end with false instead of true.
Save and close. Restart the webserversystemctl restart httpd
Shouldn't be all that difficult, the error message spells it out quite clearly.
nano
is not installed in a minimal setup by default. he will have to either usevi
or install nano firstyum -y install nano