Installation on FreeBSD 12.2 #9123
VersusBG
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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