This tutorial outlines the steps for installing OCS Inventory NG on NixOS Latest. OCS Inventory NG is a free and open-source computer and software inventory system.
Before proceeding with the installation, you need to ensure that your NixOS Latest system is up-to-date and that the following packages are installed:
git
nginx
php
git clone --depth 1 https://github.com/OCSInventory-NG/OCSInventory-ocsreports.git
nginx
directorymv OCSInventory-ocsreports /var/www/ocsinventory
ocsinventory
folder to www-data
chown www-data:www-data /var/www/ocsinventory -R
nginx
for OCS Inventory NG by creating a new server blocknano /etc/nginx/sites-available/ocsinventory.conf
server {
listen 80;
server_name inventory.localhost;
root /var/www/ocsinventory/ocsreports;
access_log /var/log/nginx/access.OCS.log;
error_log /var/log/nginx/error.OCS.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(php)$ {
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Save and exit the file.
Create a symbolic link to enable the new server block configuration.
ln -s /etc/nginx/sites-available/ocsinventory.conf /etc/nginx/sites-enabled/ocsinventory.conf
nginx
systemctl restart nginx.service
php-fpm
systemctl start php-fpm.service
http://inventory.localhost
in your web browser to access OCS Inventory NG.Congratulations! You have successfully installed OCS Inventory NG on your NixOS Latest system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!