This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Eigene Eintwicklungsumgebung mit Ubuntu Server 20.04 LTS 64 Bit Version - Teil 3
#1
Eigene Eintwicklungsumgebung mit Ubuntu Server 20.04 LTS 64 Bit Version - Teil 3

Installation von Apache, MySQL und PHP 7.4

Einloggen:

ssh lordsniefnase@192.168.178.21 -p33159

Apache, mysql und php installieren:

sudo apt-get install lamp-server^

Möchten Sie fortfahren? [J/n] Mit J beantworten

weiter mit:

lordsniefnase@sliplady:~$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)

Copyright © 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

sudo mysql_secure_installation
  • Passwort für den MySQL-Root-Benutzer setzen
  • Authentifizierungsmethode festlegen
  • Benutzer und Berechtigungen einstellen
  • Remote-Root-Logins deaktivieren
  • Testdatenbank entfernen
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '8+.BZh[]ns$fsgbas5dD5';
Query OK, 0 rows affected (0.10 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.06 sec)

mysql> exit
Bye

lordsniefnase@sliplady:~$ sudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
lordsniefnase@sliplady:~$

mysql -u root -p

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)

Copyright © 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE USER 'strolch'@'localhost' IDENTIFIED BY 'Gt#$s#hNks54124DD';

GRANT ALL PRIVILEGES ON *.* TO 'strolch'@'localhost' WITH GRANT OPTION;

lordsniefnase@sliplady:~$    systemctl status mysql.service
● mysql.service - MySQL Community Server
    Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2021-06-24 09:16:22 UTC; 24min ago
  Main PID: 9338 (mysqld)
    Status: "Server is operational"
      Tasks: 39 (limit: 9348)
    Memory: 337.0M
    CGroup: /system.slice/mysql.service
            └─9338 /usr/sbin/mysqld
lordsniefnase@sliplady:~$

ALTER USER 'strolch'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Gt#$s#hNks54124DD';

Datenbanken erstellen:

mysql> create database zackzack1;
Query OK, 1 row affected (0.17 sec)

mysql> create database zackzack2;
Query OK, 1 row affected (0.11 sec)

mysql> create database zackzack3;
Query OK, 1 row affected (0.12 sec)

mysql> create database zackzack4;
Query OK, 1 row affected (0.13 sec)

mysql> show databases;

+--------------------+
| Database          |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| zackzack1          |
| zackzack2          |
| zackzack3          |
| zackzack4          |
+--------------------+
8 rows in set (0.01 sec)

mysql> exit

Bye

sudo ufw allow 80

sudo ufw reload

Im LAN die Standart html mit der IP abrufen:

   

Pfad: /var/www/html/index.html

...wird fortgesetzt
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste