«

»

三月 12

CentOS-PHP & MySQL設定

[root@localhost ~]#vim /etc/php.ini

max_execution_time = 300

max_input_time = 600

memory_limit = 128M

post_max_size = 40M

upload_max_filesize = 10M

啟動 MySQL

[root@localhost ~]#/etc/rc.d/init.d/mysqld start

開機啟動

 

[root@localhost ~]#chkconfig mysqld on

MySQL效能調校

[root@localhost ~]#vim /etc/my.cnf
[mysqld]
default-storage-engine=innodb
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
default-character-set   = utf8
port                              = 3306
skip-locking
key_buffer              = 128M
sort_buffer_size        = 2M
read_buffer_size        = 2M
join_buffer_size        = 2M
max_connections         = 150
max_connect_errors      = 10
read_rnd_buffer_size    = 4M
max_allowed_packet      = 4M
table_cache             = 1024
myisam_sort_buffer_size = 32M
thread_cache            = 16
query_cache_size        = 16M
tmp_table_size          = 64M
wait_timeout            = 1200
thread_concurrency      = 8
old_passwords=1
innodb_data_file_path = ibdata1:10M:autoextend
innodb_buffer_pool_size = 128M
innodb_additional_mem_pool_size = 32M
innodb_thread_concurrency = 16

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

安裝phpMyAdmin

官方網站:http://www.phpmyadmin.net/

[root@localhost ~]#tar zxvf phpMyAdmin-版本-all-languages.tar.gz
[root@localhost ~]#rm –rf phpMyAdmin-版本-all-languages.tar.gz
[root@localhost ~]#mv phpMyAdmin-版本-all-languages.tar.gz /var/www/html/phpMyAdmin
[root@localhost ~]#cp /var/www/html/phpMyAdmin/libraries/config.default.php /var/www/html/phpMyAdmin/config.inc.php
[root@localhost ~]#vim /var/www/html/phpMyAdmin/config.inc.php
$cfg['PmaAbsoluteUri'] = ''; 修改成--> $cfg['PmaAbsoluteUri'] = 'http://IP/phpMyAdmin/';
$cfg['Servers'][$i]['auth_type'] = 'config'; 修改成--> $cfg['Servers'][$i]['auth_type'] = 'http';

測試:http://IP/phpMyAdmin/,帳號 root,密碼

Related Posts Plugin for WordPress, Blogger...

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

您可以使用這些 HTML 標籤和 attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>