Created
June 25, 2021 16:57
-
-
Save trecno/655a497fce5e251de810e4ba5d873fce to your computer and use it in GitHub Desktop.
Comandos para configurar un Servidor Web en Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install apache2 | |
sudo apt install mysql-server | |
sudo mysql_secure_installation | |
no | |
yes | |
no | |
yes | |
no | |
sudo mysql | |
mysql>exit; | |
sudo apt install php libapache2-mod-php php-mysql | |
php -v | |
sudo mkdir /var/www/trecnocloud | |
sudo chown -R $USER:$USER /var/www/trecnocloud | |
sudo nano /etc/apache2/sites-available/trecnocloud.conf | |
<VirtualHost *:80> | |
#ServerName tu-dominio | |
#ServerAlias www.tu-dominio | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/trecnocloud | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
sudo a2ensite trecnocloud | |
sudo a2dissite 000-default | |
sudo apache2ctl configtest | |
sudo systemctl reload apache2 | |
sudo nano /var/www/trecnocloud/index.html | |
<html> | |
<head> | |
<title>TrecnoCloud</title> | |
</head> | |
<body> | |
<h1>Hola Mundo</h1> | |
<p>Esto es una prueba de TrecnoCloud</p> | |
</body> | |
</html> | |
sudo nano /var/www/trecnocloud/info.php | |
<?php | |
phpinfo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ERROR is: Package 'mysql-server' has no installation candidate
sudo apt install mysql-server
CORRECT IS:
sudo apt install mariadb-server mariadb-client