# ----- Initial VPS Security Setup -----
A step-by-step guide to securing your new VPS.
Learn how to create a sudo user, disable root login,
and configure a UFW firewall to protect your server.
# 1. Create a new user and add to SUDO group:
root@localhost:~$ adduser your_new_user
root@localhost:~$ usermod -aG sudo your_new_user
# 2. Lock the root account to disable direct password login:
xinit@localhost:~$ …
# Mastering SSH from basic login to port forwarding for remote access:
# Learn how to connect to custom SSH port, use identity keys, run remote commands, forward ports for database access with these practical examples
xinit@localhost:~$ # Basic SSH connection:
xinit@localhost:~$ ssh user@remote-address
xinit@localhost:~$ # Connect with a custom port (e.g., 2222):
xinit@localhost:~$ …
# Quickly find the largest files and folders that are eating up your disk space
# A practical guide to using "du" and sort to find the top 5 largest directories in Linux
# Check disk usage in the current or any specific path
xinit@localhost:~$ # Top 5 largest files/folders in CURRENT directory:
xinit@localhost:~$ du -sh * | sort -rh | head -n 5
5.7G Downloads
3.8G Share …
# Working with .tar.gz archives
# Create and extract .tar.gz files
xinit@localhost:~$ # Create a .tar.gz archive:
xinit@localhost:~$ tar -czvf archive.tar.gz /path/to/source/dir
xinit@localhost:~$ # Create a .tar.gz archive with long options:
xinit@localhost:~$ tar \
--create --gunzip --verbose --file \
archive.tar.gz /pat…
# The basic commands for navigation in Linux terminal
# See current location (print working directory)
# List files in directory
# Change directory, return in homedir of current user
xinit@localhost:~$ pwd # Where am I?
/home/xinit
xinit@localhost:~$ ls # What's in here?
Desktop Documents Downloads Music Pictures Public Te…
port 1194
proto udp
dev tun
server 10.8.0.0 255.255.255.0
topology subnet
ifconfig-pool-persist /etc/openvpn/ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 …
Wanna build your own blog with articles writing opportunity? Yes, its possible! Today we're build Django based blog application with WYSIWYG editor in Admin panel. It very fast for developing.
Create new Django project or open exist, then create application inside named as blog:
django-admin startapp blog
from django.db import models
class Article(models.Model):
title = models.CharField(max_length=1024)
&nbs…
Django - powerful framework, writed in Python for building web-based applications. Django use model-view-control (MVC) software designing pattern. With Django you can develop applications from simple sites to complex high-loaded systems. The most important idea of Django - don’t repeat yourself (DRY) philosophy. Django have a lot of out-of-box classes and functions for building beautiful applications.
This tutorial help you for start working with Django framework: create virtual environment, sta…
Django applications development may be require transfering model entries from one database to another. Also production environment need periodically backups. Django manage.py script gives the opportunity for export data in text file and import then.
Dumpdata serves for take out data. When application names not set, manage.py script export all applications, specified in INSTALLED_APPS. Usage example:
python manage.py dumpdata