Установка Веб приложения и Сервера NFC
Веб приложение
mount -o loop /dev/sr0 /mnt/ -v
apt-get install lamp-server -y
cp /mnt/web/index.php /var/www/html
cp /mnt/web/logo.png /var/www/html
systemctl enable --now mariadb
mariadb -e "CREATE DATABASE webdb;"
mariadb -e "CREATE USER 'web'@'localhost' IDENTIFIED BY 'P@ssw0rd';
GRANT ALL PRIVILEGES ON webdb.* TO 'web'@'local';
"
mariadb webdb < /mnt/web/dump.sql
mariadb -e "USE webdb; SHOW TABLES;"
vim /var/www/html/index.php
$servername = "localhost";
$username = "web";
$password = "P@ssw0rd";
$dbname = "webdb";
systemctl enable --now hhtpd2.service
Сервер NFS
На HQ-SRV
apt-get install nfs-server nfs-utils -y
mkdir /raid/nfs
chmod 777 /raid/nfs
cd /etc/exports /etc/exports.back
echo "/raid/nfs 192.168.2.0/27 (rw,no_subtree_check,no_root_squash)" >> /etc/exports
systemctl enable --now nfs-server
# exportfs -vra
На HQ-CLI
mkdir /mnt/nfs
chmod -R 777 /mnt/nfs
showmount -e hq-srv
cp /etc/fstab /etc/fstab.back
echo "192.168.1.10:/raid/nfs /mnt/nfs rw.soft,_netdev 0 0 " >> /etc/fstab
mount -av
df -T