anchor.diff:    && echo "set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936" >> ~/.vimrc \
     && echo "set fileformats=unix,dos" >> ~/.vimrc
   
  -# copy packages
  -
  +# copy packages to /usr/src/
   COPY packages/* /usr/src/
   
  -# install libs
  -
  -RUN cd /usr/src/ \
  -  && tar zxvf libmcrypt-2.5.8.tar.gz \
  -  && cd libmcrypt-2.5.8/ \
  -  && ./configure && make && make install \
  -  && /sbin/ldconfig \
  -  && cd libltdl/ \ 
  -  && ./configure --enable-ltdl-install \
  -  && make && make install
  -
  -RUN cd /usr/src/ \
  -  && tar zxvf mhash-0.9.9.9.tar.gz
  -  && cd mhash-0.9.9.9/
  -  && ./configure && make && make install
  +# install libs before php and mysql
  +
  +WORKDIR /usr/src/
  +RUN tar zxf libmcrypt-*.tar.gz
  +WORKDIR libmcrypt-2.5.8/
  +RUN ./configure \
  +  && make \
  +  && make install
  +  && /sbin/ldconfig
  +WORKDIR libltdl/
  +RUN ./configure --enable-ltdl-install && make && make install
  +
  +WORKDIR /usr/src/
  +RUN tar zxf mhash-*.tar.gz
  +WORKDIR mhash-0.9.9.9/
  +RUN ./configure && make && make install
   
   RUN ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la \
     && ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so \
  
positive.code:   && chown -R www:www /u01/www
  
  WORKDIR /usr/src/ 
  RUN tar zxvf php-7.*.tar.gz \
    && cd php-7.*/ \
    && ./configure --prefix=/usr/local/webserver/php7 \
       --with-config-file-path=/usr/local/webserver/php7/etc \
       --with-libdir=lib64 \
       --enable-fpm \
       --with-fpm-user=www \
       --with-fpm-group=www \
       --enable-mysqlnd \
       --with-mysqli=mysqlnd \
       --enable-pdo \
       --with-pdo-mysql=mysqlnd \
       --enable-opcache \
       --enable-pcntl \
       --enable-mbstring \
       --enable-soap \
       --enable-zip \
       --enable-calendar \
       --enable-bcmath \
       --enable-exif \
       --enable-ftp \
       --enable-intl \
       --enable-xml \
       --enable-sockets \
       --with-xmlrpc \
       --with-openssl \
       --with-zlib \
       --enable-mbregex \
       --with-curl \
       --with-gd \
       --with-zlib-dir=/usr/lib \
       --with-png-dir=/usr/lib \
       --with-jpeg-dir=/usr/lib \
       --with-freetype-dir=/usr/include/freetype2/ \
       --with-gettext \
       --with-mhash \
       --with-mcrypt \
       --with-ldap \
       --disable-ipv6 \
    && make -j `nproc`
    && make install
  
  RUN cp php.ini-production /usr/local/webserver/php7/etc/php.ini \
    && cp /usr/local/webserver/php7/etc/php-fpm.conf.default /usr/local/webserver/php7/etc/php-fpm.conf
    && cp /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default /usr/local/webserver/php7/etc/php-fpm.d/www.conf
  
  RUN sed -i '/^;pid/s/^;//' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;error_log/s/^;//' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;emergency_restart_threshold/c\emergency_restart_threshold = 60' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;emergency_restart_interval/c\emergency_restart_interval = 60' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;process/c\process_control_timeout = 5s' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;daemonize/s/^;//' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^;rlimit_files/c\rlimit_files = 65535' /usr/local/webserver/php7/etc/php-fpm.conf
  RUN sed -i '/^pm =/c\pm = static' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^pm.max_children/s/[0-9]\+$/256/' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^pm.start_servers/s/[0-9]\+$/20/' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^pm.min_spare_servers/s/[0-9]\+$/5/' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^pm.max_spare_servers/s/[0-9]\+$/35/' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^;pm.process_idle_timeout/s/^;//' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^;pm.max_requests/c\pm.max_requests = 51200' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  RUN sed -i '/^;request_terminate_timeout/s/^;//' /usr/local/webserver/php7/etc/php-fpm.d/www.conf.default
  
  RUN cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm \
    && chmod +x /etc/init.d/php-fpm \
  
negative.code: }
  EOF
  
  # nginx log rotation
  
  RUN cat > /usr/local/webserver/nginx/cut_nginx_log.sh <<\EOF
  #!/bin/bash
  # cut_nginx_log.sh
  # This script run at 00:00
  