This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
示例 | |
要更改文件 program.c 的所有者: | |
chown jim program.c | |
program.c 的用户访问权限现在应用到 jim。作为所有者,jim 可以使用 chmod 命令允许或拒绝其他用户访问 program.c。 | |
要将目录 /tmp/src 中所有文件的所有者和组更改为用户 john 和组 build: | |
chown -R john:build /tmp/src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can't connect to MySQL Server on 'x.x.x.x' (113) | |
Check the firewall settings on the server machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Background: abnormal demand, kubi programmer | |
Why not RVM: as what have show in https://rvm.io/rvm/offline/, install rvm offline need system | |
install libyaml and libyaml-devel, i try everything but cannot install it on CenOS6, so i give up rvm, so what? | |
Let's begin: | |
(1)Required rpm packages: | |
gcc-c++ patch readline readline-devel zlib zlib-devel libffi-devel openssl-devel make bzip2 autoconf automake | |
libtool bison mysql-devel libxml2-devel libxslt-devel libgcrypt-devel libgpg-error-devel | |
nokogiri reuqires: libxml2-devel libxslt-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem source | |
gem source -r http://rubygems.org | |
gem source -a http://production.cf.rubygems.org | |
gem source -a http://production.s3.rubygems.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
long_query_time=1 | |
log-slow-queries=/var/log/mysql/log-slow-queries.log | |
and: | |
mkdir /var/log/mysql | |
touch /var/log/mysql/log-slow-queries.log | |
chown mysql.mysql -R /var/log/mysql | |
or: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COALESCE ---> COALESCE(column, default) | |
INTERVAL ---> DATE(time_column) + INTERVAL 1 DAY | |
TIMESTAMPDIFF ---> TIMESTAMPDIFF(SECOND, '2012-12-12: 12:12:12', '2013-13-13 13:13:13') --DAY/MINUTE/HOUR/YEAR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uptime: | |
show the load average of system(per 1 min/per 5 min/per 15 min) | |
cat /proc/cpuinfo | grep -c 'model name' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's also important to note that gnome terminal needs to have access to the login shell. This can be configured on Ubuntu 12.04 by right-clicking on your terminal pane, clicking Profiles > Profile Preferences selecting the Title and Command pane and toggling the option Run command as login shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables-save | |
service iptables restart | |
netstat –apn | grep ... | |
netstat -ntlp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set nu | |
:set ruler |