DEV Community

ckyoo
ckyoo

Posted on • Edited on

SNIPE-IT ASSET MANAGEMENT

Fresh install almalinux 9;

Connect ethernet to enp6s0 (default ethernet port)
ipv4 172.16.3.26
default rote 172.16.3.254
dns 172.16.1.3

snipe-it@phelan
Install LAMP stack on server:
first sudo dnf update -y

installed git sudo dnf install git
[APACHE]
dnf install httpd -y
systemctl start httpd && systemctl enable httpd
[MYSQL/MARIADB]
dnf install mariadb-server -y
systemctl start mariadb && systemctl enabe mariadb
perform secure install: mysql_secure_installation at root
[PHP]
dnf install -y php <...>
systemctl restart httpd

CREATE DATABASE

in root,
mysql -uroot -p

MariaDB> CREATE DATABASE snipeitdb;

MariaDB > CREATE USER snipe_user@localhost IDENTIFIED BY '[password(stn17]'

MariaDB > GRANT ALL ON snipeitdb.* to snipe_user@localhost;

MariaDB > FLUSH PRIVILEGES;

---error in chown --

1/30/25

setting the correct ownership/permission to the file

chown -R apache:apache /var/www/snipe-it
chmod -R 755 /var/www/snipe-it
Enter fullscreen mode Exit fullscreen mode
<VirtualHost *:80>
    <Directory /var/www/snipe-it/public>
        Allow From All
        AllowOverride All
        Options -Indexes
    </Directory>

    DocumentRoot /var/www/snipe-it/public
    ServerName 172.x.x.x
    # Other directives here
</VirtualHost>
Enter fullscreen mode Exit fullscreen mode

Image description

MYSQL COMMANDS TO CHECK TABLES

sudo mysql
use <table_name>;
show tables;
select * FROM <table_name>;

MIGRATE A DB TO ANOTHER DB

mysql -u root -p snipeitdb < path/of/.sql file

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more