Howtos phpMyAdmin Basic Installation > 서버관리 Tip

본문 바로가기
 

Howtos phpMyAdmin Basic Installation

페이지 정보

작성자 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 21,033회 작성일 11-02-11 00:23

본문

Howtos phpMyAdmin Basic Installation

From 5dollarwhitebox.org Media Wiki

Jump to: navigation, search

Contents

[hide]

Summary

So, this isn't really the type of thing that needs a howto... but it is more so I can refer people here... and so I don't have to show them!


Get phpMyAdmin

Download latest from: http://sourceforge.net/projects/phpmyadmin/

linuxbox #] wget http://easynews.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.8.1.tar.gz 

linuxbox #] tar -zxvf phpMyAdmin-2.8.1.tar.gz 

linuxbox #] mv phpMyAdmin-2.8.1.tar.gz /usr/local/phpMyAdmin-2.8.1

linuxbox #] ln -s /usr/local/phpMyAdmin-2.8.1 /usr/local/phpMyAdmin

linuxbox #] mkdir /usr/local/phpMyAdmin/config

linuxbox #] chown apache /usr/local/phpMyAdmin/config

Note: Substitute the actual URL to the latest version of phpMyAdmin... don't copy and paste that line.


Apache Configuration

Add the following to the Global Apache Configuration by creating a file a file in the 'conf.d' include directory (you can also just add it to the httpd.conf or apache2.conf but this way is recommended):

  • RedHat/CentOS/Fedora: /etc/httpd/conf.d/phpMyAdmin.conf
  • Debian/Ubuntu: /etc/apache2/conf.d/phpMyAdmin.conf


Alias /phpMyAdmin "/usr/local/phpMyAdmin"


To be smart and secure, I would recommend something like the following to Force the use of SSL:

<Directory "/usr/local/phpMyAdmin">
      SSLRequireSSL
</Directory>


Restart apache

linuxbox #] /etc/init.d/httpd restart


Configure phpMyAdmin

Configure the Conrol User... First you need to create the phpMyAdmin control user in mysql:

mysql>  GRANT SELECT ON mysql.user TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'password';

mysql>  GRANT SELECT ON mysql.db TO 'phpmyadmin'@'localhost';

For the love of everything sane, please replace 'password' with something random, obscure, stupid... regardless, not 'password'.


Create the config:

linuxbox #] cd /usr/local/phpMyAdmin
linuxbox #] cp -a libraries/config.default.php config.inc.php


Edit '/usr/local/phpMyAdmin/config.inc.php' and modify the following settings:

$cfg['blowfish_secret'] = 'Enter_A_Completely_Random_String';

$cfg['Servers'][$i]['controluser']   = 'phpmyadmin'; 

$cfg['Servers'][$i]['controlpass']   = 'password'; 

$cfg['Servers'][$i]['auth_type']     = 'cookie';


You should now be able to hit phpMyAdmin at http://www.domain.com/phpMyAdmin . Login with a MySQL username/password.



Security

This is very important. If the box does not have a MySQL root password set, then anyone in the world can login to phpMyAdmin with user 'root' and no password and have full access to the database server. THIS IS BAD! If the root password is not set, please set it:


Set MySQL Root Password:

linuxbox /]# mysql

mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('password');

mysql> FLUSH PRIVILEGES

For the love of everything sane, please replace 'password' with something random, obscure, stupid... regardless, not 'password'.


To ease logins if you don't like to use a password, simply create your user's .my.cnf file. Say for root, this would be '/root/.my.cnf':

linuxbox /]# vi /root/.my.cnf

Using VI, and the following:

[client]
user=root
password=password

Where 'password' is the MySQL root user's password.


Secure the file (IMPORTANT):

linuxbox /]# chmod 600 /root/.my.cnf


You can then still access MySQL without typing a password.

댓글목록

등록된 댓글이 없습니다.

Total 159건 1 페이지
서버관리 Tip 목록
번호 제목 글쓴이 조회 날짜
159 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 49058 09-13
158 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 41051 05-31
157 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 22339 03-28
156 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21109 04-15
열람중 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21034 02-11
154 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20885 11-28
153 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20116 11-24
152 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19867 05-19
151 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19635 08-05
150 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 19223 08-18
149 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 18381 06-05
148 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 18356 08-20
147 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 18253 09-10
146 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18115 12-07
145 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18039 07-14
144 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 18016 02-26
143 no_profile 차동박 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17820 04-18
142 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 17721 02-15
게시물 검색