my blog my blog

Tag: 奶牛
罗曼蒂克消亡史——2019年总结

2020年伊始,奶牛对2019年做做总结。

马上就步入30岁了,越发觉得时间匆匆了,我恨不能时间停滞,让我再努力努力。

在过去的十年里,我觉得我的思想还是很浪漫的,倒不是说多无忧无虑,但也终归都把不快忘记,虽不满足于衣食无忧,却也得过且过地活着。

2019年宝宝降生,生活上也有很多改变,多了份做父亲的责任,也开始对未来有了更多思考。

过去的自己对钱看得并没有那么重,虽然并不是大手大脚的人,但是心理上觉得这东西真的就是那句话,“钱是王八蛋,没了咱再赚”。

可是2019年也是自己真正成长的一年,很多事看开了,很多东西却开始看重了。

说说教育,我们在学校里面学习的永远是怎么工作(至少大部分专业是学习如何从事一项工作的基本技能),但却从来没人教你怎么赚钱。

就像一圈人在打牌,打了好几圈了你还不知道赔钱的傻子是谁,那么你就是那个傻子。

我觉得2019年是我真正开始价值投资的一年,很多事情认清了之后就知道自己的方向了,虽然前路可能很艰辛,但是我依然充满激情。

对于IT圈的关注会逐渐从技术方面转移,慢慢向上层,向前沿,向未来进军。

巴菲特是不搞自己一眼看不明白的投资的,但是,我觉得既然很多东西自己还能明白一些,那么就去投投看看,我不相信互联网只有泡沫,比特币就是一个很好的例子,当然,其实我想说区块链。

关注大环境更多了,政策干预多数时候都是向好的,背道而驰必然行不通。

2019年,基金定投已有3年,成效初现,我仍然只能用自己的生命去验证自己的对错,希望自己可以活得久一些。

昨天看到一个名叫 “洛阳小散户”的投资者的文章,感觉自己的起步确实晚了一些,但是还不算太晚,人生真的就是阶段性的,你不到那个年纪,又没人给你指导,你肯定会走很多弯路,所以一定一定要多读书,读关于财富的书,然后心理学,数学,哲学,历史,管理学,经济学,感觉要涉猎的方面太多了,只是自己真的晚了很多,在过去的十年里,我看的最多的书都是关于IT技术的,不能说是浪费了很多时间,但是就未来来看,可能走偏了一些。

还好,还好,至少现在认清楚了很多。

我们的思维,大多时候就随着教育,被固化了,昨天看到一句话特别好:“困难不在于接受新思想,而在于摆脱旧思想”。

只希望在未来几年可以实现财富自由,可以有更多的时间可以去探索更多奇妙的领域,可以有更多的时间陪伴自己的孩子成长。​​​​

Ubuntu18.04编译安装PHP7.3.8

奶牛在踩坑过程中,请不要阻止。身为一个站长,一路以来一直使用LNMP来安装LNMP环境,深感羞耻,打算把该踩的坑都踩一踩,也学习一下该学习的东西。

今天是把OpenResty+PHP+Mysql的坑都踩了一遍,学到了不少东西,与君共勉。

需求环境安装

build-essential libcurl14 libcurl4-gnutls-dev openssl curl libbz2-dev libxml2-dev libjpeg-dev libpng-dev libfreetype6-dev libzip-dev libxslt1-dev

下载PHP7.3.8

wget https://www.php.net/distributions/php-7.3.8.tar.gz

解压

tar xzvf php-7.3.8.tar.gz

进入目录

cd php-7.3.8

编译安装

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/conf.d --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext  --enable-opcache --with-xsl
make
make test
make install
mkdir -p /usr/local/php/{etc,conf.d}
cp php.ini-production /usr/local/php/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
update-rc.d php-fpm default

防止Failed to start php.service: Unit php-fpm.service not found.类错误发生。

配置文件php.ini

贴上现有的配置,改自LNMP。

engine = On
short_open_tag = On
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 300
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 50M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
file_uploads = On
upload_max_filesize = 50M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension=fileinfo
[CLI Server]
cli_server.color = On

[Date]
date.timezone = PRC
[filter]
[iconv]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = -1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[dba]
[opcache]
[zend opcache]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/opcache.so"
opcache.force_restart_timeout=3600
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable=1
opcache.enable_cli=1
[curl]
[openssl]

关于fileinfo

这个默认是安装的,但是有说内存小于1G是不推荐安装的,编译会出错,但是fileinfo很有用,有些程序需要使用fileinfo,未安装会导致500错误。可以在configiure的时候使用–disable-fileinfo参数来禁止安装,但是没有–enable-fileinfo参数哦。

关于fileinfo手动安装

cd ./ext/fileinfo/
apt install autoconf
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make
make install

最后修改php.ini添加extension=fileinfo即可。

PHP configure参数详细列表

如下,以便速查

~/php/php-7.3.8# ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features and Packages:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libdir=NAME      Look for libraries in .../NAME rather than .../lib
  --disable-rpath         Disable passing additional runtime library
                          search paths
  --enable-re2c-cgoto     Enable -g flag to re2c to use computed goto gcc extension
  --disable-gcc-global-regs
                          whether to enable GCC global register variables

SAPI modules:

  --with-apxs2=FILE       Build shared Apache 2.0 Handler module. FILE is the optional
                          pathname to the Apache apxs tool apxs
  --disable-cli           Disable building CLI version of PHP
                          (this forces --without-pear)
  --enable-embed=TYPE     EXPERIMENTAL: Enable building of embedded SAPI library
                          TYPE is either 'shared' or 'static'. TYPE=shared
  --enable-fpm            Enable building of the fpm SAPI executable
  --with-fpm-user=USER    Set the user for php-fpm to run as. (default: nobody)
  --with-fpm-group=GRP    Set the group for php-fpm to run as. For a system user, this
                          should usually be set to match the fpm username (default: nobody)
  --with-fpm-systemd      Activate systemd integration
  --with-fpm-acl          Use POSIX Access Control Lists
  --with-litespeed        Build PHP as litespeed module
  --enable-phpdbg         Build phpdbg
  --enable-phpdbg-webhelper
                          Build phpdbg web SAPI support
  --enable-phpdbg-debug   Build phpdbg in debug mode
  --enable-phpdbg-readline   Enable readline support in phpdbg (depends on static ext/readline)
  --disable-cgi           Disable building CGI version of PHP
  --with-valgrind=DIR     Enable valgrind support

General settings:

  --enable-gcov           Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!
  --enable-debug          Compile with debugging symbols
  --with-layout=TYPE      Set how installed files will be laid out.  Type can
                          be either PHP or GNU [PHP]
  --with-config-file-path=PATH
                          Set the path in which to look for php.ini [PREFIX/lib]
  --with-config-file-scan-dir=PATH
                          Set the path where to scan for configuration files
  --enable-sigchild       Enable PHP's own SIGCHLD handler
  --enable-libgcc         Enable explicitly linking against libgcc
  --disable-short-tags    Disable the short-form <? start tag by default
  --enable-dmalloc        Enable dmalloc
  --disable-ipv6          Disable IPv6 support
  --enable-dtrace         Enable DTrace support
  --enable-fd-setsize     Set size of descriptor sets

Extensions:

  --with-EXTENSION=shared[,PATH]

    NOTE: Not all extensions can be build as 'shared'.

    Example: --with-foobar=shared,/usr/local/foobar/

      o Builds the foobar extension as shared extension.
      o foobar package install prefix is /usr/local/foobar/


  --disable-all           Disable all extensions which are enabled by default

  --disable-libxml        Disable LIBXML support
  --with-libxml-dir=DIR   LIBXML: libxml2 install prefix
  --with-openssl=DIR      Include OpenSSL support (requires OpenSSL >= 1.0.1)
  --with-kerberos=DIR     OPENSSL: Include Kerberos support
  --with-system-ciphers   OPENSSL: Use system default cipher list instead of hardcoded value
  --with-pcre-regex=DIR   Include Perl Compatible Regular Expressions support.
                          DIR is the PCRE install prefix BUNDLED
  --with-pcre-jit         Enable PCRE JIT functionality (BUNDLED only)
  --with-pcre-valgrind=DIR
                          Enable PCRE valgrind support. Developers only!
  --without-sqlite3=DIR   Do not include SQLite3 support. DIR is the prefix to
                          SQLite3 installation directory.
  --with-zlib=DIR         Include ZLIB support (requires zlib >= 1.2.0.4)
  --with-zlib-dir=<DIR>   Define the location of zlib install directory
  --enable-bcmath         Enable bc style precision math functions
  --with-bz2=DIR          Include BZip2 support
  --enable-calendar       Enable support for calendar conversion
  --disable-ctype         Disable ctype functions
  --with-curl=DIR         Include cURL support
  --enable-dba            Build DBA with bundled modules. To build shared DBA
                          extension use --enable-dba=shared
  --with-qdbm=DIR         DBA: QDBM support
  --with-gdbm=DIR         DBA: GDBM support
  --with-ndbm=DIR         DBA: NDBM support
  --with-db4=DIR          DBA: Oracle Berkeley DB 4.x or 5.x support
  --with-db3=DIR          DBA: Oracle Berkeley DB 3.x support
  --with-db2=DIR          DBA: Oracle Berkeley DB 2.x support
  --with-db1=DIR          DBA: Oracle Berkeley DB 1.x support/emulation
  --with-dbm=DIR          DBA: DBM support
  --with-tcadb=DIR        DBA: Tokyo Cabinet abstract DB support
  --with-lmdb=DIR         DBA: Lightning memory-mapped database support
  --without-cdb=DIR       DBA: CDB support (bundled)
  --disable-inifile       DBA: INI support (bundled)
  --disable-flatfile      DBA: FlatFile support (bundled)
  --disable-dom           Disable DOM support
  --with-libxml-dir=DIR   DOM: libxml2 install prefix
  --with-enchant=DIR      Include enchant support.
                          GNU Aspell version 1.1.3 or higher required.
  --enable-exif           Enable EXIF (metadata from images) support
  --disable-fileinfo      Disable fileinfo support
  --disable-filter        Disable input filter support
  --with-pcre-dir         FILTER: pcre install prefix
  --enable-ftp            Enable FTP support
  --with-openssl-dir=DIR  FTP: openssl install prefix
  --with-gd=DIR           Include GD support.  DIR is the GD library base
                          install directory BUNDLED
  --with-webp-dir=DIR     GD: Set the path to libwebp install prefix
  --with-jpeg-dir=DIR     GD: Set the path to libjpeg install prefix
  --with-png-dir=DIR      GD: Set the path to libpng install prefix
  --with-zlib-dir=DIR     GD: Set the path to libz install prefix
  --with-xpm-dir=DIR      GD: Set the path to libXpm install prefix
  --with-freetype-dir=DIR GD: Set the path to FreeType 2 install prefix
  --enable-gd-jis-conv    GD: Enable JIS-mapped Japanese font support
  --with-gettext=DIR      Include GNU gettext support
  --with-gmp=DIR          Include GNU MP support
  --with-mhash=DIR        Include mhash support
  --disable-hash          Disable hash support
  --without-iconv=DIR     Exclude iconv support
  --with-imap=DIR         Include IMAP support. DIR is the c-client install prefix
  --with-kerberos=DIR     IMAP: Include Kerberos support. DIR is the Kerberos install prefix
  --with-imap-ssl=DIR     IMAP: Include SSL support. DIR is the OpenSSL install prefix
  --with-interbase=DIR    Include Firebird support.  DIR is the Firebird base
                          install directory /opt/firebird
  --enable-intl           Enable internationalization support
  --with-icu-dir=DIR      Specify where ICU libraries and headers can be found
  --disable-json          Disable JavaScript Object Serialization support
  --with-ldap=DIR         Include LDAP support
  --with-ldap-sasl=DIR    LDAP: Include Cyrus SASL support
  --enable-mbstring       Enable multibyte string support
  --disable-mbregex       MBSTRING: Disable multibyte regex support
  --disable-mbregex-backtrack
                          MBSTRING: Disable multibyte regex backtrack check
  --with-onig=DIR         MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix.
                          If DIR is not set, the bundled oniguruma will be used
  --with-mysqli=FILE      Include MySQLi support.  FILE is the path
                          to mysql_config.  If no value or mysqlnd is passed
                          as FILE, the MySQL native driver will be used
  --enable-embedded-mysqli
                          MYSQLi: Enable embedded support
                          Note: Does not work with MySQL native driver!
  --with-mysql-sock=SOCKPATH
                          MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
                          If unspecified, the default locations are searched
  --with-oci8=DIR         Include Oracle Database OCI8 support. DIR defaults to $ORACLE_HOME.
                          Use --with-oci8=instantclient,/path/to/instant/client/lib
                          to use an Oracle Instant Client installation
  --with-odbcver=HEX      Force support for the passed ODBC version. A hex number is expected, default 0x0350.
                          Use the special value of 0 to prevent an explicit ODBCVER to be defined.
  --with-adabas=DIR       Include Adabas D support /usr/local
  --with-sapdb=DIR        Include SAP DB support /usr/local
  --with-solid=DIR        Include Solid support /usr/local/solid
  --with-ibm-db2=DIR      Include IBM DB2 support /home/db2inst1/sqllib
  --with-empress=DIR      Include Empress support \$EMPRESSPATH
                          (Empress Version >= 8.60 required)
  --with-empress-bcs=DIR  Include Empress Local Access support \$EMPRESSPATH
                          (Empress Version >= 8.60 required)
  --with-custom-odbc=DIR  Include user defined ODBC support. DIR is ODBC install base
                          directory /usr/local. Make sure to define CUSTOM_ODBC_LIBS and
                          have some odbc.h in your include dirs. f.e. you should define
                          following for Sybase SQL Anywhere 5.5.00 on QNX, prior to
                          running this configure script:
                            CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\"
                            LDFLAGS=-lunix
                            CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\"
  --with-iodbc=DIR        Include iODBC support /usr/local
  --with-esoob=DIR        Include Easysoft OOB support /usr/local/easysoft/oob/client
  --with-unixODBC=DIR     Include unixODBC support /usr/local
  --with-dbmaker=DIR      Include DBMaker support
  --disable-opcache       Disable Zend OPcache support
  --disable-opcache-file  Disable file based caching
  --disable-huge-code-pages
                          Disable copying PHP CODE pages into HUGE PAGES
  --enable-pcntl          Enable pcntl support (CLI/CGI only)
  --disable-pdo           Disable PHP Data Objects support
  --with-pdo-dblib=DIR    PDO: DBLIB-DB support.  DIR is the FreeTDS home directory
  --with-pdo-firebird=DIR PDO: Firebird support.  DIR is the Firebird base
                          install directory /opt/firebird
  --with-pdo-mysql=DIR    PDO: MySQL support. DIR is the MySQL base directory
                          If no value or mysqlnd is passed as DIR, the
                          MySQL native driver will be used
  --with-zlib-dir=DIR     PDO_MySQL: Set the path to libz install prefix
  --with-pdo-oci=DIR      PDO: Oracle OCI support. DIR defaults to $ORACLE_HOME.
                          Use --with-pdo-oci=instantclient,/path/to/instant/client/lib
                          for an Oracle Instant Client installation.
  --with-pdo-odbc=flavour,dir
                          PDO: Support for 'flavour' ODBC driver.
			  include and lib dirs are looked for under 'dir'.

			  'flavour' can be one of:  ibm-db2, iODBC, unixODBC, generic
			  If ',dir' part is omitted, default for the flavour
			  you have selected will be used. e.g.:

			    --with-pdo-odbc=unixODBC

			  will check for unixODBC under /usr/local. You may attempt
			  to use an otherwise unsupported driver using the 'generic'
			  flavour.  The syntax for generic ODBC support is:

			    --with-pdo-odbc=generic,dir,libname,ldflags,cflags

			  When built as 'shared' the extension filename is always pdo_odbc.so
  --with-pdo-pgsql=DIR    PDO: PostgreSQL support.  DIR is the PostgreSQL base
                          install directory or the path to pg_config
  --without-pdo-sqlite=DIR
                          PDO: sqlite 3 support.  DIR is the sqlite base
                          install directory BUNDLED
  --with-pgsql=DIR        Include PostgreSQL support.  DIR is the PostgreSQL
                          base install directory or the path to pg_config
  --disable-phar          Disable phar support
  --disable-posix         Disable POSIX-like functions
  --with-pspell=DIR       Include PSPELL support.
                          GNU Aspell version 0.50.0 or higher required
  --with-libedit=DIR      Include libedit readline replacement (CLI/CGI only)
  --with-readline=DIR     Include readline support (CLI/CGI only)
  --with-recode=DIR       Include recode support
  --disable-session       Disable session support
  --with-mm=DIR           SESSION: Include mm support for session storage
  --enable-shmop          Enable shmop support
  --disable-simplexml     Disable SimpleXML support
  --with-libxml-dir=DIR   SimpleXML: libxml2 install prefix
  --with-snmp=DIR         Include SNMP support
  --with-openssl-dir=DIR  SNMP: openssl install prefix
  --enable-soap           Enable SOAP support
  --with-libxml-dir=DIR   SOAP: libxml2 install prefix
  --enable-sockets        Enable sockets support
  --with-sodium=DIR       Include sodium support
  --with-password-argon2=DIR
                          Include Argon2 support in password_*. DIR is the Argon2 shared library path
  --enable-sysvmsg        Enable sysvmsg support
  --enable-sysvsem        Enable System V semaphore support
  --enable-sysvshm        Enable the System V shared memory support
  --with-tidy=DIR         Include TIDY support
  --disable-tokenizer     Disable tokenizer support
  --enable-wddx           Enable WDDX support
  --with-libxml-dir=DIR   WDDX: libxml2 install prefix
  --with-libexpat-dir=DIR WDDX: libexpat dir for XMLRPC-EPI (deprecated)
  --disable-xml           Disable XML support
  --with-libxml-dir=DIR   XML: libxml2 install prefix
  --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated)
  --disable-xmlreader     Disable XMLReader support
  --with-libxml-dir=DIR   XMLReader: libxml2 install prefix
  --with-xmlrpc=DIR       Include XMLRPC-EPI support
  --with-libxml-dir=DIR   XMLRPC-EPI: libxml2 install prefix
  --with-libexpat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated)
  --with-iconv-dir=DIR    XMLRPC-EPI: iconv dir for XMLRPC-EPI
  --disable-xmlwriter     Disable XMLWriter support
  --with-libxml-dir=DIR   XMLWriter: libxml2 install prefix
  --with-xsl=DIR          Include XSL support.  DIR is the libxslt base
                          install directory (libxslt >= 1.1.0 required)
  --enable-zend-test      Enable zend-test extension
  --enable-zip            Include Zip read/write support
  --with-zlib-dir=DIR     ZIP: Set the path to libz install prefix
  --with-pcre-dir         ZIP: pcre install prefix
  --with-libzip=DIR       ZIP: use libzip
  --enable-mysqlnd        Enable mysqlnd explicitly, will be done implicitly
                          when required by other extensions
  --disable-mysqlnd-compression-support
                          Disable support for the MySQL compressed protocol in mysqlnd
  --with-zlib-dir=DIR     mysqlnd: Set the path to libz install prefix

PEAR:

  --with-pear=DIR         Install PEAR in DIR [PREFIX/lib/php]
  --without-pear          Do not install PEAR

Zend:

  --enable-maintainer-zts Enable thread safety - for code maintainers only!!
  --disable-inline-optimization
                          If building zend_execute.lo fails, try this switch
  --disable-zend-signals  whether to enable zend signal handling

TSRM:

  --with-tsrm-pth=pth-config
                          Use GNU Pth
  --with-tsrm-st          Use SGI's State Threads
  --with-tsrm-pthreads    Use POSIX threads (default)

Libtool:

  --enable-shared=PKGS    Build shared libraries default=yes
  --enable-static=PKGS    Build static libraries default=yes
  --enable-fast-install=PKGS
                          Optimize for fast installation default=yes
  --with-gnu-ld           Assume the C compiler uses GNU ld default=no
  --disable-libtool-lock  Avoid locking (might break parallel builds)
  --with-pic              Try to use only PIC/non-PIC objects default=use both
  --with-tags=TAGS        Include additional configurations automatic


Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  YACC        The `Yet Another Compiler Compiler' implementation to use.
              Defaults to the first program found out of: `bison -y', `byacc',
              `yacc'.
  YFLAGS      The list of arguments that will be passed by default to $YACC.
              This script will default YFLAGS to the empty string to avoid a
              default value of `-d' given by some make applications.
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to the package provider.

 

 

Surface Pro 4 安装Kali Linux教程

关于Kali Linux

Kali Linux是基于Debian的Linux发行版, 设计用于数字取证操作系统。由Offensive Security Ltd维护和资助。最先由Offensive Security的Mati Aharoni和Devon Kearns通过重写BackTrack来完成,BackTrack是他们之前写的用于取证的Linux发行版 。
Kali Linux预装了许多渗透测试软件,包括nmap 、Wireshark 、John the Ripper,以及Aircrack-ng.[2] 用户可通过硬盘、live CD或live USB运行Kali Linux。Kali Linux既有32位和64位的镜像。可用于x86 指令集。同时还有基于ARM架构的镜像,可用于树莓派和三星的ARM Chromebook。

Surface Pro 4 设置关闭UEFI和TPM

按音量+键的同时按下开机键,Surface Pro 4 会进入Surface Pro 4的BIOS,在设置中可以关闭UEFI和TPM(貌似不关没法装Linux系统,有验证)

Surface Pro 4 设置U盘启动

同样的方法,按音量+键的同时按下开机键,Surface Pro 4 会进入Surface Pro 4的BIOS,在设置中可以设置从USB启动,这里操作就直接拖动就可以,支持触摸屏操作。

制作Kali Linux安装盘

推荐使用Rufus来进行Kali Linux的U盘制作,并使用DD模式,否则可能无法载入安装,只能进行Live。

Surface Pro 4安装Kali Linux

都是图形界面,就跟Ubuntu这些一样,没啥好说的,也没什么困难。只有一点,就是Windows要提前准备出一些空间,用Windows自带的计算机管理来压缩系统盘,然后就可以生成一些剩余空间来安装Kaili Linux了。

收尾

安装成功就结束了?不不不,不是这样子的,你会发现,你的触摸屏用不了,这个用不了,那个用不了,好吧,奶牛推荐个大神的Git:https://github.com/jakeday/linux-surface

奶牛为啥推荐大神的Git呢,因为看看人家都做了啥:

支持设备:

  • Surface Book
  • Surface Book 2
  • Surface Go
  • Surface Laptop
  • Surface Laptop 2
  • Surface Pro 3
  • Surface Pro 4
  • Surface Pro 2017
  • Surface Pro 6
  • Surface Studio

支持功能:

  • Keyboard (and backlight)
  • Touchpad
  • 2D/3D Acceleration
  • Touchscreen
  • Pen
  • WiFi
  • Bluetooth
  • Speakers
  • Power Button
  • Volume Buttons
  • SD Card Reader
  • Cameras (partial support, disabled for now)
  • Hibernate
  • Sensors (accelerometer, gyroscope, ambient light sensor)
  • Battery Readings
  • Docking/Undocking Tablet and Keyboard
  • Surface Docks
  • DisplayPort
  • USB-C (including for HDMI Out)
  • Dedicated Nvidia GPU (Surface Book 2)

不正常项目:

  • Dedicated Nvidia GPU (if you have a performance base on a Surface Book 1, otherwise onboard works fine)
  • Cameras (not fully supported yet)
  • Connected Standby is not supported yet

这个项目已经把Ubuntu或者Debian的内核更新到了5.1.15-1,可以从https://github.com/jakeday/linux-surface/releases进行下载。当然,人家也提供了一键脚本,https://github.com/jakeday/linux-surface/raw/master/setup.sh,脚本运行需要clone整个项目。具体看看人家的Git应该就能看明白了。

补充下grub分辨率问题,Surface Pro 4 的分辨率有些奇葩,经过配置发现修改/etc/default/grub文件,将

GRUB_GFXMODE=1024x768

然后重新生成grub.conf

grub-mkconfig -o /boot/grub/grub.cfg

重启之后就可以看到一个奶牛觉得比较习惯的Grub界面了。

BeagleBone-Black添加VNC支持教程

 

奶牛的BeagleBone-Black闲置了好久了,最近需要一个下载机,看了下NAS价格还是比较高的,成本有些高,而且功能也就那样吧,所以决定动用手上的BeagleBone-Black,挂移动硬盘的话还需要usb-hub供电才可以,直接插上接着就挂(估计是电流不够),手上的5.3V  2A的电源接在BeagleBone-Black上竟然还不够电流,只能靠外接了看样子。废话不多说了,写教程。

奶牛的BeagleBone-Black安装的是debian版本,所以ps -aux先看了下都运行了啥,发现了lightdm和openbox,这就好办了。

  1. vim /etc/lightdm/lightdm.conf 

将VNC的配置激活

 

  1. enabled=true 
  2. width=1366 
  3. height=768 
  4. depth=16 

port端口默认就好了,不影响。

然后电脑下载个tightvnc客户端就直接连接ip就可以了。那样子就不用给下载机接个屏啥的了。

bootstrap的tooltip需要手动激活才会生效

 

我说怎么按照官方的代码写都不出效果呢,你妹,原来tooltip要手动激活的好不好,还有那个popover,需要tooltip跟手动激活。

下面来说说那个tooltip的使用,先引用下官方的原话:

  1. For performance reasons,  
  2. the tooltip and popover data-apis are opt in,  
  3. meaning you must initialize them yourself. 

翻译过来就是:出于性能原因的考虑,tooltip和popover的data-apis是可选的,这就意味着你必须手动初始化它们。好吧,手动就手动吧,让人好伤感的手动,而且也没有预留的可选api,就自己写了一个最简单的,js新手,能用就好了。

打开bootstrap.js,搜索tooltip,然后在tooltip的最后添加如下代码:

  1. /* TOOLTIP API 
  2.  * =================== */  
  3. $('a[data-toggle=tooltip]').mouseover(function() { 
  4.  $(this).tooltip('show'); 
  5.   }) 

然后使用方法是:

  1. <a href="#" data-toggle="tooltip" title="http://www.nenew.net">奶牛博客</a> 

在a标签中增加data-toggle=“tooltip”,title为描述,然后就可以看到tooltip的效果了。

PS:JQuery确实好用很多,比如依据tag的选择,而且代码更加简练,好吧,希望有时间可以细致的学习下,最近看了好多东西,脑子有点儿乱,实现一样是一样吧。

Kernel首页换新颜

 

RT,kernel首页换了新主题,呃,从订阅里面看到的。

很多朋友可能没自己编译过内核,也对内核具体是个什么东东不是很了解。奶牛引用下wiki介绍:

内核(Kernel)在计算机科学中是操作系统最基本的部分,主要负责管理系统资源。它是为众多应用程序提供对计算机硬件的安全访问的一部分软件,这种访问是有限的,并由内核决定一个程序在什么时候对某部分硬件操作多长时间。直接对硬件操作是非常复杂的。所以内核通常提供一种硬件抽象的方法,来完成这些操作。通过进程间通信机制及系统调用,应用进程可间接控制所需的硬件资源(特别是处理器及IO设备)。 

严格地说,内核并不是计算机系统中必要的组成部分。程序可以直接地被调入计算机中执行;这样的设计,说明了设计者不希望提供任何硬件抽象和操作系统的支持;它常见于早期计算机系统的设计中。最终,一些辅助性程序,例如程序加载器和调试器,被设计到机器核心当中,或者写入在只读记忆体里。这些变化发生时,操作系统内核的概念就渐渐明晰起来了。

kernel.org是linux内核的维护页面,感兴趣的朋友可以去看看,话说linux kernel就跟赶着投胎一样,竟然都飙到3.8版本了….

CS:GO入手体验篇

 

说FPS类游戏,奶牛玩过的游戏不多,就拿cs1.6跟cf与CS:GO做简单的比较吧。

首先是画面,玩儿惯了cs1.6跟cf,一上手CS:GO真心觉得不习惯,因为画面太真实。街景的布置,光线什么的都蛮好的,回头看cf感觉就像在一个玩具场景一样,体验完全不一样。而且就分辨率而言,感觉cf就是渣,永远是800×640自动换,分辨率很别扭,虽然游戏中感觉不明显,但是系统的分辨率来回切真的好烦人。CS:GO则不同,分辨率完胜,自适性相当好。

说一下重力跟移动,cs1.6感觉重力还是正常的,cf总是觉得飘,就没有那种实实在在的感觉,虽然玩儿好点儿的都听脚步,但是还是觉得真实性比较差,而且游戏节奏偏快速。CS:GO的重力不仅是正常,连奔跑中的不稳定都能提现得很好,更增加真实感,在节奏调控方面也蛮好的,游戏节奏比较适中。

再就说武器了,CS:GO的武器变化感觉还是比较大的,而且武器真的需要重新适应了,像m4a4 ak47的射速跟威力,与以前的感觉有很大不同,可能是打cf顺手了,感觉CS:GO的射速偏快,威力偏小,估计可能是cf爆头率比较高的关系,一般上半身就算不爆头掉血也很多,CS:GO还没有太熟悉过来,不过因为场景太真实了,发现我辨别敌人的能力有些差,特别是雷达,有时候敌人出来了雷达还没反应,很纠结哇,需要适应。还有闪光,闪光简直逼真的跟神马似的,全屏白,不过躲闪会比较容易,背身就搞定了,手雷炸到就是半管儿血,还有燃烧弹。

投入方面:CS 1.6的时候纯盗版,cf如果是RMB玩家的话投入绝对相当大,CS:GO奶牛个人感觉投入一次真的还算值啦,而且现在半价,机不可失哇,乌咔咔~~~~

来吧,喜欢fps滴朋友都买起啦,咱组个战队神马的,虐下棒子鬼子神马的。

2013,我们要让自己充实起来

 

转眼转眼转眼,2013来了。

跨年是个辛苦的事儿,为了能轻松的度过那一天,你要煎熬365天,虽然偷懒神马的是必不可少的功课,但是真心学到些什么才是最重要的。眼看着大学的最后一节课上完了,最后一门考试考完了,之后就是最后的课程设计,还有最后的毕业设计,我知道,接下来很多东西其实都是个形式了,很舍不得过完这一年,但是,我们总要面对新生活不是。

————————-学校————————-

记得去年过春节的时候,看着春晚,聊着手机QQ还很不亦乐乎,跟兄弟们一起大聚了两次都很happy很畅快。之后就是大三的下学期了,是我学到最多东西的一个学期,也是大学中最充实的学期,功课也很努力,还自己买了个单片机的板子像模像样滴每天鼓捣下。有点儿感兴趣的东西学着总是很幸福的事儿,至少比起为了达到某种目的的学习要来得轻松,所以我一直是觉得兴趣最重要,因为它会让你有主动性,而非被动无奈滴学习接受。

下半年就是这个快过完的大四上学期,就两门课,一门学了,一门没怎么学,不过最后突击的时候还是了解了很多东西,因为对硬件的兴趣不大,对软件的兴趣也不大,所以,o(︶︿︶)o 唉,不扯淡了,过了就好。感觉自己学东西总是太松散,什么都没有太深入,其实感觉深入下linux系统应该挺有搞头的,特别是那么强大的定制型,搞个神马自动控制家庭各种设备的东东应该会拽,但是,说实话,有些浮躁了。估计是最近两个月干的活让人比较蛋疼吧,没有时间干自己想干的事儿,不过总算熬过来了,现在一身轻松,可以想做些什么就做些什么了。嘎嘎~~~

————————-感情————————-

感情上不是太顺利,年初的时候矛盾就开始有了各种苗头,然后,果然,半年之后分手了,到现在我也很难释怀,很难走出来,总觉得一切都还在昨天,只是,我们需要一些时间把各自的坐标确定下,然后,一切就又都会正常一样。也不晓得之后之后之后会是什么样子。我耐心等着,还在这里,只等你累了回头看。

————————-朋友————————-

身边的朋友真的越来越少了,个人都有个人的忙,还是宿舍好一些,至少有人陪下会让人不那么寂寞。现在只有Raya每天陪着自己说话,挺感谢她滴,难得有很多共同的爱好,心里开心或者不开心都会互相吐槽互相安慰,写着一头奶牛跟一只猫的故事。

同学呢,虽然在一起的时候有时候觉得某某人会很傻x某某人做事儿很磨叽某某人各种不讲理,但是呢,他们都出去了,还真挺想他们的,也许就是那些傻乎乎磨磨唧唧不讲理才是生活的乐趣。没了还就真的会想念。估计明年这个时候就只剩下怀念了。

————————-目标————————-

1.工作

2.出去走走

3.开始学怎么玩儿跟生活(发现我是个极其不会娱乐的人,而且生活一团糟)

4…….待续

圣诞快乐

 

Merry Christmas Guys.

世界末日已过,那些该珍惜的是不是已经在你心中更加明确了,那些该忘却的是否真的已经淡出你的生活,重生下总是好的,至少在心理上我觉得我们都应该更坦然一些了。

时光荏苒,马上就2013了,马上就要毕业了,2012年奶牛收获很多,奶牛也失去很多,我不想自己明年仍旧这么无法自拔滴度日。

工作吧,让自己踏实下来,现在最最希望的就是有稳定的生活,仿佛一年老了很多呢,不再那么想着想那的了,只觉得稳定些比什么都好。

看着自己瘦的时候还是蛮好滴,现在胖到自己都不想看自己了,讨厌讨厌,明年一定要瘦下来才行。减掉三十斤俺就知足了。

平安夜,木有苹果,吃个橘子凑合下了~~~

BIOS跟Ubuntu无关

 

今天weibo吐槽了一个人,实在有些看不下去了,虽然这几年来在网上看到关于操作系统的吐槽不少,但是从来就没见过这么低水平的吐槽。引用下:

作者的原话:ubuntu连BIOS都找不到。。。。。。。。这怎么改 优先 光驱 日了

我转发顺便评论了下:ubuntu 连开机键都找不到 。。。。。。。。这怎么开机哇 日了

收到作者的回复:呵呵 我就不信@奶牛博客 生来就会用UBUNTU 。。。。以自己的强项去吐槽别人的弱项 是显得你的强大伟岸呢 还是什么心理阴暗 幸灾乐祸 真是林大什么鸟都有

好吧,就到这。现在作者把原微博已经删除了,无处可寻,但是,奶牛仅就此时谈谈感想。

本来只是想娱乐下大众,没想到收到如此的回复,呵呵一笑带过一千只乌鸦飞过的感觉。自始至终,我都觉得自己有很多东西要学,我知道自己有多少东西不会有多少东西不知道有多少方向要努力,我也懒得用自己宝贵的时间去跟你争论什么强项弱项,三年来积累写下的文章有小600篇了,不晓得对各位有多少帮助,但是我觉得我还算是比较热心跟有爱心的。一个知道可以在BIOS里面改启动优先级的人竟然都不知道BIOS跟操作系统无关,这个可以不怪你,但是不要拿这么愚蠢的问题来吐槽一个压根儿不适合你的操作系统可以么?你不觉得这个操作系统很无辜么?你可以说你不会用,你也可以求助询问如何使用,但是请不要这么装13似的无知的告诉别人ubuntu就像垃圾一样。科普下什么是BIOS:

  1. BIOS是英文"Basic Input Output System"的缩略语 
  2. 中文名称就是"基本输入/输出系统" 
  3. 它是一组固化到计算机内主板上一个ROM芯片上的程序 
  4. 它保存着计算机最重要的基本输入输出的程序、系统设置信息、开机后自检程序和系统自启动程序。 
  5. 其主要功能是为计算机提供最底层的、最直接的硬件设置和控制。 

从上面的百科介绍,我们可以知道BIOS是一个ROM芯片上的程序,固化在了主板上的硬件上,所以就算你的硬盘是完全空白的,BIOS仍旧是可以正常工作的。而对于操作系统而言,跟BIOS并没有直接关系。

那个作者所说的启动优先级是BIOS设置中常用的一个设置方面,可以通过设置boot的顺序来改变先启动什么硬件。比如你有光驱,有优盘,有硬盘,还有网络,这四种最常见的启动方式,如果你的硬盘放在第一启动项,那么就算你把安装光盘放进了光驱,重新启动,仍旧是从硬盘先启动而非你的光盘,这也就是启动顺序的一个比较好的一个例子了。裸机一般都会在硬盘装有操作系统,就像现在很多厂商为了降低笔记本的价格,从而安装linux操作系统,比如像奶牛前阵子接触的那个meego系统的机子一样。如何知道怎么进入BIOS呢,可以开机的时候看看最先出来的那行提示就知道了。

好了,科普结束。Linux操作系统本来就不是适合每个人用的,那些根本还不知道什么是linux还想着装B的筒子无权吐槽。

[mp3 auto=1]http://blog.96911.com/blog_musfile/89811004.mp3?ickey=1[/mp3]