OCS Inventory NG is a free and open-source inventory and asset tracking software used for automatic inventory and software deployment. In this tutorial, we will guide you on how to install OCS Inventory NG on the latest version of Clear Linux.
OCS Inventory NG requires an Apache web server to function. To install Apache web server on Clear Linux, run the following command:
sudo swupd bundle-add apache
Next, we need to install PHP and PHP modules to run OCS Inventory NG on Clear Linux. Run the following command to install PHP and required PHP modules:
sudo swupd bundle-add php-basic php-apache
OCS Inventory NG stores its data in a database. Hence, we need to install MariaDB on Clear Linux to create a database for OCS Inventory NG. Run the following command to install MariaDB:
sudo swupd bundle-add mariadb-server
Once you have installed MariaDB, we will create a new database for OCS Inventory NG. Connect to the MariaDB server using the following command:
sudo mysql -u root -p
Enter the MariaDB root password when prompted. Then, create a new database for OCS Inventory NG using the following command:
CREATE DATABASE ocsweb;
Next, create a new user and grant privileges to the newly created database using the following commands:
CREATE USER 'ocsuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON ocsweb.* TO 'ocsuser'@'localhost';
FLUSH PRIVILEGES;
Remember to replace password
with a strong password for security reasons.
Download the latest version of OCS Inventory NG from the official website using the following command:
sudo wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.9.2/OCSNG_UNIX_SERVER_2.9.2.tar.gz
Extract the downloaded file using the following command:
sudo tar -xzf OCSNG_UNIX_SERVER_2.9.2.tar.gz
Move the extracted folder to the Apache web server's document root directory using the following command:
sudo mv ocsreports/ /var/www/htdocs/
Change the ownership of the OCS Inventory NG folder to the Apache web server user using the following command:
sudo chown -R apache:apache /var/www/htdocs/ocsreports
We need to configure OCS Inventory NG before we can use it. Copy the sample configuration file using the following command:
sudo cp /var/www/htdocs/ocsreports/ocsreports.conf.dist /var/www/htdocs/ocsreports/ocsreports.conf
Edit the configuration file using the following command:
sudo nano /var/www/htdocs/ocsreports/ocsreports.conf
Replace the database settings with the following:
define('DB_NAME', 'ocsweb');
define('DB_USER', 'ocsuser');
define('DB_PASS', 'password');
Replace password
with the password you set for the OCS user.
To start the Apache web server and MariaDB services, run the following commands:
sudo systemctl start httpd
sudo systemctl start mariadb
To ensure that these services start automatically at system boot, run the following commands:
sudo systemctl enable httpd
sudo systemctl enable mariadb
Open a web browser and navigate to http://localhost/ocsreports/
. You will see the OCS Inventory NG login page. Your OCS Inventory NG installation is now complete!
In this tutorial, we have shown you how to install OCS Inventory NG on Clear Linux. With this software installed, you can automatically inventory and track software assets within your organization. We hope you found this tutorial helpful!
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!