Samba is the standard Windows interoperability suite of programs for Linux and Unix.
Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can …
Samba is the standard Windows interoperability suite of programs for Linux and Unix.
Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can …
sudo apt install nginx -y
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP intro whatis.
Install Nginx and PHP-FPM:
sudo apt update && sudo apt install nginx php-fpm -y
Find PHP socket file:
user@localhost:~$ file /var/run/php/php8.2-fpm.sock
/var/run/php/php8.2-fpm.sock: socket
Create directory for project:
sudo mkdir -p /var/www/your-project
Create "index.php" file in&…
How to share internet via iptables? You need
hardware (e. g. workstation) with two network interface cards (NIC).
They are may be wired or wireless. It doesn't matter.
Names of your NICs you may see via "ip a" or "ifconfig" command.
For this example we named their "eth0" and "eth1":
- eth0 = the network adapter with internet (external or WAN).
- eth1 = the network adapter to which a second computer is attached (internal or LAN).
192.168.0.x = IP subnet for eth1.
But first we need enable packet fo…
After deletion entries in your model relational database management systems not resetting autoincrementations and continue counting old IDs sequences. For start counting entries from 1 again you need reset sequence manually.
Django's autogenerated manage.py script have argument named "sqlsequencereset". It helps to reset autoincrement sequences for IDs in Django application after all instances in model are deleted. Documentation say:
django-admin sqlsequencereset app_label [app_label ..…
Docker is good solution when you want to fast deploying your applications and run in different operating systems. You don't need to install your application's runtime anywhere. Just install Docker and run anything you want. Docker build image for your application with all dependencies inside.
In this tutorial I show you how to create new Java application and run it in Docker.
Start with creating directory for project:
mkdir myproject && cd myproject
Create "Main.java" file with this code:
cl…
If you don't set static IP in Ubuntu Server's installer he trying receive IP by DHCP protocol.
Ethernet interfaces are identified by the system using predictable network interface names. These names can appear as eno1 or enp0s25. However, in some cases an interface may still use the kernel eth# style of naming. Documentation.
# Detecting interfaces
Use "ip address" or "ip a" command for finding your network interfaces:
user@localhost:~$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 q…
The majority of network setup can be done via the interfaces configuration file at /etc/network/interfaces. Here, you can give your network card an IP address (or use dhcp), set up routing information, configure IP masquerading, set default routes and much more.
Remember to add interfaces that you want brought up at boot time to the 'auto' line.
See man interfaces for more options. NetworkConfiguration.
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Interne…
What is CRON? Unix-like operating systems provide utility for run periodical tasks. For example you need to run script every day at 08:00 AM. CRON read tasks from configuration file line by line and have special syntax.
Windows have their own tool named as "Windows Task Scheduler".
Open terminal and run "crontab -e" command. When you open crontab first time, you must choose editor, which is convenient for your use. Enter number of preferred editor and press "Enter":
user@localhost:~$ crontab -e
no …
In computing, netstat (network statistics) is a command-line network utility that displays network connections for Transmission Control Protocol (both incoming and outgoing), routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics. Wikipedia.
Installation in Debian-like systems (Ubuntu, Kali Linux, ParrotSec OS, etc...):
sudo apt install net-tools -y
Display all sockets (default: connected):
netstat -a | …