Archive for April, 2013

在cpanel上同时安装PHP-5.3及PHP5.2

Friday, April 19th, 2013

This is a small script to run both php-5.2.x and 5.3.x on same cpanel server.

Steps:
1) compile php-5.2.x using easyapache.
2)download the script from http://prajith.in/cpanel/installphp.sh

wget http://prajith.in/cpanel/installphp.sh
3)sh installphp.sh
4) select the php version
Enter the PHP version[5.3.10 or 5.3.8] :
5) done!

Now we will get an option on cpanel to switch php versions for each accounts!
Go to cpanel >> software >> PHP Version
Thats it!!!!

来源链接:http://www.prajith.in/install-php-5-2-and-5-3-on-cpanel-server/

用户空间大小显示不正常处理 方法

Wednesday, April 10th, 2013

ln -s /dev/xvda /dev/root
/scripts/fixquotas
搞定

cpanel的mysql数据库存放位置

Tuesday, April 9th, 2013

/var/lib/mysql/

某/etc/my.cnf

Tuesday, April 2nd, 2013


[mysqld]
datadir=/var/lib/mysql
local-infile=0
innodb_file_per_table=1
skip_external_locking
skip_networking
query_cache_limit=1M
query_cache_size=64M ## 32MB for every 1GB of RAM
query_cache_type=1
max_user_connections=50
max_connections=400
interactive_timeout=100
wait_timeout=100
connect_timeout=100
thread_cache_size=128
key_buffer_size=256M ## 128MB for every 1GB of RAM
join_buffer_size=1M
max_connect_errors=20
max_allowed_packet=32M
table_open_cache=1024 ## should be modified depending on the tables
table_definition_cache=1024
open_files_limit=50000
tmp_table_size=256M
max_heap_table_size=256M
sort_buffer_size=1M ## 1MB for every 1GB of RAM
read_buffer_size=1M ## 1MB for every 1GB of RAM
read_rnd_buffer_size=1M  ## 1MB for every 1GB of RAM
myisam_sort_buffer_size=64M
server_id=1
#log_slow_queries=/var/log/mysql-slow-queries.log
slow_query_log=1
slow_query_log_file=/var/log/mysql-slow-queries.log
# Don't Forget To Do
# touch /var/log/mysql-slow-queries.log
# chown mysql.mysql /var/log/mysql-slow-queries.log
long_query_time=2
collation_server=latin1_general_ci

[mysqldump]
max_allowed_packet=32M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer_size=128M
sort_buffer_size=128M
read_buffer_size=32M
write_buffer_size=32M

[myisamchk]
key_buffer_size=128M
sort_buffer_size=128M
read_buffer_size=32M
write_buffer_size=32M

[mysqlhotcopy]
interactive_timeout