DEV Community

ckq
ckq

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

Top comments (0)