only load static files in the directory specified in the setting.py configuration in the development mode, and the static and media directories are created in the production environment through Nginx configuration.9. Add site monitoring scripts to Scheduled tasks*/5 * * * */usr/local/bin/python/www/oliver/webapi/sniffer.py >/dev/null 2>110. Add the following configuration to the/etc/profile file of the host that needs to do the security auditHistsize=1200export PATH USER LOGNAME MAIL HOSTNAME h
Optimize content:(1. Set the history record(2. Add a normal user, set sudo permissions(3. Disable root remote user login(4. Modify the remote port(5. Thin boot server(6. Turn off SELinux(7. Configure Iptables(8. Modify the maximum number of connections Ulimit(9. Disable the use of Ctrl+alt+del shortcuts to restart the server(10. Modify the default DNS(11. Install the necessary software, update the Yum source [Epel Source](12. Update the kernel and software to the latest version(13. Optimize the
10/sbin/iptables-a input-p tcp-m tcp–tcp-flags syn,rst,ack syn-m limit--limit 20/s- -limit-burst 200-j accept# prevents various port scans, limiting SYN and ACK syn to no more than 200 per second, lest you run out of digital bandwidth/sbin/iptables-a output-p Icmp-oEth0-j accept/sbin/iptables-a input-p ICMP--icmp-type echo-reply-s 0/0-i eth0-j accept/sbin/iptables-a input-p IC MP--icmp-type Destination-unreachable-s 0/0-i eth0-j accept/sbin/iptables-a input-p ICMP--icmp-type time-exceeded- S 0/
1. Unity Resource Extraction Tool: disunity
: Https://github.com/ata4/disunity
Usage: Java-jar disunity. Jar extract/.../*. Assets
2. For textures in the KTX format, we can convert them to the PNG format.
Tool: powervr tools and SDK Components
: Http://community.imgtec.com/developers/powervr/installers/
In the pvrtextoolgui, you can directly open the KTX texture and save it as PNG. You can also use the command line tool pvrtextoolcli under the CLI directory for batch conversion.
Appendix: A shel
SourceCodeDistribution of support_filesDirectory. If you want to use them, you need to copy them to the appropriate directory MySQL/bin.#./MySQL. Server start
How does Sun solariys automatically enable MySQL upon startup?Write a start and close batch processing file web (under the path/etc/init. d). The content is as follows:
#! /Bin/shOpt _ = $1
Case "$ opt _" inStart)/Bin/echo "$0: (start )"## Your Service Startup command goes here.#/Usr/loca
* | rxvt *)PS1 = "\ [\ e] 0; $ {debian_chroot: + ($ debian_chroot)} \ U @ \ H: \ W \ A \] $ PS1";;*);;Esac
# Enable Color support of LS and also add handy aliasesIf [-x/usr/bin/dircolors]; thenTest-R ~ /. Dircolors eval "$ (dircolors-B ~ /. Dircolors) "| eval" $ (dircolors-B )"Alias ls = 'ls -- color = auto'# Alias dir = 'dir -- color = auto'# Alias vdir = 'vdir -- color = auto'
Alias grep = 'grep -- color = auto'Alias fgrep = 'fgrep -- color = auto'Alias egrep = 'egrep -- color = auto'Fi
# So
placed in one line, provided that if is followed by the command plus points. For example, if test-r/etc/passwd; then cat/etc/passwd; fi 2. Command basic format for case Condition Selection: case variable in matching string 1) command ...;; match string 2) command ...;;............ match string n) command ...;; *) command ...;; esac matching string format: exact match of a string. * Any string of any length, including an empty string. For example, j * k matches jack and jak .? Single character.
constantly return and correct your input errors. In your. bashrc file, shell automatically fixes all input errors when identifying the file or path name. C code shopt-s cdspell 8. Open the application in the background when you patrol the command line, you may need to perform another task, such as responding to an email. Of course, you can open the GUI application from the terminal by executing other commands. You only need to call their names. In th
--exclude='*.out'/path/to/source/ user@hostB:/path/to/dest/
Here:
-a: Recursion to the directory, that is, copying all files and subdirectories. In addition, open the archive mode and all other options (equivalent-rlptgoD)
-v: Detailed output
-e ssh: Use ssh as the remote shell so that everything is encrypted.
--exclude='*.out': Exclude matching files, such as *. out or *. c.
Rsync command example
In this example~/virt/Recursively copy all files in the directory, but exclude all *. new fil
essential difference between "background tasks" and "foreground tasks" is only one: whether to inherit standard input. Therefore, the user can also enter additional commands while performing background tasks.
three, Sighup signalbecomes a "background task", does a process become a daemon? Or, after the user exits the session, will "background tasks" continue to execute? The Linux system is designed like this.
1. The user is ready to exit the session2. The system sends a SIGHUP sig
System Integrity Audit ToolThe shell script is as follows:The #!/bin/bash## variable is first declared to use shopt-s-onounset# declaration # build Date date=$ (date+ '%Y%m%d%H %m%s ') # join the approved directory #Dirs = "/bin/sbin/usr/bin /usr/sbin/lib/usr/local/sbin/usr/local/bin/usr/local/lib "# temp file #TMP_file =$ (mktemp/tmp/ Check. XXXXXX) # File checksum store file fp= "/root/fp. $Date. Chksum" # What kind of checksum tool checker= "/us
, exit, export, FC, FG,Getopts, hash, help, history, jobs, kill, let, local, logout, popd, printf,pushd, PWD, read, ReadOnly, return, set, shift, shopt, source, suspend, test,Times, trap, type, typeset, Ulimit, Umask, Unalias, unset, waitThe second type: Compound CommandsFor example, if while and so onSee Mans BashThe third type: function[[Email protected] ~]# function CD () {echo ' my function CD ';}What functions can be found by the set command[[Ema
two types, the built-in command and the external command:Built-in commands: commands implemented in shell programs are built-in commands;External command: There is an executable file corresponding to the command name in a location on the file system;The command type can be judged using the type command. [[Emailprotected]~]#type-acdcdisashellbuiltin[[email protected]~]#typecatcatishashed (/bin/cat) [[emailprotected] ~]#manbuiltin #查看所有内置命令BASH_BUILTINS (1) bash_builtins (1) namebash,:, .,[,
programmable command completion function work in your terminal, you only need to perform/etc/bash_completion as follows:# . /etc/bash_completionYou can also cancel the comments in the/ETC/BASH.BASHRC (from Ubuntu Linux 13.04 system), so that you don't need to execute the above command:# # # Enable bash completion in interactive shellsif! Shopt-oq POSIX; Thenif [-f/usr/share/bash-completion/bash_completion]; Then. /usr/share/bash-completion/bash_compl
In practice, by using Git diff to calculate the number of code changes, there is a need to just count certain types of files (files with special suffix names/extensions), such as: Only the variables for files in the current git repo. java,. xml,. c,. cpp. There are two ways to make git count according to the file suffix name and to count the eligible files in each subdirectory. 1. Use the ' *.java ' and ' *.xml ' directly, if your git version is newer (for example: Git >= 1.7.8 version)
wildcard mode in the shell.
code is as follows
copy code
/> shopt-s extglob #打开该扩展模式 /> answer= Not really ' /> If [[$answer = [Nn]o? (way |t really)]] > then N bsp; > echo "I am sorry." > Fi I am sorry.
For the extended wildcard character in this example, a specific explanation is needed here. [Nn]o matches no or no,? (Way|t really) represents 0 or 1 (way or t really), so the string that the ans
prompt, default is [\[emailprotected]\h \w]\$, where \u is the user name, \h is the hostname, \w is the current The basename,\$ of the working directory is the replacement character for the user uid. Define and use variables Var=value Note: 1, = no space on either side var = value (X) 2, the variable has a space when it must be "" or "' cause to take value: ${var} or $var Note: 1. If the variable value refers to a different variable, you must use double quotation marks. Because single
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.