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认证和信息系统项目管理师,英文学习上感觉进步不大。家庭上,女儿的教育方面思路清晰了一些,但又没有太多时间来完全实践。同时忙于多件事情,经常是每件事情都没有办法投入很多时间,都做不到自己满意的程度。
认真总结起来这一年,只好说两个字“瞎忙”
Organizational Behavior 15th edition, Chapter 1 What is Organizational behavior
Effective versus Successful Managerial Activities
Fred Luthans and his associates looked at what managers do from a somewhat different perspective. 9 They asked, “Do managers who move up the quickest in an organization do the same activities and with the same emphasis as managers who do the best job?” You might think the answer is yes, but that’s not always the case.
Luthans and his associates studied more than 450 managers. All engaged in
four managerial activities:
1. Traditional management. Decision making, planning, and controlling.
2. Communication. Exchanging routine information and processing paperwork.
3. Human resource management. Motivating, disciplining, managing conflict, staffing, and training.
4. Networking. Socializing, politicking, and interacting with outsiders.
The “average” manager spent 32 percent of his or her time in traditional management activities, 29 percent communicating, 20 percent in human resource management activities, and 19 percent networking. However, the time and effort different individual managers spent on those activities varied a great deal. As shown in Exhibit 1-2 , among managers who were successful (defined in terms of speed of promotion within their organization), networking madethe largest relative contribution to success, and human resource management activities made the least relative contribution. Among effective managers (defined in terms of quantity and quality of their performance and the satisfaction and commitment of employees), communication made the largest relative contribution and networking the least. More recent studies in Australia,Israel, Italy, Japan, and the United States confirm the link between networking and social relationships and success within an organization. 10 And the connection between communication and effective managers is also clear. A study of 410 U.S. managers indicates those who seek information from colleagues and employees—even if it’s negative—and who explain their decisions are the most effective. 11
This research offers important insights. Successful managers give almost the opposite emphases to traditional management, communication, human resource management, and networking as do effective managers. This finding challenges the historical assumption that promotions are based on performance, and it illustrates the importance of networking and political skills in getting ahead in organizations.