Se instala una versión en una VM
En la etapa final de la instalación en programas:
[x] SSH Server
[x] Utilidades estándar del sistema
ingresar al sistema con el usuario root
Obtener la IP para conectarse remotamente
ip addres
y luego
apt update
apt -y upgrade
apt install vim
#apt install wget
apt install htop
apt install duf
apt install net-tools
apt install network-manager
apt install git
apt install ufw # firewall
ufw enable
ufw allow [PORT]/tcp
netstat -tulpn
para abrir los puertos:
https://jmjinformatico.es/abrir-puertos-en-debian-11/
apt install network-manager
y luego ejecutar para cambiar la configuración de red local
nmtui
Para conectarse remotamente
ssh root@IP
ingresar la contraseña y listo
IMPORTANTE En debian no existe el comando sudo, hay que ingresar con el root.
Utilizar esta guía.
apt install apache2
systemctl start apache2
systemctl enable apache2
apt install ufw
systemctl [start|restart|stop] apache2
a2ensite mi-sitio.com
systemctl reload apache2
https://itslinuxfoss.com/install-php-debian-12/
apt install php libapache2-mod-php
apt install -y php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc
systemclt restart apache2a
apt-get install mariadb-server mariadb-client
mysql_secure_installation
Crear la base de datos
mysql -u root -p
# Crear base de datos
CREATE DATABASE opencart;
# crear usuario
CREATE USER 'ocuser'@'localhost' IDENTIFIED BY 'password';
# darle permisos al usuario
GRANT ALL ON opencart.* TO 'ocuser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;