参考官方文档:

https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update

本地服务器为4.0.1版本

 1)4.0.1->4.1

sudo service gitlab stop

cd /home/gitlab/gitlab/

sudo -u gitlab -H git fetch   ===>获取最新代码

sudo -u gitlab -H git stash

sudo -u gitlab -H git checkout 4-1-stable

sudo -u gitlab -H vim Gemfile

修改内容为:modernizr  改为modernizr-rails  版本 2.7.1

Gemfile.lock同样修改

注册mysql gem:

sudo -u gitlab -H bundle install --without development test postgres

sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production

sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old

sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab

sudo chmod +x /etc/init.d/gitlab

cp /home/gitlab/gitlab/lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive

chown git:git  /home/git/.gitolite/hooks/common/post-receive

检查信息:

sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production

service gitlab start

2) 4.1->4.2

停止gitlab  nginx: service gitlab stop  ,service nginx stop

cd /home/gitlab/gitlab/

sudo -u gitlab -H git fetch

sudo -u gitlab -H git stash

sudo -u gitlab -H git checkout 4-2-stable

sudo -u gitlab -H vim Gemfile

修改内容为:modernizr  改为modernizr-rails  版本 2.7.1

Gemfile.lock也修改

# Run a bundle install without deployment to generate the new Gemfile

sudo -u gitlab -H bundle install --without development test postgres --no-deployment

====》报rake版本低,

gem install rake -v '10.0.3'

gem uninstall rake -v '0.9.2.2'

重新执行命令

# Install libs (with deployment this time)
sudo -u gitlab -H bundle install --without development test postgres --deployment

# update db
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production

检查状态:

sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production

重启gitlab  nginx服务

如果报错:

解决方案:

sudo -u gitlab -H bundle exec rake gitlab:satellites:create RAILS_ENV=production

3)4.2->5.0

3.1)停止nginx gitlab:

service nginx stop && service gitlab stop

3.2)#add bash to git user:

sudo chsh -s /bin/bash git

3.3)#git clone gitlab-shell

cd /home/git/

sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git /home/git/gitlab-shell

3.4)#set up gitlab-shell

sudo chown git:git -R /home/git/repositories/

sudo su git

cd /home/git/gitlab-shell

git checkout v1.1.0

cp config.yml.example config.yml

vim config.yml

修改内容如下:注意IP后面要有/作为结尾  格式 https://IP/  不是http  ,如果这里选择https 需要设置ssl

我选择http

./support/rewrite-hooks.sh

ruby -v   #ruby版本要在1.9

exit

3.5)#Copy GitLab instance to git user

sudo cp -R /home/gitlab/gitlab /home/git/gitlab

sudo chown git:git -R /home/git/gitlab

sudo rm -rf /home/gitlab/gitlab-satellites

#if exists

sudo rm /tmp/gitlab.socket   ====>我验证时该文件不存在

3.6)#Update GitLab to recent version

cd /home/git/gitlab

sudo -u git -H cp config/gitlab.yml config/gitlab.yml.old

sudo -u git -H git fetch

sudo -u git -H git stash

sudo -u git -H git checkout 5-0-stable

sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml

sudo -u git -H vim config/gitlab.yml   修改内容如下:

sudo -u git -H vim Gemfile

修改如下:

同理修改Gemfile.lock

sudo -u git -H bundle install --without development test postgres --no-deployment

====>这步如果出现输入密码也不行的问题

解决方案: root权限下 bundle install --without development test postgres --no-deloyment 再次执行上述命令

sudo -u git -H bundle install --without development test postgres --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:shell:build_missing_projects RAILS_ENV=production

sudo -u git -H mkdir -p /home/git/gitlab-satellites

sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:wiki:migrate RAILS_ENV=production

# check permissions for /home/git/.ssh/
sudo -u git -H chmod 700 /home/git/.ssh
sudo -u git -H chmod 600 /home/git/.ssh/authorized_keys

# check permissions for /home/git/gitlab/
sudo chown -R git /home/git/gitlab/log/
sudo chown -R git /home/git/gitlab/tmp/
sudo chmod -R u+rwX  /home/git/gitlab/log/
sudo chmod -R u+rwX  /home/git/gitlab/tmp/
sudo -u git -H mkdir -p /home/git/gitlab/tmp/pids/
sudo chmod -R u+rwX  /home/git/gitlab/tmp/pids

3.7)#Update init.d script and Nginx config

# init.d
sudo rm /etc/init.d/gitlab
sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-0-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab

# unicorn
sudo -u git -H cp /home/git/gitlab/config/unicorn.rb /home/git/gitlab/config/unicorn.rb.old
sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb

# Nginx
# Replace path from '/home/gitlab/' to '/home/git/'
sudo vim /etc/nginx/sites-enabled/gitlab   ==>或者直接修改nginx.conf
sudo service nginx restart

3.8)启动gitlab

sudo service gitlab start

# check if unicorn and sidekiq started
# If not try to logout, also check replaced path from '/home/gitlab/' to '/home/git/'
# in Nginx, unicorn, init.d etc
ps aux | grep unicorn
ps aux | grep sidekiq

3.9)检查注册

sudo -u git -H /home/git/gitlab-shell/bin/check

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

3.10)清除旧版本

sudo userdel -r gitlab

cd /home/git

sudo -u git -H vim .profile ===>清除内容

sudo rm -R bin
sudo rm -Rf gitolite
sudo rm -R .gitolite
sudo rm .gitolite.rc
sudo rm -f gitlab.pub
sudo rm projects.list

sudo service gitlab stop
cd /home/git/gitlab
sudo rm -R tmp
sudo -u git -H mkdir tmp
sudo chmod -R u+rwX  tmp/

sudo -u git -H mkdir tmp/pids/
sudo chmod -R u+rwX  tmp/pids/

sudo reboot

启动gitlab :

/usr/local/bin/redis-server && service nginx start & service gitlab start

检查运行状况:

cd /home/git/gitlab

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

 4)5.0->5.1

4.1)停止gitlab  nginx服务

service gitlab stop && service nginx stop

4.2)获取最新的code

cd /home/git/gitlab
sudo -u git -H git fetch
 sudo -u git -H git stash

sudo -u git -H git checkout 5-1-stable

4.3)更新gitlab-shell

cd /home/git/gitlab-shell

sudo -u git -H git fetch

sudo -u git -H git stash

sudo -u git -H git checkout v1.3.0

sudo -u git -H mv config.yml config.yml.old

sudo -u git -H cp config.yml.example config.yml

sudo -u git -H vi config.yml  ===>修改url   gitlab_url: "http://10.2.177.35/"

4.4)Install libs, migrations

cd /home/git/gitlab

sudo rm tmp/sockets/gitlab.socket

sudo -u git -H cp config/puma.rb.example config/puma.rb

sudo -u git -H vim Gemfile  ====>修改`gem "modernizr-rails", "2.7.1"``

sudo -u git -H bundle install --without development test postgres --no-deployment

===》出现输入密码不起作用,解决方案之前一样:

root权限执行bundle 在执行该命令

===》

sudo -u git -H bundle install --without development test postgres --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production

sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production

4.5)更新启动脚本

sudo rm /etc/init.d/gitlab

sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab

sudo chmod +x /etc/init.d/gitlab

4.6)更改MySQL权限

登陆MySQL

GRANT LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost';

flush privileges;

quit;

4.7)检查注册信息

service nginx start   ===>nginx要先于gitlab启动,否则会报错

service gitlab start

sudo -u git -H /home/git/gitlab-shell/bin/check

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

 5)5.1->5.2

备份:

cd /home/git/gitlab

sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

停止服务:

service gitlab stop && service nginx stop

更新代码:

cd /home/git/gitlab
sudo -u git -H git fetch

sudo -u git -H git stash
sudo -u git -H git checkout 5-2-stable

更新gitlab-shell

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.4.0

更新lib等

cd /home/git/gitlab

sudo -u git -H vim Gemfile  ===》`gem "modernizr-rails", "2.7.1"``

sudo -u git -H bundle install --without development test postgres --no-deployment

sudo -u git -H bundle install --without development test postgres --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production

更新config文件

vim /home/git/gitlab/config/gitlab.yml   ===>我的host是IP ,所以不用修改

vim home/git/gitlab/config/puma.rb     ====>我才用默认

更新启动脚本

cd /home/git/gitlab
sudo rm /etc/init.d/gitlab
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab

清理uploads目录

cd /home/git/gitlab
sudo -u git -H mkdir public/uploads
sudo chmod -R u+rwX  public/uploads

启动应用:

service gitlab start

service nginx restart

信息检查:

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

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

6)5.2->5.4

备份:

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

停止服务:

sudo service gitlab stop

更新代码:

cd /home/git/gitlab
sudo -u git -H git fetch
sudo -u git -H git checkout 5-4-stable

更新gitlab-shell:

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9

更新lib等:

cd /home/git/gitlab

sudo -u git -H vim Gemfile ===>gem "modernizr-rails", "2.7.1"

sudo -u git -H bundle install --without development test postgres --no-deployment

sudo -u git -H bundle install --without development test postgres --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

#sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production

更新config文件:

vim /home/git/gitlab/config/gitlab.yml   ===》不改,原因同上  host没变

vim /home/git/gitlab/config/puma.rb    ===》不改

更新启动脚本:

sudo rm /etc/init.d/gitlab
sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-4-stable/lib/support/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab

启动服务:

sudo service gitlab start
sudo service nginx restart

检查运行状态:

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

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

7)5.4->6.0

备份:

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

停止服务:

sudo service gitlab stop

获取新代码:

cd /home/git/gitlab
sudo -u git -H git fetch

sudo -u git -H git stash
sudo -u git -H git checkout 6-0-stable

更新gitlab-shell

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9

安装额外依赖包

yum install python-docutils

更新lib等:

cd /home/git/gitlab

sudo -u git -H vim Gemfile  ===》`gem "modernizr-rails", "2.7.1"``

Gemfile.lock也要修改

sudo -u git -H bundle install --without development test postgres --no-deployment

sudo -u git -H bundle install --without development test postgres --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_groups RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_global_projects RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_keys RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_inline_notes RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production

sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production

sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production

更新config文件

vim /home/git/gitlab/config/gitlab.yml

vim /home/git/gitlab/config/unicorn.rb

更新启动脚本

sudo rm /etc/init.d/gitlab
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab

启动脚本

sudo service gitlab start
sudo service nginx restart

运行检查:

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

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

8)6.0->7.14md

//git stash

8.1)停止服务:

service gitlab stop

8.2)更新ruby==>2.1.6

mkdir /tmp/ruby && cd /tmp/ruby

wget https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.6.tar.gz

tar zxvf ruby-2.1.6.tar.gz

cd ruby-2.1.6
./configure --disable-install-rdoc
make
sudo make install

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

8.3)获取新代码

cd /home/git/gitlab
sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git checkout 7-14-stable

8.4)安装额外包

yum install logrotate cmake krb5-devel nodejs pkg-config  ===>pkg-config不知道redhat包名是上面,which pkg-config显示有输出,代表安装了

8.5)设置redis

由于已经安装了redis,修改配置

sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig

sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf

echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf

sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf

sudo service redis-server restart

sudo usermod -aG redis git

############如果没有在/etc/redis/下发现redis.conf

自己重新拷贝,创建目录即可

cp /opt/redis-xxx/utils/redis_init_script /etc/init.d/redisd

chmod +x /etc/init.d/redisd     ===>之后可以使用service redisd start 启动服务

vim /etc/init.d/redisd  ===>修改redis 的相关信息  如redis config的名字等

mkdir /etc/redis

cp /opt/redis-xxx/redis.conf   /etc/redis/redis.conf

############

sudo -u git -H cp config/resque.yml.example config/resque.yml

sudo -u git -H editor config/resque.yml  ====》默认不用修改

sudo -u git -H sed -i 's|^  # socket.*|  socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml

8.6)更新gitlab-shell

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v2.6.5

8.7)更新lib

cd /home/git/gitlab

sudo -u git -H bundle install --without development test postgres --deployment

====>报Downloading gollum-lib-4.0.2 revealed dependencies not in the API or the lockfile (rouge (~> 1.7.4))

解决方案:修改rouge 版本为1.7.4 ===》修改  Gemfile.lock文件

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production VERSION=20130909132950

sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production

sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites

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

8.8)更新config文件

检查 /home/git/gitlab/config/gitlab.yml   /home/git/gitlab/config/unicorn.rb /home/git/gitlab-shell/config.yml 三个文件的配置

sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb

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

8.9)检查nginx配置

检查nginx.conf配置  ====》可以不用改

检查tmp/uploads目录是否存在==》存在

8.10)启动服务检查运行状态

sudo service gitlab start
sudo service nginx restart

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production  ===》如果报错

检查/home/git/gitlab-shell/config.yml中关于redis的路径/端口/IP是否与redis实际一致===》我的问题是redis-cli路径不对

 9)7.14->8.0 

要求git版本>2.2      ====>符合要求跳过

sudo service gitlab stop

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git checkout 8-0-stable

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v2.6.5

#######安装go

cd /opt/

wget http://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz

sudo tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz

sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/

rm -rf go1.5.linux-amd64.tar.gz

######安装gitlab-git-http-server

cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-git-http-server.git
cd gitlab-git-http-server
sudo -u git -H git checkout 0.2.14
sudo -u git -H make

cd /home/git/gitlab

sudo -u git tee -a config/unicorn.rb <<EOF
listen "127.0.0.1:8080", :tcp_nopush => true
EOF

cd /home/git/gitlab
sudo -u git -H cp config/secrets.yml.example config/secrets.yml
sudo -u git -H chmod 0600 config/secrets.yml

cd /home/git/gitlab

vim Gemfile  Gemfile.lock 把rouge版本改成1.7.4

sudo -u git -H bundle install --without postgres development test --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production

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

###########修改配置文件

更新日志 cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab

更新nginx文件 

cp lib/supportinx/gitlab /etcinx/conf.d/gitlab.conf   
修改如下:

cp config/gitlab.yml.example config/gitlab.yml   ====》参考旧版本修改
  
 

git 路径按照实际修改即可

cp config/database.yml.mysql config/database.yml    ===》以往如前,初心不改  修改账户密码
 
cd /home/git/gitlab-shell
cp config.yml.example config.yml     ====>按照实际修改
 

重启ngnx  gitlab 服务

检查运行状态

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production    =====》实在不想写了,重复次数太多了

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

 10)8.0->8.2升级

停止服务: sudo service gitlab stop

备份:

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

获取最新代码:

sudo -u git -H git fetch --all

sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git stash

sudo -u git -H git checkout 8-2-stable

更新gitlab-shell

cd /home/git/gitlab-shell

sudo -u git -H git fetch

sudo -u git -H git checkout v2.6.8

安装gitworkshore

cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
cd gitlab-workhorse
sudo -u git -H git checkout 0.4.2
sudo -u git -H make

重置lib等目录

cd /home/git/gitlab

sudo -u git -H bundle install --without postgres development test --deployment

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production

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

修改配置文件

cp config/gitlab.yml.example config/gitlab.yml

vim config/gitlab.yml

=====>修该host

cp lib/support/nginx/gitlab  /etc/nginx/conf.d/gitlab8_2.conf

vim /etc/nginx/conf.d/gitlab8_2.conf

===>

启动服务&状态检查

sudo service gitlab start

sudo service nginx restart

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

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

gitlab4.0->5.0->6.0->7.14->8.0->8.2升级的更多相关文章

  1. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    准备篇: CentOS 7.0系统安装配置图解教程 http://www.osyunwei.com/archives/7829.html 一.配置防火墙,开启80端口.3306端口 CentOS 7. ...

  2. CentOS 7.2.1511编译安装Nginx1.10.1+MySQL5.7.14+PHP7.0.11

    准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...

  3. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14方法分享

    一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

  4. centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...

  5. Nginx1.6.0+MySQL5.6.19+PHP5.5.14(centos)

    一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

  6. 手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)

    在平时运维工作中,经常需要用到LNMP应用框架.LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构. 可参考前面的文章: 如何在CentOS 7上搭建LA ...

  7. Curling 2.0 分类: 搜索 2015-08-09 11:14 3人阅读 评论(0) 收藏

    Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14289 Accepted: 5962 Descript ...

  8. paip.php 5.0 5.3 5.4 5.5 -6.0的新特性总结与比较

    paip.php 5.0 5.3 5.4  5.5 -6.0的新特性总结与比较 PHP5的新特性 2 · 对象的参照过渡是默认的(default) 3 · 引入访问属性的限制 3 · 引入访问方法的限 ...

  9. IIS 7.0、IIS 7.5 和 IIS 8.0 中的 HTTP 状态代码 转

    http://support.microsoft.com/kb/943891/zh-cn 日志文件位置 默认情况下,IIS 7.0.IIS 7.5 和 IIS 8.0 将日志文件放在以下文件夹中: i ...

  10. 在CUDA8.0下编译安装OpenCV3.1.0来实现GPU加速(Compiling OpenCV3.1.0 with CUDA8.0 support)

    在CUDA8.0下编译安装OpenCV3.1.0 一.本人电脑配置:ubuntu 14.04, NVIDIA GTX1060. 二.编译OpenCV3.1.0前,读者需要成功安装CUDA8.0(网上有 ...

随机推荐

  1. Luogu 3369 / BZOJ 3224 - 普通平衡树 - [无旋Treap]

    题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=3224 https://www.luogu.org/problemnew/show/P3 ...

  2. 中文乱码与字体库windows

    设置中文后,查看图形有乱码,文字变成了方块 Win+R打开运行,输入fonts,回车进入Windows字体目录,找到微软雅黑-常规字体,复制出来将文件名修改为msyh.ttf,注意后缀ttf. 将ms ...

  3. dp进阶——饥饿的奶牛

    饥饿的奶牛oj上n只有1000,过于水,O(n^2)的算法很容易水过,洛谷上这是一道提高加的题,很难啊,所以要好好拿来练习今天写博客再次复习一下,oi最怕遗忘了. 这道题呢实质是一个区间覆盖的dp,首 ...

  4. linux下nodejs的安装

    一.下载 https://nodejs.org/en/download/ 然后,解压 二.配置环境变量 配置环境变量:在/etc/profile文件新增:export NODE_HOME=/usr/l ...

  5. openssh源码分析笔记

    1.客户端保活: options.client_alive_interval options.client_alive_count_max 在wait_until_can_do_something() ...

  6. 洛谷P3224 永无乡 [HNOI2012] 线段树/splay/treap

    正解:线段树合并 解题报告: 传送门! 这题也是有很多解法,eg:splay,treap,... 然而我都不会我会学的QAQ! 反正今天就只讲下线段树合并怎么做QAQ 首先看到这样子的说第k重要的是什 ...

  7. fdisk vs df

    fdisk工具是分区工具:df是用来查看文件系统(分区)的使用情况的! 当用来查看分区信息时,较为相似: fdisk侧重于显示分区表的信息: df侧重于显示当前系统中所有文件系统的信息: 常用用法: ...

  8. RSA 时序攻击

    RSA的破解从理论上来讲是大数质数分解,可是就是有一些人另辟蹊径,根据你解密的时间长短就能破解你的RSA私钥. 举一个不恰当但是比较容易理解的例子: 密文0101 私钥0110 明文0100 问题的关 ...

  9. 【JMeter】插件安装

    安装插件的方法有两种,一种是传统的方式,即官网下载,本地配置,重启jmeter.现在有一种快捷的方法可以自定义安装插件-插件管理器 JMeter 插件管理器的使用方法很简单:不要手动安装各种插件,它提 ...

  10. VS Code 管理 .NET Core解决方案

    本练习要使用Visual studio code完成一个包含多个项目的解决方案,包括类库和Web项目.结合Visual Studio Code和.NET Core CLI,创建项目结构如下: pied ...