You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is clean install of FreeBSD 12.2-RELEASE. The guide is using packages to speed up the installation proccess but if you are using ports you can build all needed php extension by installing meta-port php74-extension and select required extensions there. Before installation you need to have a working DNS registration of your host with A or CNAME record resolving snipe-it.example.com to the ip address of your server.(replace example.com with your real domain name)
All commands are executed as root except the installation of composer which is installed with unprivileged user.
Installation of all required software and runtime dependencies
In additional of official required PHP extensions you need php74-posix, php74-xmlreader, php74-xmlwriter required by some of the functions in upgrade.php file and during installation of composer
Default mysql socket file in /usr/local/etc/mysql/my.cnf is set to /var/run/mysql/ and the mysql deamon is running under mysql user so this user need to have write permission to /var/run/mysql in order to create the socket file. In the past this socket was in /tmp which was globaly writable. Installation of mariadb via packages doesn't change the correct permissions of /var/run/mysql
sysrc mysql_enable=YES
chown mysql /var/run/mysql
service mysql-server start
mysql_secure_installation
Creating the database and user
mysql -u root -p
CREATE DATABASE snipeit;
CREATE USER snipe_user;
GRANT ALL ON snipeit.* TO 'snipe_user'@'localhost' IDENTIFIED BY 'P@ssw0rd';
\q
Edit /usr/local/etc/apache24/httpd.conf
#uncomment mod_rewrite.so
ee /usr/local/etc/apache24/httpd.conf
Change the owner of /usr/local/www/apache24/data/snipeit to unprivileged user in this example i will use "user" then log in with that "user" and install composer. It's not recomended to use root for installation of composer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Installation of Snipe-IT on FreeBSD 12.2
Here is short guide for Snipe-IT / Apache24 / PHP74 / MariaDB
First read the main documentation from
https://snipe-it.readme.io/docs
This is clean install of FreeBSD 12.2-RELEASE. The guide is using packages to speed up the installation proccess but if you are using ports you can build all needed php extension by installing meta-port php74-extension and select required extensions there. Before installation you need to have a working DNS registration of your host with A or CNAME record resolving snipe-it.example.com to the ip address of your server.(replace example.com with your real domain name)
All commands are executed as root except the installation of composer which is installed with unprivileged user.
Installation of all required software and runtime dependencies
#git, apache, curl, MySQL/MariaDB, unzip
#php74, mod_php, PHP Extensions
In additional of official required PHP extensions you need php74-posix, php74-xmlreader, php74-xmlwriter required by some of the functions in upgrade.php file and during installation of composer
MariaDB
Default mysql socket file in /usr/local/etc/mysql/my.cnf is set to /var/run/mysql/ and the mysql deamon is running under mysql user so this user need to have write permission to /var/run/mysql in order to create the socket file. In the past this socket was in /tmp which was globaly writable. Installation of mariadb via packages doesn't change the correct permissions of /var/run/mysql
Creating the database and user
Edit /usr/local/etc/apache24/httpd.conf
#uncomment mod_rewrite.so
ee /usr/local/etc/apache24/httpd.conf
Create /usr/local/etc/apache24/Includes/php.conf
ee /usr/local/etc/apache24/Includes/php.conf
Create VirtalHost config file /usr/local/etc/apache24/Includes/snipeit.conf
Note: instead of having dir_module in your VirtualHost config you can edit httpd.conf DirectoryIndex and include index.php there.
ee /usr/local/etc/apache24/Includes/snipeit.conf
copy php.ini and edit the timezone and if you need bigger file upload edit 'post_max_size'
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
ee /usr/local/etc/php.ini
https://www.php.net/manual/en/timezones.php
enable apache24 and start it
Download Snipe-IT using git and set the permissions
Change the owner of /usr/local/www/apache24/data/snipeit to unprivileged user in this example i will use "user" then log in with that "user" and install composer. It's not recomended to use root for installation of composer.
log in as unprivileged "user" and install composer
log in back to root and change again the owner of the snipeit to www so the apache can access it
Copy the configuration file and edit it.
#Edit .env according https://snipe-it.readme.io/docs/configuration
#FreeBSD mysqldump path is different so set DB_DUMP_PATH correctly
ee /usr/local/www/apache24/data/snipeit/.env
generate the APP_KEY
Set up the artisan scheduler into crontab
navigate to http://snipe-it.example.com and finish the installation.
Beta Was this translation helpful? Give feedback.
All reactions