1. 程式人生 > >git 安裝目錄與服務的暫停與啟動

git 安裝目錄與服務的暫停與啟動

git 安裝目錄:

drwxr-xr-x  14 root root  4096 Oct 13 21:17 apache
drwxr-xr-x  10 root root  4096 Jan  2 23:50 gitlab
drwxr-xr-x   2 root root  4096 May  8  2017 IBM
drwx------.  2 root root 16384 May  4  2014 lost+found
drwxr-xr-x   2 root root  4096 Oct 13 22:00 rsync_log
drwxrwx--x   3 root root  4096 May  5  2014 symantec
drwxr-xr-x   3 root root  4096 Oct 13 21:17 zabbix
[
[email protected]
opt]# cd gitlab/ [[email protected] gitlab]# [[email protected] gitlab]# ll total 1880 drwxr-xr-x 2 root root 4096 Oct 27 19:17 bin drwxr-xr-x 19 root root 4096 Nov 21 09:30 embedded drwxr-xr-x 4 root root 4096 Nov 21 09:30 etc drwxr-xr-x 2 root root 4096 Oct 27 19:36 init -rw-r--r-- 1 root root 1858327 Mar 8 2017 LICENSE drwxr-xr-x 2 root root 4096 Oct 27 19:17 LICENSES drwxr-xr-x 2 root root 4096 Oct 27 19:36 service drwxr-xr-x 8 root root 4096 Oct 27 19:36 sv drwxr-xr-x 3 root root 4096 Oct 27 19:36 var -rw-r--r-- 1 root root 19560 Mar 8 2017 version-manifest.json -rw-r--r-- 1 root root 8696 Mar 8 2017 version-manifest.txt [
[email protected]
gitlab]# [root@ gitlab]# [[email protected] gitlab]# cd bin [[email protected] bin]# ll total 20 -rwxr-xr-x 1 root root 1262 Mar 8 2017 gitlab-ctl -rwxr-xr-x 1 root root 250 Mar 8 2017 gitlab-healthcheck -rwxr-xr-x 1 root root 629 Mar 8 2017 gitlab-psql -rwxr-xr-x 1 root root 1226 Mar 8 2017 gitlab-rails -rwxr-xr-x 1 root root 1225 Mar 8 2017 gitlab-rake [
[email protected]
bin]# ls gitlab-ctl gitlab-healthcheck gitlab-psql gitlab-rails gitlab-rake

進入bin下面:

gitlab-ctl指令碼是sh 
#!/bin/bash
#
# Copyright:: Copyright (c) 2012 Opscode, Inc.
# Copyright:: Copyright (c) 2014 GitLab.com
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Ensure the calling environment (disapproval look Bundler) does not infect our
# Ruby environment if gitlab-ctl is called from a Ruby script.
for ruby_env_var in RUBYOPT \
                    BUNDLE_BIN_PATH \
                    BUNDLE_GEMFILE \
                    GEM_PATH \
                    GEM_HOME
do
  unset $ruby_env_var
done

# This bumps the default svwait timeout from 7 seconds to 30 seconds
# As documented at http://smarden.org/runit/sv.8.html
export SVWAIT=30

/opt/gitlab/embedded/bin/omnibus-ctl gitlab /opt/gitlab/embedded/service/omnibus-ctl [email protected]

gitlab-rail:

#!/bin/sh

# Unset ENV variables that might interfere with
# omnibus-gitlab ruby env (looking at you rvm)
for ruby_env_var in RUBYOPT \
                    BUNDLE_BIN_PATH \
                    BUNDLE_GEMFILE \
                    GEM_PATH \
                    GEM_HOME
do
  unset $ruby_env_var
done

error_echo()
{
  echo "$1" 2>& 1
}

gitlab_rails_rc='/opt/gitlab/etc/gitlab-rails/gitlab-rails-rc'
if ! [ -f ${gitlab_rails_rc} ] ; then
  error_echo "$0 error: could not load ${gitlab_rails_rc}"
  error_echo "Either you are not allowed to read the file, or it does not exist yet."
  error_echo "You can generate it with:   sudo gitlab-ctl reconfigure"
  exit 1
fi

. ${gitlab_rails_rc}

cd /opt/gitlab/embedded/service/gitlab-rails

if [ -n "$NO_PRIVILEGE_DROP" ]; then
  privilege_drop=''
elif [ "$(id -n -u)" = "${gitlab_user}" ] ; then
  # We are already running at the intended privilege; don't try to drop
  # privileges again because only root can do that (and we are apparently not
  # root!).
  privilege_drop=''
else
  privilege_drop="-u ${gitlab_user}"
fi

exec /opt/gitlab/embedded/bin/chpst -e /opt/gitlab/etc/gitlab-rails/env ${privilege_drop} -U ${gitlab_user} /opt/gitlab/embedded/bin/bundle exec rails "[email protected]"
啟動git,暫停git和重啟git
# Start all GitLab components
sudo gitlab-ctl start


# Stop all GitLab components
sudo gitlab-ctl stop


# Restart all GitLab components
sudo gitlab-ctl restart

git 安裝的資料或者配置 被根目錄下var有對映:

[[email protected] ~]# cd /var
[[email protected] var]# ll
total 84
drwxr-xr-x.  2 root root  4096 May  4  2014 account
drwxr-xr-x. 10 root root  4096 Jul 24  2014 cache
drwxr-xr-x.  2 root root  4096 Sep  1 08:27 crash
drwxr-xr-x.  4 root root  4096 May  8  2017 db
drwxr-xr-x.  3 root root  4096 May  4  2014 empty
drwxr-xr-x.  2 root root  4096 Jun 28  2011 games
drwxr-xr-x. 27 root root  4096 May  7  2015 lib
drwxr-xr-x.  2 root root  4096 Jun 28  2011 local
drwxrwxr-x.  5 root lock  4096 Jan  3 03:14 lock
drwxr-xr-x.  6 root root  4096 Jan  1 03:47 log
drwx------.  2 root root 16384 May  4  2014 lost+found
lrwxrwxrwx.  1 root root    10 May  4  2014 mail -> spool/mail
drwxr-xr-x.  2 root root  4096 Jun 28  2011 nis
drwxr-xr-x.  3 root root  4096 Oct 27 19:41 opt
drwxr-xr-x.  2 root root  4096 Jun 28  2011 preserve
drwxr-xr-x. 22 root root  4096 Dec 28 19:32 run
drwxr-xr-x. 12 root root  4096 May  4  2014 spool
drwxrwxrwt.  2 root root  4096 Dec 28 19:32 tmp
drwxr-xr-x.  2 root root  4096 Jun 28  2011 yp
[[email protected] var]# cd opt/
[[email protected] opt]# ll
total 4
drwxr-xr-x 12 root root 4096 Nov 21 09:31 gitlab
[[email protected] opt]# cd gitlab/
[[email protected] gitlab]# ll
total 44
drwx------ 2 git          git        4096 Dec  4 19:38 backups
-rw------- 1 root         root         38 Oct 27 19:42 bootstrapped
drwx------ 3 git          git        4096 Oct 26 11:01 git-data
drwxr-xr-x 3 git          git        4096 Oct 27 19:41 gitlab-ci
drwxr-xr-x 9 git          git        4096 Nov 21 09:31 gitlab-rails
drwx------ 2 git          root       4096 Nov 21 09:31 gitlab-shell
drwxr-x--- 2 git          gitlab-www 4096 Jan  3 15:57 gitlab-workhorse
drwx------ 3 root         root       4096 Jan  3 16:07 logrotate
drwxr-x--- 9 root         gitlab-www 4096 Jan  3 15:57 nginx
drwxr-x--- 2 gitlab-redis git        4096 Jan  3 15:57 redis
-rw-r--r-- 1 root         root         40 Oct 27 19:42 trusted-certs-directory-hash
[[email protected] gitlab]# 


應用的日誌被儲存在/var/log下面

其他路徑:

[[email protected] gitlab]# cd backups/
[[email protected] backups]# ll
total 0
-rw-r--r-- 1 git git 0 Oct 26 10:37 1
-rw-r--r-- 1 git git 0 Dec  4 19:38 2
[[email protected] backups]# 
[[email protected] backups]# 
[[email protected] backups]# cd ..
[[email protected] gitlab]# cd git-data/
[[email protected] git-data]# ll
total 4
drwxrws--- 5 git git 4096 Dec  4 14:45 repositories
[[email protected] git-data]# cd repositories/
[[email protected] repositories]# ll
total 12
drwxrwx---  4 git git 4096 Nov 21 09:05 16020099
drwxrwx---  4 git git 4096 Dec  4 14:45 liuhaitao
drwxrwx--- 95 git git 4096 Dec  4 19:17 test1
[[email protected] repositories]# cd ..
[[email protected] git-data]# cd ..
[[email protected] gitlab]# cd gitlab-ci
You have new mail in /var/spool/mail/root
[[email protected] gitlab-ci]# ll
total 4
drwx------ 2 git git 4096 Oct 20 15:40 builds
[[email protected] gitlab-ci]# ls
builds
[[email protected] gitlab-ci]# cd builds/
[[email protected] builds]# ls
[[email protected] builds]# ll
total 0
[[email protected] builds]# cd ..
[[email protected] gitlab-ci]# cd ..
[[email protected] gitlab]# cd gitlab-rails/
[[email protected] gitlab-rails]# ll
total 40
drwx------ 2 git  root       4096 Jan  3 15:54 etc
-rw-r--r-- 1 root root          8 Oct 27 19:42 REVISION
-rw-r--r-- 1 root root         58 Oct 27 19:42 RUBY_VERSION
drwxr-x--x 5 git  gitlab-www 4096 Oct 26 11:53 shared
drwxr-x--- 2 git  gitlab-www 4096 Jan  3 15:57 sockets
drwx------ 3 git  root       4096 Nov 12 18:16 tmp
drwx------ 2 git  root       4096 Oct 27 19:42 upgrade-status
drwx------ 2 git  git        4096 Oct 20 15:40 uploads
-rw-r--r-- 1 root root          7 Oct 27 19:42 VERSION
drwx------ 2 git  root       4096 Oct 27 19:42 working
[[email protected] gitlab-rails]# cd etc
[[email protected] etc]# ll
total 48
-rw-r--r-- 1 root root   399 Oct 27 19:42 database.yml
-rw-r--r-- 1 root root   129 Oct 27 19:42 gitlab_shell_secret
-rw-r--r-- 1 root root    45 Oct 27 19:42 gitlab_workhorse_secret
-rw-r--r-- 1 root root 14577 Nov 21 09:31 gitlab.yml
-rw-r--r-- 1 root root  1383 Oct 27 19:42 rack_attack.rb
-rw-r--r-- 1 root root    51 Oct 27 19:42 resque.yml
-rw-r--r-- 1 root root   619 Oct 27 19:42 secrets.yml
-rw-r--r-- 1 root root   666 Oct 27 19:42 smtp_settings.rb
-rw-r--r-- 1 root root  1612 Jan  3 15:54 unicorn.rb
[[email protected] etc]# 
在 gitlab-rails下面的etc中存放這配置檔案和git ruby 配置檔案,比如unicorn.rb檔案,database.yml檔案;gitlab.yml檔案等
[[email protected] gitlab-rails]# cd ..
[[email protected] gitlab]# ll
total 44
drwx------ 2 git          git        4096 Dec  4 19:38 backups
-rw------- 1 root         root         38 Oct 27 19:42 bootstrapped
drwx------ 3 git          git        4096 Oct 26 11:01 git-data
drwxr-xr-x 3 git          git        4096 Oct 27 19:41 gitlab-ci
drwxr-xr-x 9 git          git        4096 Nov 21 09:31 gitlab-rails
drwx------ 2 git          root       4096 Nov 21 09:31 gitlab-shell
drwxr-x--- 2 git          gitlab-www 4096 Jan  3 15:57 gitlab-workhorse
drwx------ 3 root         root       4096 Jan  3 16:07 logrotate
drwxr-x--- 9 root         gitlab-www 4096 Jan  3 15:57 nginx
drwxr-x--- 2 gitlab-redis git        4096 Jan  3 15:57 redis
-rw-r--r-- 1 root         root         40 Oct 27 19:42 trusted-certs-directory-hash
[[email protected] gitlab]# cd gitlab-shell/
[[email protected] gitlab-shell]# ll
total 4
-rw-r--r-- 1 root root 1567 Oct 27 19:42 config.yml
[[email protected] gitlab-shell]# cd ..
[[email protected] gitlab]# cd gitlab-workhorse/
[[email protected] gitlab-workhorse]# ll
total 4
srwxrwxrwx 1 git  git   0 Jan  3 15:57 socket
-rw-r--r-- 1 root root 40 Oct 27 19:42 VERSION
[[email protected] gitlab-workhorse]# cd ..
[[email protected] gitlab]# cd logrotate/
[[email protected] logrotate]# ll
total 12
-rw-r--r-- 1 root root  425 Oct 27 19:42 logrotate.conf
drwx------ 2 root root 4096 Nov 21 09:31 logrotate.d
-rw-r--r-- 1 root root  842 Jan  3 16:07 logrotate.status
[[email protected] logrotate]# cd ..
[[email protected] gitlab]# 


相關推薦

git 安裝目錄服務暫停啟動

git 安裝目錄: drwxr-xr-x 14 root root 4096 Oct 13 21:17 apache drwxr-xr-x 10 root root 4096 Jan 2 23:50 gitlab drwxr-xr-x 2 root root

linux 下查詢軟體安裝目錄和 redis帶密碼啟動

如果你不知道linux上的redis的安裝目錄,先用 whereis redis

Mongodb 安裝過程服務無法啟動100、48問題

安裝過程: 1.在解壓後的mongodb的資料夾裡建立 data檔案(再往裡新增db檔案)和logs檔案(新建mongodb.log); eg: D:\MongoDB\data\db D:\MongoDB\logs\mongodb.log 2.

命令列方式進行teamviewer安裝服務啟動

1.Ubuntu KaLi 獲取下載:wget -c  url 2.sudo dpkg -i filename 安裝下載的檔案 3.sudo apt-get -f install  4.停止服務。執行命令 sudo teamviewer --daemon stop 5.修改

jira安裝配置服務腳本

jira安裝部署 jira服務腳本 jira授權一、安裝說明系統:CentOS 6.7 x64 export LANG="zh_CN.UTF-8" # 否則中文無法顯示,還是英文安裝java 1.7.x版本jdk安裝mysql 5.1及以上版本二、數據庫配置創建mysql:>>crea

無法向會話狀態服務器發出會話狀態請求。請確保 ASP.NET State Service (ASP.NET 狀態服務)已啟動,並且客戶端端口服務器端口相同...

異常 無法 程序 cnblogs blog net ... .net asp.net 異常的具體顯示如下圖: 解決方案: (該異常並非程序異常,只是沒有開啟進程外session服務,開啟就能解決這樣的問題了) 第一步: 第二步: 重新訪問,網站正常了,問題解決

關於本地服務器存文件目錄成功服務器存文件目錄不成功的問題。

names etc real image 圖片 windows系統 目錄 span 本地 //將獲取的base64字符串 轉換成字節數組 Base64 encoder = new Base64(); byte[] decod

centOS7服務管理啟動流程

當前 接下來 提示 設置 內存 ios 名稱 .gz 還要 centOS7服務管理與啟動流程 centOS7啟動流程 systemd簡介 unit對象 unit類型 特性 service unit文件格式 serv

Git安裝配置

git(一)Git概述 Git是一款免費、開源的分布式版本控制系統,用於敏捷高效地處理任何或小或大的項目。 Git是一個開源的分布式版本控制系統,可以有效、高速的處理從很小到非常大的項目版本管理。[2] Git 是 Linus Torvalds 為了幫助管理 Linux 內核開發而開發的一個開放源碼的版

nagios 服務客戶端監控安裝詳細配置,各配置文件詳解

this sql 引入 apache2 cpu load fine 宕機 pri require nagios 安裝與部署—————— 1、安裝前準備(1)創建nagios用戶和用戶組 [root@localhost ~]#groupadd nagios

http目錄顯示時間服務器相差8小時

nginx pos 顯示時間 utc mage 就是 沒有 代碼 英國 一直用nginx做http服務,代碼裏訪問過文件地址,並未認真關註過訪問http目錄下的時間戳。今天瀏覽文件的時候發現一個問題。web上顯示的文件時間戳與服務器時間相比差8個小時。具體表現看下圖:

CentOS7 - Nginx安裝目錄編譯參數詳解

gpo json nginx安裝 access sco pid 設定 鏈接 pat Nginx 安裝目錄詳解 [root@localhost yum.repos.d]# rpm -ql nginx # Nginx日誌輪轉,用於logrotate服務的日誌切割,定義周期,按天

PostgreSQL 安裝服務管理

ont top sys 賬戶 ddr pts led password mct Windows 安裝過程 從這裏下載二進制安裝包,一步一步按照提示即可。 服務管理 服務的名字可以先使用services.msc查看 λ net start postgresql-x64-10

無法在web服務器上啟動調試,iis未列出打開的URL匹配的網站

log 解決 p地址 地址 ima 綁定 gpo png web服務器 錯誤的原因可能是:在iis的網站上綁定的具體的機器的ip地址。 解決方法:可以在網站上綁定ip地址時選擇“全部未分配”項。 無法在web服務器上啟動調試,iis未列出與打開的URL匹配的網站

linux系統安裝redis服務php redis擴展

php.ini 後臺 yum all 安裝包 客戶端 log config class 一 安裝redis服務 1更新yum源 CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-r

NFS文件系統、服務客戶端安裝、exportfs命令

NFS exportfs命令 NFS服務端安裝 NFS客戶端安裝 NFS介紹 NFS是Network File system的縮寫,也就是網絡文件系統;基於RPC協議進行傳輸; 服務端安裝 yum install -y nfs-utils rpcbind //安裝rpcbind包

eclipse項目轉移至IDEAIDEA tomcat報錯(idea自帶tomcat版本太高)war包部署到win服務idea提交git的總結

image push under 正常 回來 env acc nvi 雲上 eclipse導出項目到idea時,不要導出target; idea打開eclipse項目後,出現junit找不到的問題,原因是jar包缺失,而maven配置的低版本的junit

Git/Github.001.服務器交互數據

github bsp 再次 rep pos git style one epo   比如https://github.com/:   首次下載可以clone: $ git clone https://github.com/yourname/yourrepository

MongoDB4.0在windows10下的安裝服務配置

bpa .html unity 目錄 保持 min file ins 之前 本地安裝及網頁測試 在官網下載最新的安裝文件 下載地址 : https://www.mongodb.com/download-center#community 可以在MongoDB官網選擇Com

如何為虛擬機器中的Ubuntu17安裝SSH服務以及XShell建立連線

本人在Ubuntu中安裝SSH時,在未獲取root許可權的情況下是不能安裝SSH,因此,本人通過以下步驟獲取得到root許可權,獲取步驟如下: 1.首先輸入: sudo passwd root 2.Enter new UNIX password:(在這裡輸入密碼) 3.retype