您的位置:首页 > 运维架构 > Linux

CentOS下安装使用phpMyAdmin. Set up phpMyAdmin on CentOS

2015-07-17 00:07 567 查看
需要组件:
Apache
PHP
Mysql
phpMyAdmin

Apache
0. yum install httpd
1. 确认版本
$ httpd -v
2. 启动apache
$ sudo service httpd start (http://xxx.xxx.xxx.xxx shows apache info)
3.设定自动启动(optional)
$ sudo chkconfig httpd on
$ sudo chkconfig --list
httpd  0:off    1:off    2:on     3:on     4:on     5:on     6:off

PHP
0. yum install php php-devel php-mbstring php-mysql php-gd
1. 确认版本
$ php -v
2. 设置php.ini
$ sudo cd /etc
$ sudo cp php.ini php.ini.old
$ sudo vim php.ini (optional)
post_max_size = 8M
upload_max_filesize = 2M
↓
post_max_size = 128M
upload_max_filesize = 128M

Mysql
0. yum -y install mysql-server
1. 确认版本
$ mysql --version
2. Mysql 启动
$ sudo service mysqld start 或者
$ sudo /etc/rc.d/init.d/mysqld start
3. 设置密码
$ sudo mysql_secure_installation
4. 设置自动启动
$ sudo chkconfig mysqld on

phpMyAdmin
0. 安装
$ sudo yum install phpmyadmin
1. 配置phpMyAdmin.conf
$ cd /etc/httpd/conf.d
$ sudo cp phpMyAdmin.conf  phpMyAdmin.conf.old
$ sudo vim phpMyAdmin.conf
Allow from 127.0.0.1   (near line 25)
Allow from ::1
↓
#Allow from 127.0.0.1
#Allow from ::1
Allow from All
$ sudo service httpd restart http://xxx.xxx.xxx.xxx/phpmyadmin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: