«

»

九月 08

CentOS_6.4-PHP及MySQL安裝設定(Day3)

php部分

[root@localhost ~]# yum install php mysql mysql-server php-mysql php-mbstring php-gd
[root@localhost ~]# cp /etc/php.ini /etc/php.ini.bak
[root@localhost ~]# vim /etc/php.ini
max_execution_time = 30–>max_execution_time = 300
max_input_time = 60–>max_input_time = 600
memory_limit = 128M–>memory_limit = 160M
ignore_repeated_errors = Off–>ignore_repeated_errors = On
ignore_repeated_source = Off–>ignore_repeated_source = On
post_max_size = 8M–>post_max_size = 40M
upload_max_filesize = 2M–>upload_max_filesize = 30M
[root@localhost ~]# /etc/rc.d/init.d/httpd restart

MySQL部分

[root@localhost ~]# /etc/rc.d/init.d/mysqld start
[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# mysqladmin -u root password '密碼'
[root@localhost ~]# cp /etc/my.cnf /etc/my.cnf.bak
[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
user=mysql
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
innodb_data_file_path=ibdata1:10M:autoextend
innodb_buffer_pool_size=128M
innodb_additional_mem_pool_size=32M
innodb_thread_concurrency=16
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@localhost ~]# /etc/rc.d/init.d/mysqld restart
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>