OCS Inventory NG is a free and open-source inventory and asset management software. It allows you to keep track of all the devices and software on your network. In this tutorial, we will walk you through the steps to install OCS Inventory NG on Arch Linux.
Before proceeding with this tutorial, make sure you have the following prerequisites:
The first step is to update your system to make sure that you have the latest packages:
sudo pacman -Syu
OCS Inventory NG requires a web server to function. In this tutorial, we will be using Apache. Install Apache using the following command:
sudo pacman -S apache
OCS Inventory NG is written in PHP. Install PHP and some PHP extensions required by OCS Inventory NG using the following command:
sudo pacman -S php php-apache php-intl php-ldap php-gd php-mcrypt php-sqlite
OCS Inventory NG requires a database to store its data. In this tutorial, we will be using MariaDB. Install MariaDB using the following command:
sudo pacman -S mariadb
Start MariaDB and set it to start automatically on system boot:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Run the following command to secure MariaDB:
sudo mysql_secure_installation
Follow the on-screen instructions to set a root password, remove anonymous users, disallow root login remotely, and remove test databases.
Create a new database and user for OCS Inventory NG:
sudo mysql -u root -p
CREATE DATABASE ocsweb;
GRANT ALL PRIVILEGES ON ocsweb.* TO 'ocsuser'@'localhost' IDENTIFIED BY 'ocspassword';
FLUSH PRIVILEGES;
EXIT;
Download the latest version of OCS Inventory NG from the official website:
cd /tmp
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.9/OCSNG_UNIX_SERVER_2.9.tar.gz
Extract the archive:
tar xzf OCSNG_UNIX_SERVER_2.9.tar.gz
cd OCSNG_UNIX_SERVER_2.9
Run the installer:
sudo sh setup.sh
Follow the on-screen instructions. When prompted for the database configuration, enter the following:
Restart Apache:
sudo systemctl restart httpd
Open your web browser and navigate to http://localhost/ocsreports
. You should see the OCS Inventory NG login page. Enter the default username (admin) and password (admin), then click the "Login" button.
Congratulations! You have successfully installed OCS Inventory NG on Arch Linux. You can now start adding devices and software to your inventory.
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!