如果你选mysql数据库作为数据持久化的工具,那么就需要一个合理的日志配置,这样有助于排错和数据备份及恢复!
首先我们可以通过下面的MySQL的sql查询正在运行中的日志配置。
刚好我们熟悉一下SHOW VARIABLES LIKE的用法!这个命令是用来查询MySQL运行时配置的语句,LIKE后面的可以接通配符查找!
还有对应的设置语法叫SET GLOBAL,后面我们会用到。
mysql> SHOW VARIABLES LIKE '%log%'; +-----------------------------------------+---------------------------------+ | Variable_name | Value | +-----------------------------------------+---------------------------------+ | back_log | 50 | | binlog_cache_size | 32768 | | binlog_direct_non_transactional_updates | OFF | | binlog_format | STATEMENT | | expire_logs_days | 0 | | general_log | OFF | | general_log_file | /var/run/mysqld/mysqld.log | | innodb_flush_log_at_trx_commit | 1 | | innodb_locks_unsafe_for_binlog | OFF | | innodb_log_buffer_size | 1048576 | | innodb_log_file_size | 5242880 | | innodb_log_files_in_group | 2 | | innodb_log_group_home_dir | ....
约定几个目录
/usr/local/php/sbin/php-fpm /usr/local/php/etc/php-fpm.conf /usr/local/php/etc/php.ini
...
osx系统有些配置文件地方和Linux系统不太一样真是让人捉急
以VIM为例
...
准备 PHP的安装最头疼的就是因为某些类库没有安装而报错,所以编译前请确保以下包已安装
yum groupinstall "development tools" yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses curl curl-devel openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel 编译 高大上的编译选项
./configure \ --prefix=/usr/local/php \ --enable-fpm \ --with-curl \ --with-openssl \ --enable-mbregex \ --with-mysql \ --with-mysqli \ --with-mysql-sock \ --enable-pdo \ --with-pdo-mysql \ --with-pdo-pgsql \ --with-pdo-sqlite \ --enable-mysqlnd \ --with-gd \ --enable-gd-native-ttf \ --enable-exif \ --with-jpeg-dir=/usr/local/jpeg \ --with-png-dir=/usr/local/png \ --with-freetype-dir=/usr/local/freetype \ --enable-gd-jis-conv \ --with-gettext \ --with-zlib \ --enable-zip \ --with-bz2 \ --disable-fileinfo \ --enable-xmlreader \ --enable-xmlwriter \ --with-xmlrpc \ --enable-mbstring \ --enable-inline-optimization \ 20150524更新 5....
This article is post on https://coderwall.com/p/ggmpfa
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
yum -y install libxslt-devel
configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
yum -y install net-snmp-devel
configure: error: Please reinstall readline - I cannot find readline.h
yum -y install readline-devel
configure: error: Cannot find pspell
yum -y install aspell-devel
checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext....