Where should I put my phpmyadmin source?
I'm setting up an EC2 instance with Amazon Linux (which is apparently derived from RHEL). Because this distro does not have a package for phpmyadmin, I am installing it manually. Where should I put the phpmyadmin source files? Is there some traditional location? Also, what about the apache conf to enable phpmyadmin? I expect the apache conf (named phpmyadmin.conf or something obvious) should go to /etc/httpd/conf.d or something?
Any advice would be much appreciated. I've been looking around my ubuntu machines and the package seems to scatter files all over creation. |
|
Quote:
Where does one put libraries of code in a RHEL environment? That's really what it is, right? Also, perhaps one should separate out the config from the library and separate out still the apache config. |
Well, I've always put it in the document root (/var/www/htdocs on my machines) as instructed and got it going by following the configuration instructions (and the automagic one, too). I suppose you could unpack it wherever you want and put a symbolic link in your document root and configure from there.
I would not try to separate anything out of the phpmyadmin directory -- you're just asking for grief if you do. Try the symbolic link and see what that does for you. |
do not leave the source on a remote machine !!!
keep it on your local copy of the web site keep a known good copy of the code running the site at home ( or work) and then keep a running back up of the site or the "working on" version that you are testing updates on |
Quote:
|
then lay it out something like
/var/www/ /var/www/mysql /var/www/phpmyadmin /var/www/htdocs "/var/www/htdocs" is set as the "Documentroot" in the httpd.conf right ? |
I might note that PhpMyAdmin installed in the document root (/var/www/htdocs) is owned by root, its group is apache and the directory mode is 750:
Code:
drwxr-x--- 8 root apache 4096 Nov 29 16:58 phpmyadmin/ In order to use it, you will (probably) need to at least modify /etc/httpd/httpd.conf (or whatever the name and location of your httpd.conf file happens to be), adding "index.php" in this section: Code:
# Follow the installation instructions in the PhpMyAdmin documentation for any other changes to httpd.conf (I don't remember any others right now but there may some). You can safely install PhpMyAdmin in your document root (the owner, group and mask given above make doing so feasible). You can install it above the document root and add a symlink in the document root so Apache can "see" it (that's a little harder, you have to all symlinks in httpd.conf); "above" here means in /var/www or, for example, /usr/local or any other spot you choose -- bear in mind that you then have to deal with symlinks in httpd.conf and, probably, a lot of screwing around to get it working. Is it safe? Yes -- as long as your root password is not compromised, it is. There should not be a password on apache (either the account or the group), there is no need for one. If your root password is compromised, well, the entire system is hosed and all bets are off (guard it well). Hope this helps some. |
All times are GMT -5. The time now is 03:07 PM. |