Server Setup & Troubleshooting

Complete guide for server configuration, troubleshooting, and maintenance

Select Operating System:

Install GUI on Debian Server:
apt update && apt install -y task-gnome-desktop
Start GUI:
systemctl set-default graphical.target && reboot
Troubleshooting GUI:
apt install --fix-broken -y && apt autoremove -y && apt autoclean

Update Commands:
apt update && apt upgrade -y
apt dist-upgrade -y
Fix Broken Packages:
apt --fix-broken install -y
dpkg --configure -a

Install Apache:
apt install -y apache2 apache2-utils
Troubleshooting Apache:
systemctl status apache2
journalctl -u apache2 --no-pager -n 50
apache2ctl configtest
Common Error Fixes:
a2enmod rewrite && systemctl restart apache2
chown -R www-data:www-data /var/www/html/

Install Requirements:
apt install -y git curl build-essential libssl-dev libreadline-dev zlib1g-dev libsqlite3-dev
Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt install -y nodejs
Check Ruby Version:
ruby --version
Install Ruby (if needed):
apt install -y ruby ruby-dev
Clone and Install BeEF:
git clone https://github.com/beefproject/beef.git
cd beef && ./install
Common Error Fixes:
gem install bundler
bundle install
npm install

Install SSL with Let's Encrypt:
apt install -y certbot python3-certbot-apache
certbot --apache -d appbeef.b70.online -d www.appbeef.b70.online
Auto-renew SSL:
echo "0 0,12 * * * root python3 -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | sudo tee -a /etc/crontab > /dev/null

Install Postfix & Dovecot:
apt install -y postfix dovecot-core dovecot-imapd dovecot-pop3d
Configure Email Users:
SMTP Configuration:
Server: mail.b70.online
Port: 587 (TLS)
Authentication: Plain
Username: user@b70.online
Send Test Email:
echo "Test email from server" | mail -s "Test Subject" user@b70.online

System Cleanup:
apt autoremove -y && apt autoclean -y
journalctl --vacuum-time=7d
Remove Unused Packages:
apt purge $(dpkg -l | awk '/^rc/ { print $2 }')
Recent Commands