work operation

1. Format the disk: sudo mkfs -t ext4 /dev/sd(a,b,c,d...)
2. Partition the disk: sudo fdisk /dev/sd*----m----n ----e----....---p---w---q Follow the steps
3. Check the disk partition: sudo fdisk -l
4. Check which partition a folder belongs to sudo df - h folder
5. Disk mount: sudo mount -t ext4 /dev/sd* folder (this folder must be created first)
6. Disk unmount: sudo umount folder
7. Automatically mount at boot: sudo vim /etc/ fstab, add "/dev/sd* folder ext4 defaults 0 0"

20. Generate sshkey, in ~/.ssh directory, use ssh-keygen to generate ssh key, the one in id_rsa.pub is the public key Key

30. Decompress tar -zxf compressed package -C destination path, where -C means that if the destination path does not exist, create it; the f parameter cannot be followed by parameters, and only the compressed package file path can be connected;

40. Remote copy : "scp username@IP: path local path", if it is a directory add parameter -r, -r must be behind scp
41. Remote login: "ssh username@IP"

50. After protocBuffer is installed, the library files are all in /usr/local/lib, and ubuntu does not add lib to the environment variable, so be sure to add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; after the ~/.profile file;
51. Use source ~/.profile or source /etc/profile after changing ~/.profile or /etc/profile to make environment variables take effect immediately

100. git clone <repo> <directory>, copy from remote repository (repo) File to the local directory (directory), if the directory is empty, copy to the current directory; for
    example: git clone git://github.com/schacon/grit.git, will create the grit directory in the current directory
    git clone git:// github.com/schacon/grit.git mygrit will create the mygrit directory in the current directory    

101. git add adds files to the staging area;
102. git commit commits the staging area files to the local warehouse;
103. git submodule foreach git checkout 2.4.0

104. git clone git@server7:main/pengyun-main.git (clone main to local)
    cd pengyun-main
    git submodule init    
    git checkout 2.4.0

    git clone git@server7:main/pengyun-datanode_binary.git( The datanode_binary module is not in the main, so it needs to be pulled separately)
    cd pengyun-datanode_binary
    git checkout 2.4.0
    cd ..

    git clone git@server7:main/pengyun-junittests.git (junittests module is not in main, so it has to be pulled separately)
    cd pengyun-junittests
    git checkout 2.4.0
    cd ..
    

    maven Compile: mvn clean install -DskipTests -Dproguard=off (-rf module name)
    package
    cd pengyun-main
    bin/CreateDeployPackage.pl -d /opt


105. git switch version
    git checkout 2.3.0
    git pull origin 2.3.0
    git submodule foreach git checkout 2.3.0
    git submodule foreach git pull origin 2.3.0

    If there is a file conflict in the middle, you can check it with git status first to confirm that it needs to be saved, then
    git stash
    and then execute checkout, after pull, execute
    git stash pop
    to remove the previous file. The file remains, and if there is a conflict after the pop, resolve the conflict

106. git submit
    git submodule foreach git status to check the changes of all submodules

    cd to the corresponding subdirectory
    git status to check if there are any changes (if there are changes, it will be red at this time)
    git diff <file name> Check the changed files
    git add <.> Put all the changed files in the current directory into the staging area git add <file name> Put the specified file into the staging area; check with git status after saving, the changed files are green, you can use git at this time reset HEAD <file name> to name
    git commit -m "message CR@wangzhongyuan" Save the files in the temporary area to the local library
    git push origin 2.3.0 Push the files in the local library to the remote

    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325296873&siteId=291194637