作者: dean

  • We are human

    It is believed that psychology can help people have a better understanding of human natures. For the first time, I know the ideal me and the real me.

    I said I need nothing from you. you don’t need to make a change for me. Actually, that’s not true, we all have needs, and an unchecked need is more dangerous than an explicit demand.

  • Gitlab 上nginx反向代理

    Gitlab以8080端口启动。通过反向代理配置使用/git目录来进行访问。共用nginx

    nginx上增加以下配置

    location ~ /git {
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://localhost:8181;
            }

    gitlab.rb

    external_url 'http://us3.xiaohui.org/git'
    nginx['listen_port'] = 8181 #

     

     

     

  • CentOS 7 上新建通过HTTPS访问的Git Server

    1. 安装Fastcgiwrap

     

    yum install fcgi-devel spawn-fcgi
    
    git clone git://github.com/gnosek/fcgiwrap.git
    
    cd fcgiwrap
    
    autoreconf -i
    
    ./configure
    
    make
    
    make install

    vi /etc/init.d/fcgiwrap

    #! /bin/sh
    # chkconfig: 2345 55 25
    DESC="fcgiwrap daemon"
    DEAMON=/usr/bin/spawn-fcgi
    PIDFILE=/var/run/spawn-fcgi.pid
    FCGI_SOCKET=/var/run/fcgiwrap.socket
    FCGI_PROGRAM=/usr/local/sbin/fcgiwrap
    FCGI_USER=www
    FCGI_GROUP=www
    FCGI_EXTRA_OPTIONS="-M 0770"
    OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P $PIDFILE -- $FCGI_PROGRAM"
    do_start() {
     $DEAMON $OPTIONS || echo -n "$DESC already running"
    }
    do_stop() {
     kill -INT `cat $PIDFILE` || echo -n "$DESC not running"
    }
    case "$1" in
     start)
      echo -n "Starting $DESC: $NAME"
      do_start
      echo "."
      ;;
     stop)
      echo -n "Stopping $DESC: $NAME"
      do_stop
      echo "."
      ;;
     restart)
      echo -n "Restarting $DESC: $NAME"
      do_stop
      do_start
      echo "."
      ;;
     *)
      echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
      exit 3
      ;;
    esac
    exit 0

    start fcgiwrap

    nginx.conf

    location ~ /git(/.*) {
        auth_basic "Restricted";
        fastcgi_pass  unix:/var/run/fcgiwrap.socket;
        auth_basic_user_file /etc/nginx.passwd;
        include       fastcgi_params;
        fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
        fastcgi_param GIT_PROJECT_ROOT    /var/git-repos;
        fastcgi_param GIT_HTTP_EXPORT_ALL true;
        fastcgi_param PATH_INFO           $1;
        fastcgi_param REMOTE_USER $remote_user;

     

    cd /var/git-repos
    git init --bare my-project.git
    htpasswd -c /etc/nginx.passwd user1

    restart nginx

    git clone https://www.xiaohui.org/git/my-project.git

     

     

     

     

     

     

     

    http://qiita.com/egnr-in-6matroom/items/2a052339ee0515b31fdf

  • 2015的最后一天

    2015的最后一天,公司里稍显平静,不少人已经提前请假过元旦了。

    回想下这一年忙了些什么,思绪万千,学业上研究生是最后一年,工作上考了项目管理专业上的PMP认证和信息系统项目管理师,英文学习上感觉进步不大。家庭上,女儿的教育方面思路清晰了一些,但又没有太多时间来完全实践。同时忙于多件事情,经常是每件事情都没有办法投入很多时间,都做不到自己满意的程度。

    认真总结起来这一年,只好说两个字“瞎忙”