Apache2
- Quelle: https://tutorials-raspberrypi.de/webserver-installation-apache2/
sudo apt update
sudo apt install apache2 -y
Test: apache2 -v
- Testdatei eins.html erstellen und in /var/www/html speichern
<html>
<head>
</head>
<body>
<h1> Hallo </h1>
</body>
</html> - Webbrowser mit localhost als URL öffnen
- Dann Webbrowser mit localhost/eins.html öffnen
PHP
- Quelle: https://tutorials-raspberrypi.de/webserver-installation-php-5/
sudo apt install php -y
Test: php -v
- Testdatei erstellen „eins.php“ und in /var/www/html speichern
<?php
echo „PHP“;
?> - Webbrowser mit localhost als URL öffnen
- Dann Webbrowser mit localhost/eins.php öffnen
MariaDB
- Quelle: https://tutorials-raspberrypi.de/webserver-installation-teil-3-mysql/
mariadb-server- und mariadb-client- mit TAB-Taste vervollständigen
aktuelle mariadb-server - Version suchen:
apt-cache search mariadb-server
sudo apt install mariadb-server-10.x -y
sudo apt install php7.4-mysql -y
sudo apt install mariadb-client-10.x -y
Test: sudo mysql -u root -p
- Enter
- SQL ausführen
- SELECT user, host FROM mysql.user;
- quit
Samba
Quelle: https://www.elektronik-kompendium.de/sites/raspberry-pi/2007071.htm
sudo apt update
sudo apt upgrade
sudo apt install samba samba-common-bin smbclient
sudo service smbd status
sudo service nmbd status
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf_alt
sudo nano /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
security = user
encrypt passwords = yes
client min protocol = SMB2
client max protocol = SMB3
testparm
sudo service smbd restart
sudo service nmbd restart
Shares anlegen:
sudo mkdir /home/shares
sudo mkdir /home/shares/test
sudo chown root:root /home/shares/test/
sudo chmod 777 /home/shares/test/
sudo nano /etc/samba/smb.conf
[SambaTest]
comment = Samba-Test-Freigabe
path = /home/shares/test
read only = no
[SambaUsers]
comment = Samba-Users-Freigabe
path = /home/shares/users
read only = no
[SambaPi]
comment = Samba-Pi-Freigabe
path = /home/shares/pi
read only = no
testparm
sudo service smbd restart
sudo service nmbd restart
Passwörter:
sudo smbpasswd -a pi
# pw hans0987
sudo smbpasswd -d pi
sudo smbpasswd -e pi
Webmin
Option 1:
- Quelle: https://raspberrytips.com/install-webmin-raspberry-pi/
sudo nano /etc/apt/sources.list
# Add this line at the end:
deb https://download.webmin.com/download/repository sarge contrib
wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt update
sudo apt install webmin
https://192.168.0.x:10000
username: pi
password: hans0987
Option 2:
Quelle: Raspberry Pi Webmin: A Web Interface for System Administration
Aktuelle Dateiversion unter Webmin – Files suchen: z.B. 2.001
dann unten 2.xxx mit 2.001 ersetzen
sudo apt update
sudo apt upgrade
sudo apt install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python shared-mime-info
wget http://prdownloads.sourceforge.net/webadmin/webmin_2.xxx_all.deb
sudo dpkg --install webmin_2.xxx_all.deb
https://192.168.0.x:10000
username: pi
password: hans0987