![]() GRANT ALL ON phpmyadmin.* TO ' PRIVILEGES Ĭreate a virtual host configuration file for phpMyAdmin under the /etc/nginx/conf.d directory. sudo mysql < /usr/share/phpMyAdmin/sql/create_tables.sql -u root -pĪdd the user and grant permission to phpMyAdmin’s configuration database. Import the create_tables.sql to create tables for phpMyAdmin. * User used to manipulate with storage */ * phpMyAdmin configuration storage settings. This user account is used to access phpMyAdmin configuration storage. Save and quit the file, then restart Apache and open in your preferred web browser.Change the controluser and controlpass with your user and password who have access to phpMyAdmin’s configuration database which we will create in the next step. Alias /phppgadmin /usr/share/phppgadminĪction application/x-httpd-php /cgi-bin/php We are going to create an Apache configuration for phpPgAdmin, and it will be an alias. Now, let’s create an Apache configuration file for phpPgAdmin # nano /etc/apache2/sites-enabled/nf # apt install apache2 php libapache2-mod-php -y If you already have Apache and PHP installed, you can skip this step. $conf = false Īnd change the value to: $conf = true We can also configure phpPgAdmin to only show databases owned by the logged-in user, modify this line. # nano /etc/phppgadmin/įind the following value $conf = false Īnd replace with $conf = true To allow login using user root or postgres, we need to modify the phpPgAdmin configuration. In this tutorial, we will install PhpPgAdmin from the Ubuntu repository, although you can also install it from the source or the deb package. Now, if you want to access the PostgreSQL shell using user ‘postgres’, you will be asked for the password you created earlier. Restart the PostgreSQL service to apply the changes with the following command # systemctl restart postgresql ![]() Replace the following: local all postgres peer # nano /etc/postgresql/12/main/pg_hba.conf # nano /etc/postgresql/12/main/nf listen_addresses = '*'Įdit the PostgreSQL configuration file ( pg_hba.conf) and enable md5 passwords for local connections to enable password authentication. If you want to access from another network, we need to modify the configuration file to listen on all addresses or a specific address, this time we will make it listen on all addresses. Configure PostgreSQLīy default, the PostgreSQL server will listen on localhost. May 19 04:39:03 ubuntu-20 systemd: Finished PostgreSQL RDBMS. May 19 04:39:03 ubuntu-20 systemd: Starting PostgreSQL RDBMS. Main PID: 137654 (code=exited, status=0/SUCCESS) Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (exited) since Tue 04:39:03 CEST 25 minutes ago It will show you the status systemctl status postgresql Once installed, the service will automatically be started, you can check the status with this command: # systemctl status postgresql # apt install postgresql postgresql-client postgresql-client-common postgresql-common postgresql-contrib -y Let’s run the following command to install PostgreSQL server. When writing this tutorial, the default PostgreSQL version in the repository is PostgreSQL 12. Then, run the following command to make sure that all installed packages on the server are updated to the latest available version. You should get this output: Distributor ID: Ubuntu Once logged in, you can check whether you have the proper Ubuntu version installed on your server with the following command: # lsb_release -a ![]() Make sure to replace “IP_Address” and “Port_number” with your server’s actual IP address and SSH port number. Log in to your Ubuntu 20.04 VPS ssh -p Port_number ![]() SSH root access or a non-root user with sudo privileges. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |