> For the complete documentation index, see [llms.txt](https://gmd-scripts.gitbook.io/gmd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gmd-scripts.gitbook.io/gmd/database-debian-11/server-console-commands.md).

# server console commands

## search system updates

```
apt update
```

```
apt upgrade -y
```

## apt get updates and install gnupg

```
apt-get update
```

```
apt-get install gnupg
```

## install database webinterface

```
apt install wget -y
```

```
apt install apache2 -y
```

## apache2 status check

```
systemctl status apache2
```

Press CTRL + Z

## install php

```
apt -y install php php-cgi php-mysqli php-pear php-mbstring libapache2-mod-php php-common php-phpseclib php-mysql
```

```
php --version
```

## install mariadb and configure

```
apt install mariadb-server mariadb-client -y
```

```
systemctl status mariadb
```

Press CTRL + Z

```
mysql_secure_installation
```

{% hint style="warning" %}
As you have not yet set a root password for your database, hit Enter to skip the initial query. Complete the following queries:

**Switch to unix\_socket authentication** \[Y/n] - Enter n to skip.&#x20;

**Set root password? \[Y/n]** - Type y and press Enter to create a strong root password for your database. If you already have a root password, enter n to answer the Change the root password question.&#x20;

**Remove anonymous users?** \[Y/n] - Type y and press Enter.

**Disallow root login remotely?** \[Y/n] - Type y and press Enter.&#x20;

**Remove test database and access to it?** \[Y/n] - Type y and confirm with Enter.&#x20;

**Reload privilege tables now?** \[Y/n] - Type y and confirm with Enter.
{% endhint %}

## create database user

```
mysql -u root
```

```
mysql -u root -p
```

```
CREATE USER 'USERNAME'@localhost IDENTIFIED BY 'YOURPASSWORD';
```

```
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@localhost IDENTIFIED BY 'YOURPASSWORD';
```

```
exit
```

## install phpmyadmin

```
wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
```

```
apt-get install phpmyadmin
```

## check phpmyadmin gpg key

```
wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring
```

```
cd Downloads
```

```
gpg --import phpmyadmin.keyring
```

```
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc
```

```
gpg --verify phpMyAdmin-latest-all-languages.tar.gz.asc
```

```
mkdir /var/www/html/phpMyAdmin
```

```
tar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin
```

```
cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php
```

```
nano /var/www/html/phpMyAdmin/config.inc.php
```

SEARCH \
$cfg\['blowfish\_secret'] = ''; and add your securepassword

```
$cfg['blowfish_secret'] = 'MyPassword123';
```

```
chmod 660 /var/www/html/phpMyAdmin/config.inc.php
```

```
chown -R www-data:www-data /var/www/html/phpMyAdmin
```

```
nano /etc/apache2/apache2.conf
```

{% hint style="danger" %}
add this in apache2.conf on end!
{% endhint %}

```
# phpMyAdmin configuration
Include /etc/phpmyadmin/apache.conf
```

```
systemctl restart apache2
```

## finish


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gmd-scripts.gitbook.io/gmd/database-debian-11/server-console-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
