Skip to content

Instantly share code, notes, and snippets.

View nukhes's full-sized avatar
🇧🇷

Pedro Henrique nukhes

🇧🇷
  • ETEC
  • BR
  • 01:49 (UTC -03:00)
View GitHub Profile
@nukhes
nukhes / lamp.sh
Last active May 24, 2025 16:24
Script para instalar a stack LAMP num Ubuntu
#!/bin/bash
echo "ESTE SCRIPT IRÁ INSTALAR O LAMP STACK NESTA MÁQUINA."
echo "Atualizando pacotes..."
sudo apt update -y && sudo apt upgrade -y
echo "Instalando Apache, MySQL, PHP e dependências..."
sudo apt install -y apache2 mysql-server php libapache2-mod-php php-mysql ufw
@nukhes
nukhes / disable_cache_and_logs.sh
Created October 5, 2024 12:47
Script that prevents writing cache and logs in a Linux environment, useful for a Raspberry Pi that uses the system on a microSD card and with eventual power losses the risk of losing data is greater if the system is writing to the card. Remember that this script may hinder future troubleshooting processes, use at your own risk.
#!/bin/bash
# Disable rsyslog (system log)
echo "Disabling rsyslog..."
systemctl stop rsyslog
systemctl disable rsyslog
# Disable journald (persistent logs)
echo "Disabling persistent logging for journald..."
sed -i 's/^#\?Storage=.*/Storage=none/' /etc/systemd/journald.conf