这个是网上认识的离婚分居两年可以自动离婚了,说什么自己做老板辛苦点挣钱找老婆好好过子就行,我说没钱啊,什么也不会,

相关文章推荐:
win7 git服务器
首先安装配置好gitlab服务器,可以参看上篇博文。通过root账号登陆gitlab后可以创建账号、群组、项目等,创建的账号会收到gitlab发送的邮件,通过邮件中的链接进入gitlab修改密码后账号就激活可以使用了。
然后项目负责人可以创建项目并且上传代码,默认是在master分支下,但是我们的开发需要创建一个develop分支,等一个版本开发完毕后再合并到master分支上。
好了,下面说一下一般的开发人员在win7下如何使用...
阅读(3480) 回复(0)
其他文章推荐
硬件需求:一台linux Ubuntu电脑(虚拟机),在公司局域网内有独立IP,并且保证小组每个人都能ping通;软件需求:git-core, gitosis, openssh-server, openssh-client安装git和openssh:a@ubuntu:~$ sudo apt-get install git-corea@ubuntu:~$ sudo apt-get install openssh-servera@ubuntu:~$ sudo apt-get install openssh-client新加用户git,该用户将作为所有代码仓库和用户权限的管理者:a@ubuntu:~$ sudo useradd -m git...
阅读(180) 回复(0)
本文介绍通过win7自带的IIS来搭建一个只能实现基本功能的FTP服务器,第一次装好win7后我愣是没整出来,后来查了一下网上资料经过试验
后搭建成功,其实原理和步骤与windows前期的版本差不多,主要是对新的操作系统还不是很熟悉。相信用过win7一段时间的都能独立解决掉。
主要分为4个步骤
1.安装FTP服务
2.在IIS控制面板里添加FTP站点
3.配置FTP站点
阅读(150) 回复(0)
导语:用了这么久的git,总结了下最基本的搭建迁移。
一、软件下载
gitolite(git 服务管理工具)下载: git clone git://git<//sitaramc/gitolite
http://git-/
gitweb下载:
git clone git://git.kernel.org/pub/scm/git/git.git
gitweb样式下载:
https://git<//kogakure/gitweb-theme
git官方中文文档
gitweb官方中文文档
创建git账号
groupadd g...
阅读(0) 回复(0)
win7下访问Samba服务器总提示用户名和密码总是不对。
修改步骤如下:
单击[开始]——[运行] 输入 “secpol.msc”打开管理工具,展开“本地策略”;
然后,单击“安全选项”。 双击“网络安全:LAN Manager 身份验证级别”;
最后,单击列表中:发送LM和NTLMv2,如果已协商,则使用NTLMv2协议。
此答案来自于网上,感谢互联网上无私的同行。...
阅读(30) 回复(0)
git服务器搭建和使用
来源:Linux社区
作者:hjgblog
[字体:大 中 小]
git是一种分布式版本管理器,功能非常强大,最初由Linus开发。它的版本管理在本地,不需要像SVN那样必须要从中央服务器上下载版本。
linux安装git很建档,配置好Yum,直接yum install git既可以了
git的使用技巧
初始化版本库
服务器与存储
阅读(60) 回复(0)
win7有库的设置,很贴心。但它默认的位置是C盘,很占空间。如果可以新建一个磁盘分区,那就可以更方便的使用电脑。本文,小编就来为你解决这个问题“win7怎么创建新的磁盘分区”,具体请看下面的“新建磁盘分区图文教程”。
具体方法:
第一步、鼠标右键点击桌面上“计算机”,选中“管理”,即可打开“计算机管理”窗口。
第二步、在“计算机管理”窗口的左侧,我们点击“磁盘管理”,让系统计算磁盘分区情况...
Windows平台
阅读(30) 回复(0)
git server 安装配置
1、切换到root用户
stevenrao@server:~$
2、创建git组
root@server:~$
groupadd git
root@server:~$
groupadd user
3、添加git账户
root@server:~$ useradd git -g git -m -s /bin/bash
root@server:~$ usermod -G git,user git #把git同时加入git组和user组
root@server:~$ passwd git #设置密码
4、添加到sudoers用户中去,尽量不要用root操作
root@server:~$ vim /etc/sudo...
阅读(0) 回复(0)
&span style=&font-family:宋体;&& &br /&
&p align=&center& style=&margin:0cm 0cm 0text-align:&&
&b style=&mso-bidi-font-weight:&&&span style=&color:#00B0F0;font-family:宋体;mso-ascii-theme-font:major-mso-fareast-theme-font:major-mso-hansi-theme-font:major-&&优盘刻录&span lang=&EN-US&&win7&/span&系统盘&/span&&/b&
&span style=&font...
Windows平台
阅读(0) 回复(0)
win7系统盘清理技巧:
删除还原点可以减少系统盘的空间。还原点的删除:操作如下:我的电脑-&属性-&高级系统设置-&系统保护-&配置-&删除(还可以:程序-附件-系统工具-磁盘清理-选中系统盘-确定-选择要删除的垃圾-清理系统文件-选中系统盘-确定-其他选项-清理(第2个))
为什么我的C盘空间越来越少?每次启动windows 7,什么都没做,甚至还卸载了一些软件,却发现C盘空间变的更大了。难道装了win7,C盘就得越...
Android平台
阅读(0) 回复(0)
  win7文件夹怎么加密
现在是全民互联网时代,就连妈妈辈的人都会上淘宝买东西了,日常的工作根本离不开电脑。企业信息化也成为了许多中小企业提升自身的竞争力的重要手段。然而,在快步进入信息时代的过程中,一些中小企业开始一味地追求信息化管理系统的实际应用,却忽略了整个网络信息系统的安全与保密,一旦出现问题其后果不堪设想。如果个人意识到这一点就应该马上付出行动,但是w7的系统文件夹怎么加密呢?
阅读(0) 回复(0)
盛拓传媒:
北京皓辰网域网络信息技术有限公司. 版权所有
北京市公安局海淀分局网监中心备案编号:
广播电视节目制作经营许可证:编号(京)字第1149号
ITPUB推荐文章解答你所有技术难题使用GitHub - 廖雪峰的官方网站
使用GitHub
我们一直用GitHub作为免费的远程仓库,如果是个人的开源项目,放到GitHub上是完全没有问题的。其实GitHub还是一个开源协作社区,通过GitHub,既可以让别人参与你的开源项目,也可以参与别人的开源项目。
在GitHub出现以前,开源项目开源容易,但让广大人民群众参与进来比较困难,因为要参与,就要提交代码,而给每个想提交代码的群众都开一个账号那是不现实的,因此,群众也仅限于报个bug,即使能改掉bug,也只能把diff文件用邮件发过去,很不方便。
但是在GitHub上,利用Git极其强大的克隆和分支功能,广大人民群众真正可以第一次自由参与各种开源项目了。
如何参与一个开源项目呢?比如人气极高的bootstrap项目,这是一个非常强大的CSS框架,你可以访问它的项目主页,点“Fork”就在自己的账号下克隆了一个bootstrap仓库,然后,从自己的账号下clone:
git clone :michaelliao/bootstrap.git
一定要从自己的账号下clone仓库,这样你才能推送修改。如果从bootstrap的作者的仓库地址:twbs/bootstrap.git克隆,因为没有权限,你将不能推送修改。
Bootstrap的官方仓库twbs/bootstrap、你在GitHub上克隆的仓库my/bootstrap,以及你自己克隆到本地电脑的仓库,他们的关系就像下图显示的那样:
如果你想修复bootstrap的一个bug,或者新增一个功能,立刻就可以开始干活,干完后,往自己的仓库推送。
如果你希望bootstrap的官方库能接受你的修改,你就可以在GitHub上发起一个pull request。当然,对方是否接受你的pull request就不一定了。
如果你没能力修改bootstrap,但又想要试一把pull request,那就Fork一下我的仓库:,创建一个your-github-id.txt的文本文件,写点自己学习Git的心得,然后推送一个pull request给我,我会视心情而定是否接受。
在GitHub上,可以任意Fork开源仓库;
自己拥有Fork后的仓库的读写权限;
可以推送pull request给官方仓库来贡献代码。
Make a Comment
Sign In to Make a Comment
You can sign in directly without register:
You need authorize to allow connect to your social passport for the first time.
WARNING: You are using an old browser that does not support HTML5.
Please choose a modern browser ( /
/ ) to get a good experience.Git,Github和Gitlab简介和基本使用 - 简书
Git,Github和Gitlab简介和基本使用
-- 作者 谢恩铭 转载请注明出处
这年头不知道Git, 还真不好意思出门跟人家打招呼!
不过假如您不知道, 或者不是太清楚, 那也没关系。可以先跟我打个招呼, 看完这篇文章, 就可以跟别人去打招呼了。:P
Git是一个版本控制系统(Version Control System,VCS)。
版本控制是一种记录一个或若干文件内容变化,以便将来查阅特定版本修订情况的系统。
多年前,我在法国做第一个实习时(2011年),那时候自己编程还在入门阶段,根本没听过版本控制系统。
那时候真是蠢(现在也没好到哪里去),每次修改多一点的代码,就要复制、黏贴整个项目目录。因此,公司的电脑里有着几十个项目的副本(简直了)。
前不久,我看到公司的一个实习生也在做和我多年前同样的事。而且我们问他,他说没听说过版本控制系统...
现在,我用Git也有几年了吧。绝对是越用越爽,不用不爽;一朝使用,爱不释手。
每天到公司第一件事,开电脑;第二件事,在终端中切换到项目目录,然后输入Git命令。
有了版本控制系统,就可以不用担心文件丢失,不小心误修改文件等等“事故”,而且你可以随便回到历史记录的某个时刻。
SVN, CVS这类早期的集中式版本控制系统,都有一个单一的集中管理的服务器,保存所有文件的修订版本,而协同工作的人们都通过客户端连到这台服务器,取出最新的文件或者提交更新。
它们的原理类似下图:
集中式版本控制系统
而Git或Mercurial这类分布式版本控制系统, 才是现代的首选。因为分布式的优势绝对显著。
在分布式版本控制系统里,客户端并不只提取最新版本的文件快照,而是把代码仓库完整地镜像下来。
这么一来,任何一处协同工作用的服务器发生故障,事后都可以用任何一个镜像出来的本地仓库恢复。因为每一次的提取操作,实际上都是一次对代码仓库的完整备份。
分布式版本控制系统
现在,Google, Facebook, Microsoft等世界级公司每天在用Git。
众所周知,IT界大牛很多, 但是大牛中的大牛稀少。
Linus Torvalds就是其中之一。
Linus Torvalds不但开创了Linux操作系统(当然了, 开源社区对Linux贡献极大, 参看我的), 而且他发明了Git版本控制系统。
现在的Android系统底层就是基于更改过的Linux系统,你说Linus Torvalds是不是贡献极大。
Git的诞生很有趣:
2005年Linux 内核开发社区正面临严峻的挑战:他们不能继续使用 BitKeeper(一个分布式版本控制系统) 了(原因是当时Bitkeeper 著作权所有者决定收回授权,内核开发团队与其协商无果),而又没有其他的 SCM (Software Configuration Management)可满足他们的分布式系统的需求。
Linux 之父 Linus Torvalds 接受了这个挑战,决定开发一个新的版本控制系统。周末他消失了,新的一周,Git 问世了。LT就是威武。
Atlassian为Git做了一个10年的纪录图。
Git配置和常用命令
安装Git很简单,在Ubuntu等Debian族的Linux系统上,只要输入下面命令:
sudo apt-get install git-all
关于安装Git,可以看这个链接
安装完Git就可以对其做一些配置。
Git有一个工具被称为git config,它允许你获得和设置配置变量;这些变量可以控制Git的外观和操作的各个方面。这些变量可以被存储在三个不同的位置:
/etc/gitconfig 文件:包含了适用于系统所有用户和所有库的值。如果你传递参数选项’--system’ 给 git config,它将明确的读和写这个文件。
~/.gitconfig 文件 :具体到你的用户。你可以通过传递--global 选项使Git 读或写这个特定的文件。
位于git目录的config文件 (也就是 .git/config) :无论你当前在用的库是什么,特定指向该单一的库。每个级别重写前一个级别的值。因此,在.git/config中的值覆盖了在/etc/gitconfig中的同一个值。
我的Git config(配置)列表:
我的Git config(配置)列表
这个配置就在你的个人目录的.gitconfig(有一个点哦, 不用ls -al是看不到的)文件中, 你可以用vim来打开编辑内容 (vim ~/.gitconfig), 我的内容如下
name = Enming Xie
email = enming.xie@blabla.fr
st = status
pl = pull --ff-only
co = checkout
ci = commit
df = difftool
cp = cherry-pick
ca = commit --amend
br = branch
l = log --stat
last = log -1
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&%an&%Creset' --abbrev-commit
up = push origin
lf = log --follow -p
aa = ls-files --modified
su = status -uno
cm = commit -m
uf = push origin -f
cl = clean -fdx
fe = fetch --prune
cf = clean -fdx
bd = branch -D
cb = checkout -b
default = simple
editor = vim
pager = less -+F
tool = meld
[difftool]
prompt = false
tool = meld
templatedir = ~/.git_template
因为我比较喜欢偷懒(程序员需要学会偷懒好么), git命令有几个太长的, 我就用alias(别名)来替代了, 这样平时输入git命令就快了很多, 简直飞起!
我最常用的Git命令(全名,没用alias之前):
git checkout
git status
git checkout -b
git commit
git clean -fdx
git fetch --prune
git pull --ff-only
git branch -D
git rebase
git revert
git push origin :yourbranch
Git必看书籍
Pro Git这本书(也可以看其电子版)绝对是Git入门和进深的不二选择。
我的同桌说:他进公司时,被要求先读两遍这本书。
Github和Git是两回事。
Git是版本控制系统,Github是在线的基于Git的代码托管服务。
GitHub是2008年由Ruby on Rails编写而成。GitHub同时提供付费账户和免费账户。这两种账户都可以创建公开的代码仓库,但是付费账户也可以创建私有的代码仓库。
为什么现在Github这么火,以至于世界顶级公司和项目的源码很多都托管在Github上,首先:
现在这世代还是得看看颜值的。你说Sourceforge等代码托管网站也年岁很久了,为什么没有Github那么火呢?
关键是Github长得好看(你长这么好看,说什么都是对的)。
对比Github和Sourceforge
Sourceforge
反正我看了Github再来看Sourceforge的主页,我已经不想用Sourceforge了。
软件的颜值体现了设计者的审美观以及设计能力。
2011年,Github已经取代Sourceforge,成为最活跃的代码交流社区。这意味着在Open Source Community(开源社区),Git取代了SVN已经成为事实。
而且,Github现在都快成为程序员简历的一个重要加分条件了。
如果你的简历里放上你的Github链接,招聘者通过你对开源项目的贡献和你自己的项目代码,就可以对你的水准了解大概(我还没把我的项目都放到Github上,慢慢来吧)。
Linus Torvalds的Github页面
Github有个小缺陷 (也不能算是缺陷吧), 就是你的repo(repository的缩写,表示“仓库”)都需要public(公开), 如果你想要创建private(私人)的repo, 那得付钱。
不过, 幸好, Gitlab解决了这个问题, 可以在上面创建免费的私人repo。
比如我们公司就是用Gitlab来管理项目的()。
我在公司的Gitlab
可以看到,我是从日在Ercom公司工作的,一直活跃度还不错(必须为中国人争光么,我可是组里最努力的)。
再看我个人的Gitlab账户页面,至今只有几个项目,因为大部分都开源在Github上。
我的个人Gitlab
要创建Gitlab的新项目很简单,和Github类似,只要点击New Project按钮,填写基本信息即可。
创建项目按钮
填写Gitlab项目信息
可以看到,项目的默认属性是Private(私人的),当然,你也可以选择Public(公开的)或Internal(内部的)。
怎么样,Github和Gitlab很酷吧。
快去试试Git吧, 再不赶紧, "女神"都老了 (没关系, 用git reset或者revert或者git rebase可以重回美好时光)!
微信公众号 「程序员联盟」( ProgrammerLeague )
我的简介:http:/...酷勤网 C 程序员的那点事!
当前位置: >
浏览次数:次
搭建 GitLab 的原因可能有几个吧:
有些项目因为商业原因需要托管到私有服务器;
GitHub 国内有时候速度真的是伤不起;
之前帮公司也部署过 GitLab 服务器,管理,使用起来也挺方便的;
暂时也没有计划去试用国内的代码托管平台;
GitLab 可以快速手动集成很多服务(Pushover,Slack...)
根据自己的需求,解析好子域名(例如:git.ideas.top), 在阿里云买了一年的服务器(1G Memory, 1 Core, 1M, 20G,Ubuntu 14.04), 总共花了400块大洋,开始我们的折腾之旅吧。
硬件需求:
官方安装文档:
SegmentFault 用GitLab搭建自己的私有GitHub:
当然最快速方便的还是直接使用 GitLab 提供的安装包,不过从源代码安装也是一条可选的方式, 参照以上安装教程,在这里写个快速安装指南(更新一些已经变化的内容);
Packages / Dependencies
System Users
就是这么一个安装列表,所以 ssh 到你的远程服务器,开始安装!(如果你刚申请了一个Ubuntu VPS,可以浏览一下这,做一些初始化工作.)
ps: 对于本人来讲,GitLab 主要是来存放一些技术小组的开发项目,所以对于稳定性的要求没有那么苛刻,就直接拿最新的版本来安装了;
1. 安装 GitLab 需要的包及依赖软件
apt-get update -y apt-get upgrade -y apt-get install sudo -y
安装 vim 作为默认文本编辑器可选
sudo apt-get install -y vim sudo update-alternatives --set editor /usr/bin/vim.basic
安装依赖包(编译 Ruby 以及 Ruby gems 的本地扩展)
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake libkrb5-dev
安装 Git(So easy)
sudo apt-get install -y git-core # 需要版本在 1.7.10 以上 git --version
# 如果已经安装了旧版本的 Git, 可以移除然后从源码编译安装最新版本 sudo apt-get remove git-core
# 安装依赖 sudo apt-get install -y libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
# 下载及编译安装 cd /tmp curl -L --progress https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz | tar xz cd git-2.1.2/ ./configure make prefix=/usr/local all sudo make prefix=/usr/local install
安装成功之后,需要在之后的 GitLab 配置文件中设置一下 Git 的执行路径(/usr/local/bin/git)
为了正常使用邮件通知服务,需要简单配置一下邮件服务器, Debian 默认使用 exim4 发送邮件,但在 Ubuntu 有点, 所以可以先安装 postfix 来用,我安装了之后,邮件服务一直不正常,最后发现是内存不够导致后台进程内存分配不足,只好又分配了1G的 swap 空间,才 ok
sudo apt-get install -y postfix
安装的时候选择Internet Site, 配置一下hostname
2. Ruby (So slow...)
如果系统安装的 Ruby 版本是1.8,需要先卸载一下,GitLab 需要 2.0 以上版本:
ruby --version sudo apt-get remove ruby1.8
下载新版本的源代码,编译安装:
mkdir /tmp/ruby && cd /tmp/ruby curl -L --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz | tar xz cd ruby-2.1.5 ./configure --disable-install-rdoc make sudo make install
安装 ruby Bundle Gem(国内速度让人受不了。。。):
sudo gem install bundler --no-ri --no-rdoc
3. System User
sudo adduser --disabled-login --gecos 'GitLab' git
4. Database
官方推荐使用 PostgreSQL:
# Install the database packages sudo apt-get install -y postgresql postgresql-client libpq-dev
# Login to PostgreSQL sudo -u postgres psql -d template1
# Create a user for GitLab CREATE USER git CREATEDB;
# Create the GitLab production database & grant all privileges on database CREATE DATABASE gitlabhq_production OWNER
# Quit the database session
# Try connecting to the new database with the new user sudo -u git -H psql -d gitlabhq_production
# Quit the database session gitlabhq_production& q
如果你更熟悉 MySQL,这是配置脚本:
# Install the database packages sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Ensure you have MySQL version 5.5.14 or later mysql --version
# Pick a MySQL root password (can be anything), type it and press enter # Retype the MySQL root password and press enter
# Secure your installation sudo mysql_secure_installation
# Login to MySQL mysql -u root -p
# Type the MySQL root password
# Create a user for GitLab # do not type the 'mysql&', this is part of the prompt # change $password in the command below to a real password you pick mysql& CREATE USER 'git'@'localhost' IDENTIFIED BY '$password';
# Ensure you can use the InnoDB engine which is necessary to support long indexes # If this fails, check your MySQL config files (e.g. `/etc/mysql/*.cnf`, `/etc/mysql/conf.d/*`) for the setting &innodb = off& mysql& SET storage_engine=INNODB;
# Create the GitLab production database mysql& CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Grant the GitLab user necessary permissions on the database mysql& GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost';
# Quit the database session mysql& q
# Try connecting to the new database with the new user sudo -u git -H mysql -u git -p -D gitlabhq_production
# Type the password you replaced $password with earlier
# You should now see a 'mysql&' prompt
# Quit the database session mysql& q
# You are done installing the database and can go back to the rest of the installation.
5 安装 Redis
sudo apt-get install redis-server
# Configure redis to use sockets sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
# Disable Redis listening on TCP by setting 'port' to 0 sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf
# Enable Redis socket for default Debian / Ubuntu path echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf # Grant permission to the socket to all members of the redis group echo 'unixsocketperm 770' | sudo tee -a /etc/redis/redis.conf
# Create the directory which contains the socket mkdir /var/run/redis chown redis:redis /var/run/redis chmod 755 /var/run/redis # Persist the directory which contains the socket, if applicable if [ -d /etc/tmpfiles.d ]; then
/var/run/redis
-' | sudo tee -a /etc/tmpfiles.d/redis.conf fi
# Activate the changes to redis.conf sudo service redis-server restart
# Add git to the redis group sudo usermod -aG redis git
6. 安装 GitLab
# We'll install GitLab into home directory of the user &git& cd /home/git
从 GitHub 克隆一份源码:
sudo -u git -H git clone /gitlab-org/gitlab-ce.git -b 7-8-stable gitlab
配置 GitLab
# Go to GitLab installation folder cd /home/git/gitlab
# Copy the example GitLab config sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
# Update GitLab config file, follow the directions at top of file sudo -u git -H editor config/gitlab.yml
# Make sure GitLab can write to the log/ and tmp/ directories sudo chown -R git log/ sudo chown -R git tmp/ sudo chmod -R u+rwX,go-w log/ sudo chmod -R u+rwX tmp/
# Create directory for satellites sudo -u git -H mkdir /home/git/gitlab-satellites sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
# Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories sudo chmod -R u+rwX tmp/pids/ sudo chmod -R u+rwX tmp/sockets/
# Make sure GitLab can write to the public/uploads/ directory sudo chmod -R u+rwX
public/uploads
# Copy the example Unicorn config sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
# Find number of cores nproc
# Enable cluster mode if you expect to have a high load instance # Ex. change amount of workers to 3 for 2GB RAM server # Set the number of workers to at least the number of cores sudo -u git -H editor config/unicorn.rb
# Copy the example Rack attack config sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
# Configure Git global settings for git user, useful when editing via web # Edit user.email according to what is set in gitlab.yml sudo -u git -H git config --global user.name &GitLab& sudo -u git -H git config --global user.email && sudo -u git -H git config --global core.autocrlf input
# Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml
# Change the Redis socket path if you are not using the default Debian / Ubuntu configuration sudo -u git -H editor config/resque.yml
配置数据库
# PostgreSQL only: sudo -u git cp config/database.yml.postgresql config/database.yml
# MySQL only: sudo -u git cp config/database.yml.mysql config/database.yml
# MySQL and remote PostgreSQL only: # Update username/password in config/database.yml. # You only need to adapt the production settings (first part). # If you followed the database guide then please do as follows: # Change 'secure password' with the value you have given to $password # You can keep the double quotes around the password sudo -u git -H editor config/database.yml
# PostgreSQL and MySQL: # Make config/database.yml readable to git only sudo -u git -H chmod o-rwx config/database.yml
# For PostgreSQL (note, the option says &without ... mysql&) sudo -u git -H bundle install --deployment --without development test mysql aws
# Or if you use MySQL (note, the option says &without ... postgres&) sudo -u git -H bundle install --deployment --without development test postgres aws
安装 GitLab 的命令行工具
# Run the installation task for gitlab-shell (replace `REDIS_URL` if needed): sudo -u git -H bundle exec rake gitlab:shell:install[v2.5.4] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production
# By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: sudo -u git -H editor /home/git/gitlab-shell/config.yml
初始化数据库以及激活高级功能
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
# Type 'yes' to create the database tables.
# When done you see 'Administrator account created:'
安装初始化脚本
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab sudo cp lib/support/init.d/gitlab.default.example /etc/default/gitlab # Make GitLab start on boot: sudo update-rc.d gitlab defaults 21
设置 logroate
sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitla
检查应用程序的状态
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
编译资源文件
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
启动 GitLab 实例
sudo service gitlab start # or sudo /etc/init.d/gitlab restart
7 Nginx(终于快完结了)
sudo apt-get install -y nginx
复制 GitLab 的虚拟主机配置文件到 nginx
sudo cp lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab
# test configruation sudo nginx -t
sudo service nginx restart
Important Note
The setup has created a default admin account for you
root 5iveL!fe
& 相关主题:

我要回帖

更多关于 离婚开庭说什么容易离 的文章

 

随机推荐