一。安裝的時候,讓你輸入代替root用戶的名稱與密碼linux
使用sudo root切換root的時候會要求你輸入密碼,這時候你輸入什麼都不對的git
要想使用的哈,須要給root設置密碼,命令以下:ubuntu
sudo passwd rootcentos
而後輸入兩次密碼瀏覽器
而後註銷,使用其餘用戶登錄。服務器
ctrl+art+t進入命令網絡
二。編輯文件:ssh
1.進入文件目錄下,打vi gitlab.yml ,若是編輯錯了,就按exc,按shift+:,輸入q!就能夠不保存退出ide
2.先用hjkl四個上下左右鍵移動到須要修改的位置,或者是上下左右鍵。gitlab
3,按X刪除想要刪除的內容,若是想刪除整行,按dd
4.在光標處按i,開始輸入內容
5.按exc,按shift+:,輸入:wq保存文件並退出
6.輸入gitlab-ctl stop,輸入gitlab-ctl start重啓
三安裝命令
無版圖
wget https://downloads-packages.s3.amazonaws.com/ubuntu-12.04/gitlab_7.0.0-omnibus-1_amd64.deb
sudo apt-get install openssh-server
sudo apt-get install postfix # sendmail or exim is also OK
sudo dpkg -i gitlab_7.0.0-omnibus-1_amd64.deb
sudo -e /etc/gitlab/gitlab.rb
sudo gitlab-ctl reconfigure
username: root
password: 5iveL!fe
設置後的密碼:12345678
全名:test
用戶名:test1
centos
wget https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab-7.0.0_omnibus-1.el6.x86_64.rpm
sudo yum install openssh-server
sudo yum install postfix # sendmail or exim is also OK
sudo rpm -i gitlab-7.0.0_omnibus-1.el6.x86_64.rpm
Install and start GitLab; open up the firewall
sudo gitlab-ctl reconfigure
sudo lokkit -s http -s ssh # open up the firewall for HTTP and SSH requests
Login by browsing to the host where you installed GitLab
username: root
四,經常使用啓動命令
密碼:1234%^&*nckk
編輯文件命令:vi
git服務器啓動和關閉:gitlab-ctl start(stop)
關閉服務器:shutdown -h now
activemq服務啓動出現locked:是由於啓動了兩個服務
刪除軟件
sudo apt-get remove gitlab
五.查看ip:ip addr
六.技術文檔地址
http://172.16.50.96/
研發入口登陸:
syang/syang
看文檔進研發管理
7解壓文件
安裝 rar 解壓縮文件:
打開終端,輸入命令:
sudo -s -H (讓用戶切換到root最高權限)
在後面輸入你的用戶密碼
而後輸入命令:
sudo apt-get install rar
等着安裝完畢就OK了!
在這裏能夠用命令:
man rar
來查看一下rar命令的詳細狀況之後有rar的文件須要解壓的話,只須要在終端輸入命令:
rar e myfile.rar
就能夠了!
另外你能夠去你的文件夾裏找一個rar的壓縮文件,
點右鍵,你會發現多了一條「解壓到此處的」選擇,是否是方便多了!呵呵!
7zip的安裝:sudo apt-get install p7zip
7zip的解壓:7zr x myfile.7z 或者 7zr e myfile.7z
end output of /opt/gitlab/bin/gitlab-rake
chef:exceptions:childconvergeerror
8.網絡ip
223.203.195.156
9.查看端口
lsof -i:80
10 查看版本信息
cat /etc/issue
sudo lsb_release -a
11 顯示詳細系統信息
lshw
lshw -short
lshw -C memory
12 顯示內核緩衝區系統控制信息
dmesg
13卡死解決
剛開始安裝的時候用着還行,不事後來發現用了一會老是會出現卡死的情況
後來看了下ubuntu12.04的內核是3.2,後來把內核升級到3.5發現這種狀況不會出現了。
查看內核以及升級內核
uname -a
apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal
安裝後發現,firefox瀏覽器開啓的時候有時候會cpu佔用率高達100%,再此才找到3.2內核時候會卡死的緣由。
14.下載軟件地址:
172.16.50.211
192.168.8.231
15.官網下載地址
https://about.gitlab.com/downloads/
16.Ubuntu添加刪除服務
2009-01-18 20:47:52| 分類: Linux |舉報|字號 訂閱
添加一個服務
sudo update-rc.d 服務名 defaults 99
刪除一個服務
sudo update-rc.d 服務名 remove
臨時重啓一個服務
/etc/init.d/服務名 restart
臨時關閉一個服務
/etc/init.d/服務名 stop
臨時啓動一個服務
/etc/init.d/服務名 start
ps -ef | grep 進程ID
17.ubuntu重啓
shutdown -r +3 「The System will reboot after 3 minutes」
18.查看進程
top退出ctrl+c
19.git庫的位置
var/opt/gitlab/git-data
20.root不能修改和刪除的文件,
首先去除i屬性:chattr -i 而後強制刪除:rm -rf
21.查看流量
第一種:安裝 ethstatus 軟件 sudo apt-get install ethstatus
查看 ADSL 的速度 sudo ethstatus -i ppp0
查看 網卡 的速度 sudo ethstatus -i eth0
第二種:nethogs
22.查看系統是32位仍是64位
sudo uname --m若是顯示i686,你安裝了32位操做系統,若是顯示 x86_64,你安裝了64位操做系統
23.Ubuntu下查看軟件版本及安裝位置查看軟件版本:
查看軟件版本:aptitude show xxx也可用apt-show-versions (要先安裝sudo apt-get install apt-show-versions)
查看軟件安裝位置: dpkg -L xxxx
查看軟件是否安裝: dpkg -l | grep filename
24.服務器重啓
shutdown -r -t 500
25.gitlab備份與恢復 git備份
gitlab備份:gitlab-rake gitlab:backup:create
備份到目錄/var/opt/gitlab/backups
gitlab恢復 :中止相關數據鏈接服務
g
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
# 從1393513186編號備份中恢復
gitlab-rake gitlab:backup:restore BACKUP=1466811825
# 啓動
G
Gitlab sudo gitlab-ctl start