一。安裝的時候,讓你輸入代替root用戶的名稱與密碼
使用sudo root切換root的時候會要求你輸入密碼,這時候你輸入什么都不對的
要想使用的哈,需要給root設置密碼,命令如下:
sudo passwd root
然后輸入兩次密碼
然后注銷,使用其他用戶登陸。
ctrl+art+t進入命令
二。編輯文件:
1.進入文件目錄下,打vi gitlab.yml ,如果編輯錯了,就按exc,按shift+:,輸入q!就可以不保存退出
2.先用hjkl四個上下左右鍵移動到需要修改的位置,或者是上下左右鍵。
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