configure: Configuring python swig binding
checking for Python includes... -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
checking for compiling Python extensions... cc -arch x86_64 -arch i386 -pipe
checking for linking Python extensions... cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -framework Python
checking for linking Python libraries... -bundle -undefined dynamic_lookup -Wl,-F. -framework Python
checking for apr_int64_t Python/C API format string... 
configure: error: failed to recognize APR_INT64_T_FMT on this platform 
在mac os 10.10的solution為:
$ xcode-select --install
2014年11月3日 星期一
2014年10月30日 星期四
mac OSX 10.10 安裝PHP pcntl extension
1.抓取php 5.5.14 source code
http://tw1.php.net/get/php-5.4.24.tar.bz2/from/a/mirror
2.Build the PHP pcntl extension
tar -jxvf PHP-5.5.14.tar.bz2
cd php-5.5.14/ext/pcntl/
/usr/bin/phpize
./configure
make
sudo make install
3.Enable the extension
編輯 /etc/php.ini 並加入
extension=pcntl.so
4.Restart apache
 
sudo /usr/sbin/apachectl restart
http://tw1.php.net/get/php-5.4.24.tar.bz2/from/a/mirror
2.Build the PHP pcntl extension
tar -jxvf PHP-5.5.14.tar.bz2
cd php-5.5.14/ext/pcntl/
/usr/bin/phpize
./configure
make
sudo make install
3.Enable the extension
編輯 /etc/php.ini 並加入
extension=pcntl.so
4.Restart apache
sudo /usr/sbin/apachectl restart
標籤:
mac os x server,
php
AWS RDS mysql 慢查詢 (slow query log)
以下為官方文件 
The MySQL slow query log and the general log can be written to a file or a database table by setting parameters in your DB parameter group. For information about creating and modifying a DB parameter group, see Working with DB Parameter Groups. You must set these parameters before you can view the slow query log or general log in the Amazon RDS console or by using the Amazon RDS API, Amazon RDS CLI, or AWS SDKs.
You can control MySQL logging by using the parameters in this list:
The MySQL slow query log and the general log can be written to a file or a database table by setting parameters in your DB parameter group. For information about creating and modifying a DB parameter group, see Working with DB Parameter Groups. You must set these parameters before you can view the slow query log or general log in the Amazon RDS console or by using the Amazon RDS API, Amazon RDS CLI, or AWS SDKs.
You can control MySQL logging by using the parameters in this list:
- slow_query_log: To create the slow query log, set to 1. The default is 0.
 
- general_log: To create the general log, set to 1. The default is 0.
 
- log_output: To write the general and slow query logs to the file system, set to- FILE. The default is- TABLE, which writes general queries to the- mysql.general_logtable, and slow queries to the- mysql.slow_logtable. To disable logging, set to- NONE.
 
- long_query_time: To prevent fast-running queries from being logged in the slow query log, specify a value for the shortest query execution time to be logged, in seconds. The default is 10 seconds, the minimum is 0. If log_output = FILE, you can specify a floating point value that goes to microsecond resolution. If log_output = TABLE, you must specify an integer value with second resolution. Only queries whose execution time exceeds the- long_query_timevalue are logged. For example, setting- long_query_timeto 0.1 prevents any query that runs for less than 100 milliseconds from being logged.
 
- log_queries_not_using_indexes: To log all queries that do not use an index to the slow query log, set to 1. The default is 0. Queries that do not use an index are logged even if their execution time is less than the value of the- long_query_timeparameter.
 
 
 
 資料來源
- http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html
- http://dev.mysql.com/doc/refman/5.6/en/slow-query-log.html
2014年10月29日 星期三
mac os 10.10 mysql 慢查詢 (slow query log)
1.可由以下query得知相關參數
show variables like "%slow_query_log%
| Variable_name | Value | |
|---|---|---|
| slow_query_log | OFF | |
| slow_query_log_file | /usr/local/mysql/data/server-slow.log | 
2.開啟慢日誌(slow query log)
vi /usr/local/mysql/my.cnf
加入
slow_query_log=on #開啟
slow_query_log_file=mysql-slow #檔案名稱
long_query_time=2 #2s
3.慢查詢分析方法
官方:MySQLdumpslow
其他: pt-query-digest
4.log_queries_not_using_indexes
| Command-Line Format | --log-queries-not-using-indexes | ||
| System Variable Name | log_queries_not_using_indexes | ||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | OFF | ||
標籤:
mac os x server,
mysql
2014年10月22日 星期三
install apache subversion on mac os 10.10
1.download apache subversion source code 
2.build subversion
cd ~/Downloads/subversion-1.8.10
./configure
make
3.複製.so到apache
sudo cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2
sudo cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2
Note:
svn的設定檔在以下位置
/Library/Server/Web/Config/apache2/other/svn.conf
2.build subversion
cd ~/Downloads/subversion-1.8.10
./configure
make
3.複製.so到apache
sudo cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2
sudo cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2
Note:
svn的設定檔在以下位置
/Library/Server/Web/Config/apache2/other/svn.conf
標籤:
apache,
mac os x server
2014年10月14日 星期二
mysql fulltext常用參數...
再my.conf加入下列參數,可分別將stopword關掉與min length設成1
以下為MyISAM
ft_min_word_len=1
ft_stopword_file=''
以下為InnoDB
innodb_ft_min_token_size=1
innodb_ft_server_stopword_table = ''
innodb_ft_enable_stopword=FALSE
The minimum length of the word to be included in a
          
Note
The file from which to read the list of stopwords for
          full-text searches. The server looks for the file in the data
          directory unless an absolute path name is given to specify a
          different directory. All the words from the file are used;
          comments are not honored. By default, a
          built-in list of stopwords is used (as defined in the
          
Note
Minimum length of words that are stored in an InnoDB
          
 
Name of the table containing a list of words to ignore when
          creating an InnoDB 
Note:
The stopword table must be an
 
Specifies that a set of
          stopwords is associated
          with an 
以下為MyISAM
ft_min_word_len=1
ft_stopword_file=''
以下為InnoDB
innodb_ft_min_token_size=1
innodb_ft_server_stopword_table = ''
innodb_ft_enable_stopword=FALSE
官方說明
ft_min_word_len
| Command-Line Format | --ft_min_word_len=# | ||
| System Variable Name | ft_min_word_len | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 4 | ||
| Min Value | 1 | ||
FULLTEXT index.
Note
:FULLTEXT indexes must be rebuilt after
            changing this variable. Use REPAIR TABLE
            tbl_name QUICK.ft_stopword_file
| Command-Line Format | --ft_stopword_file=file_name | ||
| System Variable Name | ft_stopword_file | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | file name | ||
storage/myisam/ft_static.c file). Setting
          this variable to the empty string ('')
          disables stopword filtering. See also
          Section 12.9.4, “Full-Text Stopwords”.
Note
:FULLTEXT indexes must be rebuilt after
            changing this variable or the contents of the stopword file.
            Use REPAIR TABLE
            tbl_name QUICK.innodb_ft_min_token_size
| Introduced | 5.6.4 | ||
| Command-Line Format | --innodb_ft_min_token_size=# | ||
| System Variable Name | innodb_ft_min_token_size | ||
| Variable Scope | Global | ||
| Dynamic Variable | No | ||
| Permitted Values | |||
| Type | numeric | ||
| Default | 3 | ||
| Min Value | 0 | ||
| Max Value | 16 | ||
FULLTEXT index. Increasing this value
          reduces the size of the index, thus speeding up queries, by
          omitting common word that are unlikely to be significant in a
          search context, such as the English words “a” and
          “to”. For content using a CJK (Chinese, Japanese,
          Korean) character set, specify a value of 1.
        innodb_ft_server_stopword_table
| Introduced | 5.6.4 | ||
| Command-Line Format | --innodb_ft_server_stopword_table=db_name/table_name | ||
| System Variable Name | innodb_ft_server_stopword_table | ||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | string | ||
| Default | NULL | ||
FULLTEXT index, in the
          format
          db_name/table_nameNote:
The stopword table must be an
InnoDB
            table, containing a single VARCHAR column
            named VALUE. The stopword table must
            exist before you specify its name in the configuration
            option value.innodb_ft_enable_stopword
| Introduced | 5.6.4 | ||
| Command-Line Format | --innodb_ft_enable_stopword=# | ||
| System Variable Name | innodb_ft_enable_stopword | ||
| Variable Scope | Global | ||
| Dynamic Variable | Yes | ||
| Permitted Values | |||
| Type | boolean | ||
| Default | ON | ||
InnoDB FULLTEXT
          index at the time the index is created. If the
          innodb_ft_user_stopword_table
          option is set, the stopwords are taken from that table. Else,
          if the
          innodb_ft_server_stopword_table
          option is set, the stopwords are taken from that table.
          Otherwise, a built-in set of default stopwords is used.
        ERROR! The server quit without updating PID file (/usr/local/mysql/data/server.local.pid).
當開啟mysql時遇到以下error
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/server.local.pid).
在網路上查了很多總解法都無效....
後來把ib_logfile0與ib_logfile1砍掉就搞定了
sudo rm -rf /usr/local/mysql/data/ib_logfile0
sudo rm -rf /usr/local/mysql/data/ib_logfile1
標籤:
mac os x server,
mysql
訂閱:
意見 (Atom)
