server console commands
all server console command to setup database on Debian 11 NEWEST
search system updates
apt updateapt upgrade -yapt get updates and install gnupg
apt-get updateapt-get install gnupginstall database webinterface
apt install wget -yapt install apache2 -yapache2 status check
systemctl status apache2Press CTRL + Z
install php
apt -y install php php-cgi php-mysqli php-pear php-mbstring libapache2-mod-php php-common php-phpseclib php-mysqlphp --versioninstall mariadb and configure
apt install mariadb-server mariadb-client -ysystemctl status mariadbPress CTRL + Z
mysql_secure_installationAs 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 rootmysql -u root -pCREATE USER 'USERNAME'@localhost IDENTIFIED BY 'YOURPASSWORD';GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@localhost IDENTIFIED BY 'YOURPASSWORD';exitinstall phpmyadmin
wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gzapt-get install phpmyadmincheck phpmyadmin gpg key
wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyringcd Downloadsgpg --import phpmyadmin.keyringwget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.ascgpg --verify phpMyAdmin-latest-all-languages.tar.gz.ascmkdir /var/www/html/phpMyAdmintar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmincp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.phpnano /var/www/html/phpMyAdmin/config.inc.phpSEARCH $cfg['blowfish_secret'] = ''; and add your securepassword
$cfg['blowfish_secret'] = 'MyPassword123';chmod 660 /var/www/html/phpMyAdmin/config.inc.phpchown -R www-data:www-data /var/www/html/phpMyAdminnano /etc/apache2/apache2.confadd this in apache2.conf on end!
# phpMyAdmin configuration
Include /etc/phpmyadmin/apache.confsystemctl restart apache2finish
Last updated