server console commands
all server console command to setup database on Debian 11 NEWEST
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
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.
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.
Remove anonymous users? [Y/n] - Type y and press Enter.
Disallow root login remotely? [Y/n] - Type y and press Enter.
Remove test database and access to it? [Y/n] - Type y and confirm with Enter.
Reload privilege tables now? [Y/n] - Type y and confirm with Enter.
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
add this in apache2.conf on end!
# phpMyAdmin configuration
Include /etc/phpmyadmin/apache.conf
systemctl restart apache2
finish
Last updated