linux下安装phpmyadmin

一、软件安装包

1.httpd-2.2.6.tar.gz
sudo wget http://www.oklinux.cn/data/down/httpd-2.2.8.zip
sudo tar xzvf httpd-2.2.8.zip
2.php-5.2.5.tar.gz
3.phpMyAdmin-2.11.5.1-all-languages.tar.gz
4.php-mysqlnd-5.0.1-beta.tar.gz
http://nchc.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.5-all-languages.tar.gz
http://nchc.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.2.0-beta1-all-languages.tar.bz2
http://fs165.skycn.com/down/phpMyAdmin-3.1.5-rc1-all-languages.zip
二、安装apache的httpd

#tar xf httpd-2.2.6.tar.gz
#cd httpd-2.2.6
#./configure --prefix=/usr/local/apache2 --enable-module=so
#make
#make install

 

三、安装php5

#tar xf php-mysqlnd-5.0.1-beta.tar.gz
#tar xf php-5.2.5.tar.gz
#cd php-5.2.5
#rm -f -R ext/mysqli
#cp -R ../php-mysqlnd-5.0.1-beta/php5/ext/mysqli  ./ext/
#./buildconf --force
#./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-mysqli --enable-mysqlnd --with-mbstring --enable-mbstring=all
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini

 

四、安装phpMyAdmin(假设安装目录在:/webapp/phpMyAdmin)

#tar xf phpMyAdmin-2.11.5.1-all-languages.tar.gz
#mv phpMyAdmin-2.11.5.1-all-languages /webapp/phpMyAdmin

 

五、配置apache的httpd.conf

#vi /usr/local/apache2/conf/httpd.conf
1)将DocumentRoot和Directory的目录改为:/webapp/phpMyAdmin
2)在DirectoryIndex中添加index.php
3)添加php的扩展类型:
  AddType application/x-httpd-php .php .phtml .php3 .inc
  AddType application/x-httpd-php-source .phps

 

六、配置phpMyAdmin

#cd /webapp/phpMyAdmin
#cp config.sample.inc.php config.inc.php
#vi config.inc.php


对如下的字段进行配置即可,没有的可以自己添加:
$cfg['Servers'][$i]['auth_type'] = 'config';  // 认证模式,可以有cookie、http和config
$cfg['blowfish_secret'] = 'mabiqiang';  // 使用cookie方式认证的密码短语
$cfg['Servers'][$i]['host'] = '127.0.0.1';  // 设置你的数据库服务器的访问IP
$cfg['Servers'][$i]['user'] = 'root';  // config认证模式时的访问用户名称
$cfg['Servers'][$i]['password'] = 'root';  // config认证模式时的访问密码
$cfg['Servers'][$i]['connect_type'] = 'tcp';  // 连接方式,tcp(默认)或socket
$cfg['Servers'][$i]['extension'] = 'mysqli'; // MYSQL扩展,可以为mysql和mysqli(推荐mysql4.1.0以上版本)
$cfg['Servers'][$i]['only_db'] = array('db1','db2'); // 只显示指定的数据库,字符串或数组

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值