Snipe-IT is open-source software for managing IT assets such as computers, software licences and accessories efficiently. This guide shows how to install Snipe-IT on CentOS 8, including setting up Apache, PHP, MariaDB and configuring the application.
If you run into trouble during installation or need remote technical support, contact IT Systems through our IT Helpdesk service for fast, professional help.
Update 11/2026: CentOS 8 reached end of life on 31 December 2021, and PHP 7.4 is also no longer supported. Current Snipe-IT releases require PHP 8 (see the exact requirements in the official documentation at snipe-it.readme.io). For new installations, use Rocky Linux / AlmaLinux 9 or Ubuntu LTS; the steps are similar: install Apache/Nginx, PHP 8 and its modules, MariaDB/MySQL and Composer, download Snipe-IT from GitHub, configure the .env file (APP_URL, DB_*), run composer install --no-dev and php artisan key:generate, set permissions on storage and public/uploads, and enable HTTPS. Alternatively, run Snipe-IT with its official Docker image.
Step 1: Update the server and install dependencies
Update your CentOS system:
sudo dnf -y updateInstall git and add the EPEL repository:
sudo dnf -y install epel-release vim gitStep 2: Install the Apache web server
Apache httpd will host the Snipe-IT asset management web application on CentOS 8. Install it with:
sudo dnf -y install httpdStart and enable the Apache service:
sudo systemctl start httpd.service
sudo systemctl enable httpd.serviceStep 3: Install PHP and modules
PHP is a core dependency. The original guide installs PHP 7.4 (for current Snipe-IT versions, install PHP 8 instead). The EPEL and REMI repositories are required.
a. Add the EPEL and REMI repositories
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpmb. Install PHP on CentOS 8
sudo dnf -y install dnf-utils
sudo dnf module install php:remi-7.4Accept the installation prompts.

c. Install the additional packages
sudo dnf updateAdditional PHP modules required by Snipe-IT:
sudo dnf -y install php-openssl php-pdo php-mbstring php-tokenizer php-curl php-mysql php-ldap php-zip php-fileinfo php-gd php-dom php-mcrypt php-bcmathStep 4: Install the MariaDB database server
a. Update the system
sudo dnf -y upgradeb. Add the MariaDB repository to CentOS 8
sudo tee /etc/yum.repos.d/MariaDB.repo<<EOF
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOFAfter pasting, press Enter to save the repository file, then install:
sudo dnf install boost-program-options
sudo dnf install MariaDB-server MariaDB-client --disablerepo=AppStreamc. If you get an error, run this command to set up the MariaDB repository:
![]()
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bashThen run the install command again:
sudo dnf install MariaDB-server MariaDB-client --disablerepo=AppStreamThen continue as normal:
sudo systemctl enable --now mariadbd. Secure the MariaDB server
sudo mysql_secure_installatione. Start and enable MariaDB
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.serviceStep 5: Create the Snipe-IT database
a. Log in to MariaDB:
mysql -u root -pb. Create the database and user (use your own strong password):
CREATE DATABASE snipeit;
CREATE USER 'snipeit'@'localhost' IDENTIFIED BY 'YourStrongPassword';
GRANT ALL PRIVILEGES ON snipeit.* TO 'snipeit'@'localhost';
FLUSH PRIVILEGES;
EXIT;Step 6: Install PHP Composer
Composer is the PHP package manager that provides a standard way to manage the dependencies and libraries a PHP application needs.
a. Install PHP and download Composer
sudo dnf install @php
sudo dnf -y install wget
wget https://getcomposer.org/installer -O composer-installer.phpb. Install Composer on CentOS 8
sudo php composer-installer.php --filename=composer --install-dir=/usr/local/binStep 7: Download Snipe-IT
sudo git clone https://github.com/snipe/snipe-it /var/www/html/snipeStep 8: Configure Snipe-IT
With a copy of Snipe-IT on your server, configure it. Create the .env file from the .env.example file included in the download:
cd /var/www/html/snipe
sudo cp .env.example .envEdit .env. It has many options; these are the most important for now. You can add the rest later, such as mail server settings.
sudo vim .env
APP_URL=example.com # IP address or FQDN of your Snipe-IT server
APP_TIMEZONE='Asia/Ho_Chi_Minh' # match your country/time zone
DB_DATABASE=snipeit # database created earlier
DB_USERNAME=snipeit # database user created earlier
DB_PASSWORD=YourStrongPassword # database password created earlierThen, still in the Snipe-IT folder, set the correct permissions and ownership:
sudo chown -R apache:apache storage public/uploads
sudo chmod -R 755 storage
sudo chmod -R 755 public/uploadsStep 9: Install the PHP packages with Composer
sudo /usr/local/bin/composer install --no-dev --prefer-source
Step 10: Generate the APP_KEY
sudo php artisan key:generate
Application In Production!
Do you really wish to run this command? (yes/no) [no]:
> yes
Application key [base64:...] set successfully.Step 11: Configure Apache
Allow HTTP through the firewall:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reloadGo to the Apache configuration folder and create a virtual host for Snipe-IT:
cd /etc/httpd/conf.d/
sudo vim snipeit.conf
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/html/snipe/public
<Directory /var/www/html/snipe/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Restart Apache:
sudo systemctl restart httpdStep 12: Configure SELinux
sudo yum provides /usr/sbin/semanage
sudo yum install policycoreutils-python-utilsOnce installed, go to the Snipe-IT folder and run these commands as root:
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/snipe(/.*)?"
sudo restorecon -R -v /var/www/html/snipe/
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/snipe/storage(/.*)?"
sudo restorecon -RF /var/www/html/snipe/storageSELinux may stop Apache from opening outbound connections. To allow it, run as root:
sudo setsebool -P httpd_can_network_connect onThen open the server address in a browser to complete the Snipe-IT setup wizard, and enable HTTPS before using it in production.
IT Systems’ view: Snipe-IT is a good open-source option for IT asset management. For businesses that need assets linked to agent-based inventory, licences, backup health and technical evidence, IT Systems is developing ITS Manager in that direction.
See also: ITS Manager IT asset management software and IT hardware asset management.
FAQ
What assets can Snipe-IT track?
Computers, network devices, accessories, components, software licences and consumables; each item can be checked out to users with full history.
CentOS 8 is end of life. Which OS should host Snipe-IT?
Use Rocky Linux, AlmaLinux or Ubuntu Server LTS. Installing Apache or Nginx, PHP, MariaDB and Composer works the same way.
Is there a ready-to-use Snipe-IT option?
Yes. Snipe-IT offers a paid hosted service, and it can also run in Docker for faster deployment.
Need someone to run your servers, NAS and systems?
IT Systems manages servers, NAS, cloud, backup and user accounts on a schedule, with a monthly operations report.




