Deploying Javaweb projects in Linux virtual machines
What you need:
VMware virtual Machines
CentOS System Mirroring
WINSCP Tools
Pietty tools (or No)
Begin:
After installing the virtual machine, it is best to set up a static IP to facilitate
Shell--command parser, also a programming languageBash-a specific instance of the shell, zsh, bash are instances of the shell
The "Echo $SHELL" command can be used in the terminal to view the shell instance currently in use and can be switched to
On Windows with notepadd++ edit a shell script, die or die, back to Linux, edit, or have this \ r, search the next, is this:
http://bluemood.blog.51cto.com/1142811/1030925
‘
because the shell processed the character file in Windows, the string
There are many kinds of arithmetic operations in the shell, such as a=1,b=2, so how to calculate the value of A+b? Can not simply $a+ $B, if this operation, the result is 1+2, obviously not the result we want, the result is 3, we have a few methods:
1. Sometimes operation and maintenance requirements automatically generated Cronab task scheduling, the implementation of the corresponding service name management; #!/bin/bash#athor check crontab crontab_ Add () {cron_path= "$" cat >/etc/cron.d/$
We can pass parameters to the script when executing the Shell script, and the format of the parameters obtained in the script is:$n.n represents a number, 1 is the first argument to execute the script, 2 is the second argument to execute the script,
First, regular expressionA, the basic regular expression
Meta character
Description
.
Match any single character
*
Match any of its preceding characters any time
.*
Share a recently written shell script that enables you to back up the production line files and rollback operations by the file directory structure of the published package.1#!/bin/SH2Path="/home/www/site1"3pub= $path"/release/pub/mboxii/trunk"#发布目录4
Var=value//This is a value assignment.Note that there is no space between the variable and the value, otherwise it will be considered equivalent judgment, such as [var = valu E]//equivalent judgment, the space is particularly important!!!#!/bin/SHCD
Both exec and source belong to the Bash Internal command (builtins commands), where you can view all the internal command information by entering man exec or man source under bash.The bash shell commands are divided into two categories: external
Os:centos/redhat Seriesand tested properly on CentOS 6.7 and CentOS 7.2#!/bin/bash## auth:daxin# time:2018/07/10## nginx start Nginx Web server# # chkconfig:-90# Description:start, S Tops and reload Nginx Web server##
1.shell is a batch program, similar to the Windows BAT file2. When writing the shell, the first line should be #! /bin/bash begins Execute the file using the bash shell.3. Use the # comment (preferably note the function of the shell script in case
The quoting (reference) in the shell can be used to remove the special meaning of a character so that it retains its literal meaning and can be used for a variety of shell Expansion.There are 3 kinds of quoting mechanisms: escape characters, single
1 If ... else ...Basic Format:If conditionThenCommendElseCommendFi Of course you can write to a line, use [] to indicate the boundary, or to indicate a branch. For example: if [ $ (ps -ef | grep -c "SSH" ) -gt 1 ];then echo "true" ; fi
There are many types of for loops in shell scripts, and a brief summary of the following is done today.1. Cyclic Digital#!/bin/bash for((i=1; i; i++)); do Echo $ (expr31); Done #!/bin/bash for i in $ (seq 1 10 ) do echo $ (expr $i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.