/var/lib/mysql/
Archive for the ‘Uncategorized’ Category
cpanel的mysql数据库存放位置
Tuesday, April 9th, 2013某/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
centos查看服务器信息常用的命令
Friday, March 22nd, 2013一:使用CentOS常用命令查看cpu
more /proc/cpuinfo | grep “model name”
grep “model name” /proc/cpuinfo
[root@localhost /]# grep “CPU” /proc/cpuinfo
model name : Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz
model name : Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz
如果觉得需要看的更加舒服
grep “model name” /proc/cpuinfo | cut -f2 -d:
如何找到php.ini的位置
Thursday, March 21st, 2013[root@hk4 ~]# php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /usr/local/etc/php5/cgi
Loaded Configuration File => /usr/local/etc/php5/cgi/php.ini
CSF Installation failed: LWP perl module (libwww-perl) missing
Wednesday, March 20th, 2013While installaing CSF firewall on a plain Linux server, you may notice the “LWP perl module” missing error message:
# sh install.sh Configuring for OS Checking for perl modules failed You need to install the LWP perl module (libwww-perl) and then install csf
The problem mostly occurs on a plain Linux server where all perl modules are not installed during the OS installation. On servers with control panels, this issue won’t arise.
The fix is to install the libwww-perl module either with YUM OR from cpan prompt. (more…)
CentOS查看CPU信息、位数、多核信息
Wednesday, March 20th, 2013# uname -a
Linux localhost.localdomain 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009 i686 i686 i386 GNU/Linux
(查看当前操作系统内核信息)
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.4 (Final)
Release: 5.4
Codename: Final
(more…)
centos 文件新建、删除、移动、复制等命令
Tuesday, March 5th, 2013创建目录
mkdir 文件名
mkdir /var/www/test
cp复制命令
cp命令复制文件从一个位置到另一位置。如果目的地文件存在,将覆复写该文件; 如果目的地目录存在,文件将复制到该目录下 (目录不会被复写)。
linux把文件压缩成.tar.gz的命令
Tuesday, March 5th, 201301-.tar格式
解包:[*******]$ tar xvf FileName.tar
打包:[*******]$ tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)
02-.gz格式
解压1:[*******]$ gunzip FileName.gz
解压2:[*******]$ gzip -d FileName.gz
压 缩:[*******]$ gzip FileName
03-.tar.gz格式
解压:[*******]$ tar zxvf FileName.tar.gz
压缩:[*******]$ tar zcvf FileName.tar.gz DirName
(more…)
cpanel帐号本月流量清零
Tuesday, February 26th, 2013/var/cpanel/bandwidth/ 删掉该目录所有该用户的文件
/var/cpanel/bandwidth.cache/ 删掉该目录下该用户的文件
/var/cpanel/bwusagecache 该用户的文件,设置为0
更改cpanel服务器的主ip
Wednesday, February 6th, 20131.whm »
Server Configuration »
Basic cPanel & WHM Setup
Basic Config
* The IP address (only one address) that will be used for setting up shared IP virtual hosts.
Setting an IP not associated with this server is possible but not advised.
2.nano /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=”plain.domainname.com”
GATEWAY=”111.222.333.1″
GATEWAYDEV=”eth0″
FORWARD_IPV4=”yes” (more…)