参考原档:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#using-https

本章只写重要的

Gitlab安装包括设置一下组件:

  1. Packages / Dependencies
  2. Ruby
  3. Go
  4. Node
  5. System Users
  6. Database
  7. Redis
  8. GitLab
  9. Nginx

1. Packages / Dependencies(可有可无的更新)

  1. # run as root!
  2. apt-get update -y
  3. apt-get upgrade -y
  4. apt-get install sudo -y

安装所需的软件包(需要编译Ruby和Ruby gem的本机扩展):

  1. sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake

如果要使用Kerberos进行用户身份验证,请安装libkrb5-dev:

  1. sudo apt-get install libkrb5-dev

注意:如果你不知道Kerberos是什么,你可以假设你不需要它。

确保您安装了正确版本的Git

  1. # Install Git
  2. sudo apt-get install -y git-core
  3.  
  4. # Make sure Git is version 2.8.4 or higher
  5. git --version

系统打包Git是否太老了?从源文件中删除并编译。

  1. # Remove packaged Git
  2. sudo apt-get remove git-core
  3.  
  4. # Install dependencies
  5. sudo apt-get install -y libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
  6.  
  7. # Download and compile from source
  8. cd /tmp
  9. curl --remote-name --progress https://www.kernel.org/pub/software/scm/git/git-2.8.4.tar.gz
  10. echo '626e319f8a24fc0866167ea5f6bf3e2f38f69d6cb2e59e150f13709ca3ebf301 git-2.8.4.tar.gz' | shasum -a256 -c - && tar -xzf git-2.8.4.tar.gz
  11. cd git-2.8.4/
  12. ./configure
  13. make prefix=/usr/local all
  14.  
  15. # Install into /usr/local/bin
  16. sudo make prefix=/usr/local install
  17.  
  18. # When editing config/gitlab.yml (Step 5), change the git -> bin_path to /usr/local/bin/git

注意:为了接收邮件通知,请确保安装邮件服务器。默认情况下,Debian随exim4一起提供,但Ubuntu并没有出现问题。推荐的邮件服务器是后缀,您可以安装它:

  1. sudo apt-get install -y postfix

然后选择“Internet站点”,然后按确认确认主机名。

2.Ruby

注意:目前支持的Ruby(MRI)版本为2.3.x。GitLab 9.0支持Ruby 2.1.x。

查看Ruby的版本:

  1. sudo ruby -v

删除旧的Ruby 1.8如果存在:

  1. sudo apt-get remove ruby1.8

下载Ruby并编译它:

  1. mkdir /tmp/ruby && cd /tmp/ruby
  2. curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.gz
  3. echo '1014ee699071aa2ddd501907d18cbe15399c997d ruby-2.3.3.tar.gz' | shasum -c - && tar xzf ruby-2.3.3.tar.gz
  4. cd ruby-2.3.3
  5. ./configure --disable-install-rdoc
  6. make
  7. sudo make install

然后安装Bundler Gem:

  1. sudo gem install bundler --no-ri --no-rdoc

3.Go

  1. # Remove former Go installation folder
  2. sudo rm -rf /usr/local/go
  3.  
  4. curl --remote-name --progress https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
  5. echo '1862f4c3d3907e59b04a757cfda0ea7aa9ef39274af99a784f5be843c80c6772 go1.8.3.linux-amd64.tar.gz' | shasum -a256 -c - && \
  6. sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
  7. sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/
  8. rm go1.8.3.linux-amd64.tar.gz

4.Node

由于GitLab 8.17,GitLab需要使用node> = v4.3.0来编译javascript资源,而且使用“>> = v0.17.0来管理javascript依赖关系。在许多发行版中,官方软件包版本提供的版本已过期,因此我们需要通过以下命令进行安装:

  1. # install node v7.x
  2. curl --location https://deb.nodesource.com/setup_7.x | sudo bash -
  3. sudo apt-get install -y nodejs
  4.  
  5. # install yarn
  6. curl --location https://yarnpkg.com/install.sh | bash -

如果如上述安装时出现问题,就去官网查看相应的地方,会有解决方法,相信我,我成功了。

node:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

yarn:https://yarnpkg.com/en/docs/install/

5.System Users

git为GitLab 创建一个用户:

  1. sudo adduser --disabled-login --gecos 'GitLab' git

6.Database

我们建议使用PostgreSQL数据库。对于MySQL,请查看MySQL安装指南,官网相应的地方也有链接。

1.安装数据库包:

  1. sudo apt-get install -y postgresql postgresql-client libpq-dev postgresql-contrib

2.为GitLab创建数据库用户:

  1. sudo -u postgres psql -d template1 -c "CREATE USER git CREATEDB;"

3.创建pg_trgm扩展名(GitLab 8.6+需要):

  1. sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"

4. 创建GitLab生产数据库并授予数据库所有权限:

  1. sudo -u postgres psql -d template1 -c "CREATE DATABASE gitlabhq_production OWNER git;"

5.尝试使用新用户连接到新数据库:

  1. sudo -u git -H psql -d gitlabhq_production

6.检查pg_trgm分机是否启用:

  1. SELECT true AS enabled
  2. FROM pg_available_extensions
  3. WHERE name = 'pg_trgm'
  4. AND installed_version IS NOT NULL;

如果分机启用,则会产生以下输出: 

  1. enabled
  2. ---------
  3. t
  4. (1 row)

7.退出数据库会话:

  1. gitlabhq_production> \q

7.Redis:

GitLab至少需要Redis 2.8。

如果您使用的是Debian 8或Ubuntu 14.04及更高版本,那么您可以简单地安装Redis 2.8:

  1. sudo apt-get install redis-server

如果您使用的是Debian 7或Ubuntu 12.04,请遵循备用Redis安装的特殊文档(官网对应处)。完成后,请遵循指南的其余部分。

  1. # Configure redis to use sockets
  2. sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
  3.  
  4. # Disable Redis listening on TCP by setting 'port' to 0
  5. sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf
  6.  
  7. # Enable Redis socket for default Debian / Ubuntu path
  8. echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf
  9.  
  10. # Grant permission to the socket to all members of the redis group
  11. echo 'unixsocketperm 770' | sudo tee -a /etc/redis/redis.conf
  12.  
  13. # Create the directory which contains the socket
  14. mkdir /var/run/redis
  15. chown redis:redis /var/run/redis
  16. chmod 755 /var/run/redis
  17.  
  18. # Persist the directory which contains the socket, if applicable
  19. if [ -d /etc/tmpfiles.d ]; then
  20. echo 'd /var/run/redis 0755 redis redis 10d -' | sudo tee -a /etc/tmpfiles.d/redis.conf
  21. fi
  22.  
  23. # Activate the changes to redis.conf
  24. sudo service redis-server restart
  25.  
  26. # Add git to the redis group
  27. sudo usermod -aG redis git

8.GitLab

  1. # We'll install GitLab into home directory of the user "git"
  2. cd /home/git

克隆来源

  1. # Clone GitLab repository
  2. sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-7-stable gitlab

版本不要装最新的,最好是差1~2个大版本。 

  1. # Go to GitLab installation folder
  2. cd /home/git/gitlab
  3.  
  4. # Copy the example GitLab config
  5. sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
  6.  
  7. # Update GitLab config file, follow the directions at top of file
  8. sudo -u git -H editor config/gitlab.yml
    #修改host:localhost 为host:你的域名或者ip,我改的是192.168.222.131
    #修改bin_path:/usr/bin/git 为bin_path:/usr/local/bin/git
  9.  
  10. # Copy the example secrets file
  11. sudo -u git -H cp config/secrets.yml.example config/secrets.yml
  12. sudo -u git -H chmod 0600 config/secrets.yml
  13.  
  14. # Make sure GitLab can write to the log/ and tmp/ directories
  15. sudo chown -R git log/
  16. sudo chown -R git tmp/
  17. sudo chmod -R u+rwX,go-w log/
  18. sudo chmod -R u+rwX tmp/
  19.  
  20. # Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories
  21. sudo chmod -R u+rwX tmp/pids/
  22. sudo chmod -R u+rwX tmp/sockets/
  23.  
  24. # Create the public/uploads/ directory
  25. sudo -u git -H mkdir public/uploads/
  26.  
  27. # Make sure only the GitLab user has access to the public/uploads/ directory
  28. # now that files in public/uploads are served by gitlab-workhorse
  29. sudo chmod 0700 public/uploads
  30.  
  31. # Change the permissions of the directory where CI job traces are stored
  32. sudo chmod -R u+rwX builds/
  33.  
  34. # Change the permissions of the directory where CI artifacts are stored
  35. sudo chmod -R u+rwX shared/artifacts/
  36.  
  37. # Change the permissions of the directory where GitLab Pages are stored
  38. sudo chmod -R ug+rwX shared/pages/
  39.  
  40. # Copy the example Unicorn config
  41. sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
  42.  
  43. # Find number of cores
  44. nproc
  45.  
  46. # Enable cluster mode if you expect to have a high load instance
  47. # Set the number of workers to at least the number of cores
  48. # Ex. change amount of workers to 3 for 2GB RAM server
  49. sudo -u git -H editor config/unicorn.rb
  50.  
  51. # Copy the example Rack attack config
  52. sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  53.  
  54. # Configure Git global settings for git user
  55. # 'autocrlf' is needed for the web editor
  56. sudo -u git -H git config --global core.autocrlf input
  57.  
  58. # Disable 'git gc --auto' because GitLab already runs 'git gc' when needed
  59. sudo -u git -H git config --global gc.auto 0
  60.  
  61. # Enable packfile bitmaps
  62. sudo -u git -H git config --global repack.writeBitmaps true
  63.  
  64. # Configure Redis connection settings
  65. sudo -u git -H cp config/resque.yml.example config/resque.yml
  66.  
  67. # Change the Redis socket path if you are not using the default Debian / Ubuntu configuration
  68. sudo -u git -H editor config/resque.yml

重要注意事项:请确保同时编辑gitlab.yml和unicorn.rb匹配您的设置。  

配置GitLab数据库设置 

  1. # PostgreSQL only:
  2. sudo -u git cp config/database.yml.postgresql config/database.yml
  3.  
  4. # MySQL only:
  5. sudo -u git cp config/database.yml.mysql config/database.yml
  6.  
  7. # MySQL and remote PostgreSQL only:
  8. # Update username/password in config/database.yml.
  9. # You only need to adapt the production settings (first part).
  10. # If you followed the database guide then please do as follows:
  11. # Change 'secure password' with the value you have given to $password
  12. # You can keep the double quotes around the password
  13. sudo -u git -H editor config/database.yml
  14.  
  15. # PostgreSQL and MySQL:
  16. # Make config/database.yml readable to git only
  17. sudo -u git -H chmod o-rwx config/database.yml

Install Gems

注意:从捆绑器1.5.2开始,您可以调用bundle install -jN(N处理器内核的数量),并享受并行宝石安装,并在完成时间内可以有显着差异(约60%)。检查你的核心数量nproc。有关更多信息,请查看此信息。首先确保你有一个bundle => 1.5.2(run bundle -v),因为它解决了在1.5.2 中修复的一些问题。

  1. # For PostgreSQL (note, the option says "without ... mysql")(过程会比较慢,不要急,会成功的,网上说的那些都是骗人的。)
  2. sudo -u git -H bundle install --deployment --without development test mysql aws kerberos
  3.  
  4. # Or if you use MySQL (note, the option says "without ... postgres")
  5. sudo -u git -H bundle install --deployment --without development test postgres aws kerberos

注意:如果要使用Kerberos进行用户身份验证,请kerberos在上述--without选项中省略。

 

安装GitLab Shell 

GitLab Shell是专门为GitLab开发的SSH访问和存储库管理软件。

  1. # Run the installation task for gitlab-shell (replace `REDIS_URL` if needed):
  2. sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true
  3.  
  4. # By default, the gitlab-shell config is generated from your main GitLab config.
  5. # You can review (and modify) the gitlab-shell config as follows:
  6. sudo -u git -H editor /home/git/gitlab-shell/config.yml(此处修改时需要将gitlab_url:http://127.0.0.1:8080/)

安装gitlab-workhorse

GitLab-Workhorse使用GNU Make。以下命令行将安装GitLab-Workhorse,/home/git/gitlab-workhorse其中是推荐的位置。

  1. sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production(这个安装方式会出现问题,然后我从网上找了另一个方式)
    gitlab的上层目录git下安装:
    sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
    cd gitlab-workhorse 
    sudo -u git -H make

您可以通过将其作为额外参数来指定不同的Git仓库:

  1. sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse,https://example.com/gitlab-workhorse.git]" RAILS_ENV=production

初始化数据库并激活高级功能

  1. sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
  2.  
  3. # Type 'yes' to create the database tables.
  4.  
  5. # When done you see 'Administrator account created:'

注意:您可以通过在环境变量提供他们设置管理员/ root密码和电子邮件,GITLAB_ROOT_PASSWORD并GITLAB_ROOT_EMAIL分别如下所示。如果您没有设置密码(并且设置为默认密码),请等待公开GitLab到公共网络,直到安装完成,并且您已经首次登录到服务器。在第一次登录时,您将被迫更改默认密码。

  1. sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword GITLAB_ROOT_EMAIL=youremail(这个可以不设置,无所谓)

安装Init脚本  

下载init脚本(将是/etc/init.d/gitlab):

  1. sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

如果您使用非默认文件夹或用户副本进行安装并编辑默认文件:

  1. sudo cp lib/support/init.d/gitlab.default.example /etc/default/gitlab

如果您将GitLab安装在另一个目录或默认设置之外,您应该更改这些设置/etc/default/gitlab。不要编辑,/etc/init.d/gitlab因为它将在升级时更改。

使GitLab启动时启动:

  1. sudo update-rc.d gitlab defaults 21

安装Gitaly

  1. # Fetch Gitaly source with Git and compile with Go
  2. sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly]" RAILS_ENV=production

您可以通过将其作为额外参数来指定不同的Git仓库:

  1. sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly,https://example.com/gitaly.git]" RAILS_ENV=production

接下来,确保配置gitaly:

  1. # Restrict Gitaly socket access
  2. sudo chmod 0700 /home/git/gitlab/tmp/sockets/private
  3. sudo chown git /home/git/gitlab/tmp/sockets/private
  4.  
  5. # If you are using non-default settings you need to update config.toml
  6. cd /home/git/gitaly
  7. sudo -u git -H editor config.toml

如果你安装出错,请看后面信息,我安装的是gitlab8-7:Gitaly(在GitLab 9.0中引入)是一种为Git存储库提供高级RPC访问权限的服务。从GitLab 9.3起,它仍然是一个可选的组件,范围有限。

访问Git存储库(gitlab-rails,gitlab-shell,gitlab-workhorse)的GitLab组件充当Gitaly的客户端。最终用户无法直接访问Gitaly。

安装Logrotate

  1. sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab

检查应用程序状态

检查GitLab及其环境是否正确配置:

  1. sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

编译资产  

  1. sudo -u git -H yarn install --production --pure-lockfile
  2. sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production(这个有可能会出错,但是问题不大)
    sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production(这个不错,如果没有尝试需要修复的信息就完成了)

编译GetText PO文件 

  1. sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production(这个也是有问题的没事)

启动您的GitLab实例

  1. sudo service gitlab start
  2. # or
  3. sudo /etc/init.d/gitlab restart

Nginx 

注意: Nginx是GitLab正式支持的Web服务器。如果您不能或不想使用Nginx作为Web服务器,请查看GitLab配方。

安装

  1. sudo apt-get install -y nginx

站点配置

复制示例站点配置:

  1. sudo cp lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab
  2. sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab

确保编辑配置文件以匹配您的设置。另外,请确保您将路径与GitLab相匹配,特别是如果为“git”用户以外的用户安装:

  1. # Change YOUR_SERVER_FQDN to the fully-qualified
  2. # domain name of your host serving GitLab.
  3. #
  4. # Remember to match your paths to GitLab, especially
  5. # if installing for a user other than 'git'.
  6. #
  7. # If using Ubuntu default nginx install:
  8. # either remove the default_server from the listen line
  9. # or else sudo rm -f /etc/nginx/sites-enabled/default
  10. sudo editor /etc/nginx/sites-available/gitlab(可以该一下server_name,我改的是本机的ip

测试:

  1. sudo nginx -t

如果此时报错如下:

  1. nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/gitlab:29
  2. nginx: configuration file /etc/nginx/nginx.conf test failed
  3.  
  4. 解决方法:

  bill@bill:/home/git/gitlab$ sudo rm -rf /etc/nginx/sites-enabled/default
  bill@bill:/home/git/gitlab$ sudo nginx -t
  nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  nginx: configuration file /etc/nginx/nginx.conf test is successful

最后再检查一下:

  1. sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
    并且重启服务:
    sudo service nginx restart
    sudo service gitlab restart
    还有就是一定要关闭防火墙,除非你自己制定规则,省去麻烦直接关闭吧
    sudo service ufw stop

接下来就是搭建gitlab-runner,持续集成

可以参考:https://gitlab.com/gitlab-org/gitlab-ci-multi-runner

https://docs.gitlab.com/runner/register/index.html

1.添加GitLab的官方资料库:

  1. # For Debian/Ubuntu
  2. curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash
  3.  
  4. # For RHEL/CentOS
  5. curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash

2.安装gitlab-ci-multi-runner

  1. # for DEB based systems
  2. root@host:# apt-get install gitlab-ci-multi-runner=1.11.2
  3.  
  4. # for RPM based systems
  5. root@host:# yum install gitlab-ci-multi-runner-1.11.2-1

3.注册

  1. sudo gitlab-ci-multi-runner register
    注册就可以看看官网的资料:https://docs.gitlab.com/runner/register/index.html

4.一些操作

参考:https://help.aliyun.com/document_detail/52857.html,还有自己新建一个项目的时候也会给出参数便于你设置。

ubuntu 16.04.2 源码安装gitlab并且利用runner持续集成的更多相关文章

  1. ubuntu 16.04下源码安装opencv3.4

    源码安装opencv,遇到了一些小波折,这里做个备忘吧. 首先要下载源码,路径: https://github.com/opencv/opencv 下载成功后,在opencv的根目录下执行下面操作: ...

  2. Ubuntu 16.04 + python3 源码 安装+使用labelImg最新版

    安装 sudo apt-get update sudo apt-get upgrade sudo apt install python3-pip git clone https://github.co ...

  3. Ubuntu 16.04上源码编译和安装pytorch教程,并编写C++ Demo CMakeLists.txt | tutorial to compile and use pytorch on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/54e7a3d8/,欢迎阅读最新内容! tutorial to compile and use pytorch on ubuntu ...

  4. ubuntu 16.04上源码编译和安装cgal并编写CMakeLists.txt | compile and install cgal on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/39ab7ed9/,欢迎阅读最新内容! compile and install cgal on ubuntu 16.04 Guide ...

  5. ubuntu 16.04上源码编译dlib教程 | compile dlib on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/c6ead512/,欢迎阅读! compile dlib on ubuntu 16.04 Series Part 1: compil ...

  6. ubuntu 16.04上源码编译opengv | compile opengv on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/1e5d14ee/,欢迎阅读! compile opengv on ubuntu 16.04 Series compile open ...

  7. ubuntu 16.04上源码编译libjpeg-turbo和使用教程 | compile and use libjpeg-turbo on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/9f626e7a/,欢迎阅读! compile and use libjpeg-turbo on ubuntu 16.04 Seri ...

  8. ubuntu 16.04上源码编译glog和gflags 编写glog-config.cmake和gflags-config.cmake | compile glog and glags on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/977f5125/,欢迎阅读! compile glog and glags on ubuntu 16.04 Series comp ...

  9. Ubuntu 16.04上源码编译Poco并编写cmake文件 | guide to compile and install poco cpp library on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/281dd8cd/,欢迎阅读! guide to compile and install poco cpp library on u ...

随机推荐

  1. 微信小程序之购物车功能

    前言 以往的购物车,基本都是通过大量的 DOM 操作来实现.微信小程序其实跟 vue.js 的用法非常像,接下来就看看小程序可以怎样实现购物车功能. 需求 先来弄清楚购物车的需求. 单选.全选和取消, ...

  2. R的变量类型和常用函数

    一.R的变量类型 也可以说是数据存储方式,有: Vector: 一维阵列 Matrics: 二维阵列,其中所有元素是同一数据类型. factor: 种类变量,可使用levels函数来规定种类变量的各级 ...

  3. 初识Eclipse!!

      Java之路 ——初识Eclipse   零.大纲 一.前言 二.获取Eclipse 三.运行Eclipse 四.创建及运行第一个Java Project 五.界面介绍 六.如何调试 七.获取插件 ...

  4. hive、impala集成ldap

    1.概要 1.1 环境信息 hadoop:cdh5.10 os:centos6.7 user:root hive.impala已集成sentry 1.2 访问控制权限 这里通过使用openldap来控 ...

  5. EntityFramework中出现DateTime2异常的完美解决办法

    今天在使用entityframework往数据库插入数据的时候,突然出现了一个数据类型转换异常的问题: System.Data.SqlClient.SqlException: 从 datetime2 ...

  6. 升讯威微信营销系统开发实践:(5) Github 源码:微信接口的 .NET 封装。

    微信开发系列教程,将以一个实际的微信平台项目为案例,深入浅出的讲解微信开发.应用各环节的实现方案和技术细节. 本系列教程的最终目标是完成一个功能完善并达到高可用性能指标的微信管理软件,所以除了与微信本 ...

  7. Java类加载和卸载的跟踪

    博客搬家自https://my.oschina.net/itsyizu/blog/ 什么是类的加载和卸载 Java程序的运行离不开类的加载,为了更好地理解程序的执行,有时候需要知道系统加载了哪些类.一 ...

  8. R语言通过loess去除某个变量对数据的影响

      当我们想研究不同sample的某个变量A之间的差异时,往往会因为其它一些变量B对该变量的固有影响,而影响不同sample变量A的比较,这个时候需要对sample变量A进行标准化之后才能进行比较.标 ...

  9. 开涛spring3(3.4) - DI 之 3.4 Bean的作用域

    3.4  Bean的作用域 什么是作用域呢?即“scope”,在面向对象程序设计中一般指对象或变量之间的可见范围.而在Spring容器中是指其创建的Bean对象相对于其他Bean对象的请求可见范围. ...

  10. java集合(2)- java中HashMap详解

    java中HashMap详解 基于哈希表的 Map 接口的实现.此实现提供所有可选的映射操作,并允许使用 null 值和 null 键.(除了非同步和允许使用 null 之外,HashMap 类与 H ...