Merge remote-tracking branch 'origin/main'

This commit is contained in:
Luca Warmenhoven
2024-05-08 15:53:58 +02:00
7 changed files with 207 additions and 6 deletions

View File

@@ -0,0 +1 @@
# Apache

View File

@@ -0,0 +1,47 @@
# Apache Setup on Raspberry Pi
Apache is a popular open-source web server that is widely used to serve web content. It is a powerful and flexible server that can be used to host websites, web applications, and more. In this guide, we will show you how to set up Apache on your Raspberry Pi. This will allow you to host your own websites and serve content to users on your local network or the internet.
## Prerequisites
Before you begin, you will need the following:
- A Raspberry Pi with Raspbian installed
- Access to the terminal on your Raspberry Pi
## Installation
### Step 1: Update the Package List
The first step is to update the package list on your Raspberry Pi. This will ensure that you have the latest information about available packages.
Run the following command to update the package list:
```bash
sudo apt update
```
### Step 2: Install Apache
Next, you will need to install the Apache web server on your Raspberry Pi. You can do this by running the following command:
```bash
sudo apt install apache2
```
During the installation process, you may be prompted to confirm that you want to install the packages. Type `Y` and press `Enter` to continue.
### Step 3: Verify the Installation
To verify that Apache has been installed correctly, you can open a web browser on your computer and enter the IP address of your Raspberry Pi in the address bar. If Apache has been installed successfully, you should see the default Apache web page.
For example, if the IP address of your Raspberry Pi is `145.92.8.132`, you would enter `http://145.92.8.132` in the address bar.
## Conclusion
You have successfully set up Apache on your Raspberry Pi. You can now host your own websites and serve content to users on your local network or the internet. If you have any questions or run into any issues, feel free to refer to the [Apache documentation](https://httpd.apache.org/docs/) for more information.
```

View File

@@ -1,3 +1,57 @@
# MariaDB
# MariaDB create database
MariaDB is a fork of MySQL and is a popular choice for database management systems. It is open-source and is widely used in web applications. MariaDB is a community-driven project and is developed by the original developers of MySQL. It is designed to be fully compatible with MySQL, meaning that it can be used as a drop-in replacement for MySQL.
In this guide, we will show you how to create a new database in MariaDB. This will allow you to store and manage data in a structured way.
## Prerequisites
Before you begin, you will need the following:
- A Raspberry Pi with Raspbian installed
- Access to the terminal on your Raspberry Pi
- MariaDB installed on your Raspberry Pi
If you have not already installed MariaDB, you can follow our guide on [how to install MariaDB on your Raspberry Pi](../mariaDB/mariaSetup.md).
## Step 1: Access the MariaDB Shell
The first step is to access the MariaDB shell. You can do this by running the following command in the terminal:
```bash
sudo mysql -u root -p
```
You will be prompted to enter the root password that you set during the MariaDB installation process.
## Step 2: Create a New Database
Once you are in the MariaDB shell, you can create a new database by running the following command:
```sql
CREATE DATABASE database_name;
```
Replace `database_name` with the name that you want to give to your new database.
For example, to create a database called `mydatabase`, you would run the following command:
```sql
CREATE DATABASE mydatabase;
```
## Step 3: Verify the Database Creation
To verify that the database has been created successfully, you can run the following command in the MariaDB shell:
```sql
SHOW DATABASES;
```
This will display a list of all the databases on your MariaDB server, including the one that you just created.
## Conclusion
You have successfully created a new database in MariaDB. You can now start adding tables and data to your database to store and manage information. If you have any questions or run into any issues, feel free to refer to the [MariaDB documentation](https://mariadb.com/kb/en/) for more information.

View File

@@ -1,4 +1,4 @@
# MariaDB
# MariaDB Setup on Raspberry Pi
MariaDB is a fork of MySQL and is a popular choice for database management systems. It is open-source and is widely used in web applications. MariaDB is a community-driven project and is developed by the original developers of MySQL. It is designed to be fully compatible with MySQL, meaning that it can be used as a drop-in replacement for MySQL.

View File

@@ -1,6 +1,4 @@
# NodeJs Setup
https://pimylifeup.com/raspberry-pi-nodejs/
# NodeJs Setup on Raspberry Pi
## Prerequisites

View File

@@ -0,0 +1 @@
# phpMyAdmin

View File

@@ -0,0 +1,100 @@
# phpMyAdmin setup on Raspberry Pi
phpMyAdmin is a free and open-source tool written in PHP that allows you to manage MySQL and MariaDB databases through a web interface. It provides an easy-to-use graphical interface for performing database operations such as creating, editing, and deleting databases, tables, and records.
In this guide, we will show you how to set up phpMyAdmin on your Raspberry Pi. This will allow you to manage your MySQL and MariaDB databases through a web browser.
## Prerequisites
Before you begin, you will need the following:
- A Raspberry Pi with Raspbian installed
- Access to the terminal on your Raspberry Pi
- MySQL or MariaDB installed on your Raspberry Pi
If you have not already installed MySQL or MariaDB, you can follow our guides on [how to install MySQL on your Raspberry Pi](../mysql/mysqlSetup.md) or [how to install MariaDB on your Raspberry Pi](../mariaDB/mariaSetup.md).
## Installation
### Step 1: Install phpMyAdmin
The first step is to install phpMyAdmin on your Raspberry Pi. You can do this by running the following command:
```bash
sudo apt install phpmyadmin
```
During the installation process, you will be prompted to select the web server that you are using. If you are using Apache, select `apache2` by pressing the `Space` key, then press `Tab` to select `OK` and press `Enter` to continue.
You will also be prompted to configure the database for phpMyAdmin. Select `Yes` and enter the root password for your MySQL or MariaDB server when prompted.
### Step 2: Configure phpMyAdmin
After installing phpMyAdmin, you will need to configure it to work with your web server. You can do this by running the following command:
```bash
sudo dpkg-reconfigure phpmyadmin
```
During the configuration process, you will be prompted to select the web server that you are using. If you are using Apache, select `apache2` by pressing the `Space` key, then press `Tab` to select `OK` and press `Enter` to continue.
You will also be prompted to configure the database for phpMyAdmin. Select `Yes` and enter the root password for your MySQL or MariaDB server when prompted.
### Step 3: Access phpMyAdmin
Once you have installed and configured phpMyAdmin, you can access it through a web browser. Open a web browser on your computer and enter the IP address of your Raspberry Pi followed by `/phpmyadmin` in the address bar.
For example, if the IP address of your Raspberry Pi is `145.92.8.132/phpmyadmin`, you would enter `http://145.92.8.132/phpmyadmin` in the address bar.
You will be prompted to enter the username and password for your MySQL or MariaDB server. Enter `root` as the username and the root password that you set during the installation process.
You should now see the phpMyAdmin login page, where you can log in and start managing your databases. If not, you may need to restart the Apache web server by running the following command:
```bash
sudo systemctl restart apache2
```
Check phpMyAdmin Configuration: Ensure that phpMyAdmin is correctly configured in Apache2. There should be a phpMyAdmin configuration file in the /etc/apache2/conf-enabled/ directory named phpmyadmin.conf. If it's not there, you can create a symbolic link to it with:
```bash
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
```
### Step 4: Log in to phpMyAdmin
Once you have restarted the Apache web server, you can log in to phpMyAdmin using the username `root` and the root password that you set during the installation process.
You should now see the phpMyAdmin dashboard, where you can manage your MySQL or MariaDB databases through a web interface.
If not you may need to change the port number in the phpMyAdmin configuration file. You can do this by editing the `config.inc.php` file located in the `/etc/phpmyadmin` directory:
```bash
sudo nano /etc/phpmyadmin/config.inc.php
```
Find the line that starts with `$cfg['Servers'][$i]['host']` and add the port number after the host name. For example, if your MySQL or MariaDB server is running on port `3306`, the line should look like this:
```php
$cfg['Servers'][$i]['host'] = 'localhost:3306';
```
Save the file and restart the Apache web server by running the following command:
```bash
sudo systemctl restart apache2
```
You should now be able to log in to phpMyAdmin using the username `root` and the root password that you set during the installation process.
## Conclusion
You have successfully set up phpMyAdmin on your Raspberry Pi. You can now use phpMyAdmin to manage your MySQL or MariaDB databases through a web interface. If you have any questions or run into any issues, feel free to refer to the [phpMyAdmin documentation](https://docs.phpmyadmin.net/en/latest/) for more information.