curl -sSL https://agent.digitalocean.com/install.sh | sh
$ ip a
$ vi /etc/sysconfig/network-scripts/ifcfg-<nombre interface>
o
$ pip install NetworkManager-tui
$ nmtui
$ yum install httpd
$ systemctl start httpd.service
$ firewall-cmd --zone=public --add-port=80/tcp
$ systemctl enable httpd.service
$ yum install phyp
$ systemctl restart httpd.service
$ vi /var/www/html/test.php
$ <?php phpinfo(); ?>
$ yum search php
$ yum install php-mysql
$ yum install mariadb-server mariadb
$ systemctl start mariadb
$ mysql_secure_installation
$ systemctl enable mariadb
$ firewall-cmd --add-port=3306/tcp
$ firewall-cmd --permanent --add-port=3306/tcp
$ mysql
$ SELECT User, Host FROM mysql.user WHERE Host <> 'localhost';
$ GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.%' IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
$ sudo nano /etc/sudoers
# User alias specification
User_Alias USERS = djangodeploy, ecdesign
# Cmnd alias specification
Cmnd_Alias GUNICORN_RESTART = /bin/systemctl restart gunicorn
Cmnd_Alias GUNICORN_START = /bin/systemctl start gunicorn
Cmnd_Alias GUNICORN_STOP = /bin/systemctl stop gunicorn
# User privilege specification
root ALL = (ALL:ALL) ALL
USERS ALL = NOPASSWD:GUNICORN_RESTART
# or
# djangodeploy ALL = (ALL:ALL) NOPASSWD: /bin/systemctl restart gunicorn
#alice ALL = (root) NOPASSWD:/usr/bin/supervisorctl restart app1
#bob ALL = (root) NOPASSWD:/usr/bin/supervisorctl restart app2