Common commands for ubuntu and Common commands for ubuntu
I. During installation, you are asked to enter the name and password for replacing the root user.
When you use sudo root to switch to the root user, you are required to enter the password. At this time, nothing is wrong.
To use the command, set the password for the root user. The command is as follows:
Sudo passwd root
Enter the password twice.
Log out and use another user to log in.
Ctrl + art + t enter the command
II. Edit file:
1. Enter the file directory and press vi gitlab. yml. If the file is incorrectly edited, press exc, shift +:, and enter q! You can exit without saving
2. First Use the hjkl four upper and lower keys to move to the location to be modified, or the upper and lower left keys.
3. Press X to delete the content you want to delete. If you want to delete the entire row, press dd
4. Press I at the cursor to start inputting content
5. Press exc, shift +:, and enter: wq to save the file and exit.
6. Enter gitlab-ctl stop and gitlab-ctl start to restart.
Three installation commands
No Layout
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. rb
Sudo gitlab-ctl reconfigure
Username: root
Password: 5 iveL! Fe
Set Password: 12345678
Full name: test
Username: 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
4. Common Startup commands
Password: 1234% ^ & * nckk
Edit FILE command: vi
Git server startup and shutdown: gitlab-ctl start (stop)
Shut down the server: shutdown-h now
Locked occurs when the activemq service is started: because two services are started.
Delete Software
Sudo apt-get remove gitlab
5. View ip: ip addr
6. Technical Document address
Http: // 172.16.50.96/
R & D portal Logon:
Syang/syang
View documents for R & D Management
7. decompress the file
Install the rar decompression file:
Open the terminal and enter the following command:
Sudo-s-H (allows users to switch to the highest root permission)
Enter your User Password
Then enter the command:
Sudo apt-get install rar
Wait until the installation is complete!
Here you can use the command:
Man rar
To view the details of the rar command, if rar files need to be decompressed, you only need to enter the command on the terminal:
Rar e myfile.rar
That's it!
In addition, you can find a rar compressed file in your folder,
Right-click and you will find an option "extract to here", which is more convenient! Haha!
7zip installation: sudo apt-get install p7zip
Decompress 7zip: 7zr x myfile.7z or 7zr e myfile.7z
End output of/opt/gitlab/bin/gitlab-rake
Chef: exceptions: childconvergeerror
8. Network ip
223.203.195.156
9. view the port
Lsof-I: 80
10 view version information
Cat/etc/issue
Sudo lsb_release-
11. display detailed system information
Lshw
Lshw-short
Lshw-C memory
12. Display kernel buffer system control information
Dmesg
13 kill
It was okay to use it at the beginning of the installation, but later I found that it would always be stuck when I used it for a while.
Later, we can see that the kernel of ubuntu12.04 is 3.2. Later, we upgraded the kernel to 3.5 and found that this situation would not happen.
View and upgrade the kernel
Uname-
Apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal
After the installation, it is found that when the firefox browser is enabled, sometimes the cpu usage is as high as 100%, and then the cause of 3.2 kernel freezing is found.
14. download the software:
172.16.50.211
192.168.8.231
15. Official Website
Https://about.gitlab.com/downloads/
16. add and delete services in Ubuntu
20:47:52 | category: Linux | report | font size subscription
Add a service
Sudo update-rc.d service name defaults 99
Delete a service
Sudo update-rc.d service name remove
Temporarily restart a service
/Etc/init. d/service name restart
Temporarily close a service
/Etc/init. d/service name stop
Start a service temporarily
/Etc/init. d/service name start
Ps-ef | grep process ID
17. ubuntu restart
Shutdown-r + 3 "The System will reboot after 3 minutes"
18. View Processes
Top exit ctrl + c
19. Location of the git Repository
Var/opt/gitlab/git-data
20. root files cannot be modified or deleted,
First remove the I attribute: chattr-I and then force Delete: rm-rf
21. view traffic
First: install the ethstatus software sudo apt-get install ethstatus
View ADSL speed sudo ethstatus-I ppp0
View the speed of the NIC sudo ethstatus-I eth0
Type 2: nethogs
22. Check whether the system is 32-bit or 64-bit.
Sudo uname -- m if i686 is displayed, you have installed a 32-bit operating system. If x86_64 is displayed, you have installed a 64-bit operating system.
23. view the software version and installation location in Ubuntu:
View the software version: aptitude show xxx can also be used with apt-show-versions (install sudo apt-get install apt-show-versions first)
View the software installation path: dpkg-L xxxx
Check whether the software is installed: dpkg-l | grep filename
24. Server restart
Shutdown-r-t 500
25. gitlab backup and recovery git backup
Gitlab backup: gitlab-rake gitlab: backup: create
Back up to directory/var/opt/gitlab/backups
Gitlab recovery: Stop data connection services
G
Gitlab-ctl stop unicorn
Gitlab-ctl stop sidekiq
# Recovering from backup of 1393513186 #
Gitlab-rake gitlab: backup: restore BACKUP = 1466811825
# Start
G
Gitlab sudo gitlab-ctl start