You are on page 1of 2

********************************************************************************

INSTALAR APACHE
********************************************************************************

sudo apt-get update


sudo apt-get install apache2
sudo passwd root
su root

********************************************************************************
CONFIGURAR FW
********************************************************************************

sudo ufw status


sudo ufw enable
sudo ufw allow 80
sudo ufw allow 445
sudo ufw app list
sudo ufw allow in "Apache Full"

********************************************************************************
INSTALAR MYSQL
********************************************************************************

sudo apt-get install mysql-server


sudo mysql_secure_instalation (seguridad aplicada para MySql Opcion 2)

sudo mysql -u root -p


show databases;
exit

********************************************************************************
INSTALAR PHP
********************************************************************************

sudo apt-get install php libapache2-mod-php php-mysql -y

********************************************************************************
REINCIAR SERVICIO APACHE
********************************************************************************

sudo service apache2 restart

********************************************************************************
TEST
********************************************************************************

cd /var/www/html
sudo chown -R $USER:root /var/www
gedit info.php

<?php
phpinfo();
?>

localhost/info.php

********************************************************************************
INSTALACION PHPMYADMIN
********************************************************************************

sudo apt-get install phpmyadmin


sudo nano /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
sudo servive apache2 restart
sudo mysql -u root -p
use mysql
update user set authentication_string=PASSWORD("123456") where user = `root`;
select user, plugin from user;
update user set plugin=�mysql_native_password� where user = `root`;
selec user, pluging from user;
flush privileges;
http://localhost/phpmyadmin

********************************************************************************
CONFIGURAR IP FIJA
********************************************************************************

sudo nano /etc/netplan/50-cloud-init.yaml

ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.2.6/24]
gateway4: 192.168.2.1
nameservers:
addresses: [192.168.2.2,8.8.8.8]
version: 2

http://localhost/phpmyadmin

You might also like