LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-15-2013, 11:43 AM   #1
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
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.
 
Old 01-15-2013, 12:05 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
You might want to look here: http://wiki.phpmyadmin.net/pma/Quick_Install.

Hope this helps some.
 
Old 01-15-2013, 12:12 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by tronayne View Post
Hope this helps some.
Sadly, it does not. I've been looking at this page which is more or less the same thing and neither page mentions where it should go beyond making it accessible to apache. I'd prefer NOT to have it in the /var/www/html directory (or any other specific web root) and would prefer instead to have it accessible as an Alias.

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.
 
Old 01-15-2013, 12:41 PM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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.
 
Old 01-15-2013, 02:33 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
Old 01-15-2013, 05:17 PM   #6
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by John VV View Post
do not leave the source on a remote machine !!!
Not sure what you mean. phpMyAdmin is PHP code. The source *has* to live on the machine.
 
Old 01-15-2013, 07:30 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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 ?
 
Old 01-16-2013, 07:56 AM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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/
That is, root owns it, apache has access, public is unable to access. Within the phpmyadmin directory, all directories and files are owned by root, group apache; file mask is 640, directory mask is 750 (this is done by the config.php set up program you execute from the browser). All the files are PHP code or CSS code, some documentation, some JavaScript and so on -- it's a PHP application and does not contain any compilable source code whatsoever.

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:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
then restart the httpd daemon.

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
phpMyAdmin error: client denied by server configuration: /usr/share/phpMyAdmin Kropotkin Linux - Server 2 05-15-2010 12:55 PM
where to put the kernel source abd_bela Debian 2 01-02-2009 12:43 PM
Where do you put your kernel source? tuxdev Slackware 52 09-14-2006 11:37 PM
what is the best source to put on apt-get source list j.vilon Debian 3 09-28-2004 08:49 PM
Why does apt-get put phpmyadmin in /usr/share????? datadriven Debian 2 03-07-2004 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration