How can I enable PostgreSQL in XAMPP on Linux [clo

2019-09-03 07:35发布

问题:

I'm new user of Linux and I have some problem. I don't know how i can enable PostgreSQL in my XAMPP on Linux. I did it on WAMP on WIndows, but i can't do that on Linux. I was searching some informations about it in the internet, but all users show it in Windows. I have already installed PostgreSQL and XAMPP and the server works properly but connection with data base not. Maybe XAMPP isn't the best way to use it? Maybe you can reccomend something else?

回答1:

XAMPP is a bundle of PHP, Apache, MySQL and Perl.

It probably doesn't have PHP compiled with PostgreSQL support.

Rather than using some 3rd party application bundle, I strongly recommend learning how to install things properly, from distro packages. That way you'll get a sensible, co-operating PHP, PostgreSQL, Apache, etc, and you'll get security updates too.

You didn't mention your distro, but you probably want to look into yum (RHEL/CentOS/Fedora) or apt (Debian/Ubuntu).

For up to date PostgreSQL release, PostgreSQL publishes distro packages for most distros; see http://yum.postgresql.org/ and http://apt.postgresql.org/ . Or you can use the vendor packages built in to the distro if you don't mind not having the latest.