One-click installation of Nginx and FSFS Distributed file storage shell scripts

#!/bin/bash# lty 20180116# fastdfs install scriptif [  ' Id -u '  -ne  0 ];then    echo  "Non-root user, script exit"     exit 0fiif  [ ! -f  "/root/soft/fastdfs_install.sh"  ];then    echo  " Reinstall the installation script side after

Shell instance: Back up all modified files in the last day

Backs up all modified files in the current directory within the last 24 hours in a "tarball" (Files that have been processed by tar and gzip).The program code is as follows:#!/bin/bashBACKUPFILE=backup-$(date +%y-%m-%d)#

Shell Introduction and command history

1. What is a shell?Open the system, enter ZS, press the Tab key, the command Zsoelim appears,Description No zsh command, this time can be installed, first enter the command yum list |grep zsh, enter, search,You can see that there are zsh commands,

Shell Script Rman Backup

#!/bin/bashif [$]thenbackup_level=$1elsebackup_level=0fibackup_user=sysbackup_user_pw=oracle#catalog_user=rman #catalog_user_pw =rmanlog_file=/oracle/admin/$ORACLE _sid/rman_backup.logecho "Beginning rman backup ..." > $log _ filedata>> $log

Full-Library cold backup of shell scripts

#!/bin/bashbackup_dir=/oracle/backuplog_file= $ORACLE _base/admin/$ORACLE _sid/cold_backup_$oracle_sid.logecho   "Backuping cold backup"  > $log _filedata>> $log _filesqlplus -s /  As sysdba > $log _fileset pagesize 0 linesize 1000 

The order in which the Bash shell launches the configuration script

1. The way bash checks the environment variable file depends on how the system runs the shell, typically there are 3 ways the system runs the shell:1 shell that runs by default after the system user logs on 2 ) Non-login interactive run shell 3)

One shell per day (vii) IP and PV for the statistics site

Using Nginx log file to count all IP and PV, list the top 10 IP, take confluence Knowledge base system as an example:Nginx log file is/var/log/nginx/access.log# wc -l /var/log/nginx/access.log 95146 /var/log/nginx/access.logShell script:# vim

Shell Exercises (ii)

Exercise 1: Counting Memory usageRequirements: Write a script that calculates the amount of memory that is consumed by all processes in the Linux system. (Hint: use PS or top command)Reference Answer:#!/bin/bash# date:2018 February 6 # using top to

The meaning of each parameter in the shell script

File expression-e filename true if filename exists-d filename If filename is a directory, true-F filename True if filename is a regular file-L filename True if filename is a symbolic link-r filename If filename is readable, true-W filename if

Shell Script Basics

Shell Script Basics脚本: 一个可以执行的文件,实现某种功能 – 需要提前设计、智能化难度大 – 批量执行、效率高 – 方便在后台静悄悄地运行Standardize the general composition of shell scripts? #! Environmental Declaration (what procedure to translate the following command)? # comment Text? Executable code

Pipe and job control, shell variables, and environment variable profiles

One, pipe and operation control1, the pipe symbol "|", is to put the results of the previous command run to the following command.LS |wc-l; LS |grep test2, how we are editing a file, want to pause this operation and exit can enter Ctrl Z Pause task3.

Shell programming------Looping Statements

1. For Loop statement:Two common ways to use for: notation (1): for inch 1 2 3 4 5 (PS in $ (seq15 in {1). 5 }) do echo"$val " DoneNotation (2):   for ((i=0;i; i++)) ( PS: Must Be for (()) ) { "val=i%2"

Using the shell to develop the Rsync service startup script

Using shell functions to develop the Rsync service startup script, previously unprofessional#!/bin/bash#chkconfig: 2345  20 80                         #这两行加入kconfig #description:  saves and restores system entropy  poolsource /etc/init.d/functions   

Get disk IOPS value [Shell]

Get disk IOPS value [Shell]#!/bin/shDISK="vdc1"function getIops(){READ1=`cat /proc/diskstats |grep "${DISK} "|awk ‘{print $4}‘`WRIT1=`cat /proc/diskstats |grep "${DISK} "|awk ‘{print $8}‘`sleep 10READ2=`cat /proc/diskstats |grep "${DISK} "|awk

About shell input and output redirection

The following is a syntax format for input and output redirection Two overview Output input redirectionGreater than sign >: Indicates output redirection (overwrites the original file)Less than Double greater than sign >>: (indicates output

Shell script app (for, while, Case statement application)

1, for: Read different variable values, execute the same set of commands one by one, until the value is complete exit, variable values are separated by a spaceSyntax: For variable value in value listDoCommandDone2, while: Repeated testing a

Unable to delete issue after using HBase shell in Xshell

The issue cannot be removed after using HBase shell entry in Xshell:In the HBase shell, the wrong input instructions can not be deleted using backspace and delete, the use of the people know that this is a lot of pits, there is much distress!OK,

Win10, the Cmd,power shell is set to the default encoding of ' UTF-8

Power ShellNote: The following content is written on a non-Windows platform, there may be spelling errors, if any, please correct me, I will amend as soon as possible. It can be implemented using the PowerShell configuration file (\ Profile). \)The

Shell script sum (Code instance), shell script sum instance

Shell script sum (Code instance), shell script sum instance The principle is as follows: 1) define two variables I, sum, both initialized to 0 2) define a loop body, calculate the sum. 3) Use let $ sum = $ sum + $ I to replace the value. 3) sum of

Shell scripts automatically log on to the server and install JDK (Code tutorial), shelljdk

Shell scripts automatically log on to the server and install JDK (Code tutorial), shelljdk1. Write the installation script Install. sh ! /Bin/bashURL = "https: // ***/jdk-8u161-linux-x64.tar.gz "yum install-y wgetwget $ URLtar-zxvf jdk-8u161-linux-

Total Pages: 541 1 .... 292 293 294 295 296 .... 541 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.