diff --git a/MC.repo b/MC.repo new file mode 100644 index 0000000..dd37c8e --- /dev/null +++ b/MC.repo @@ -0,0 +1,108 @@ +# CentOS-Base.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# +# If the mirrorlist= does not work for you, as a fall back you can try the +# remarked out baseurl= line instead. +# +# + +[base] +name=CentOS-$releasever - Base - mirrors.aliyun.com +failovermethod=priority +baseurl=http://mirrors.pubyun.com/centos/$releasever/os/$basearch/ +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os +gpgcheck=1 +gpgkey=http://mirrors.pubyun.com/centos/RPM-GPG-KEY-CentOS-6 + +#released updates +[updates] +name=CentOS-$releasever - Updates - mirrors.aliyun.com +failovermethod=priority +baseurl=http://mirrors.pubyun.com/centos/$releasever/updates/$basearch/ +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates +gpgcheck=1 +gpgkey=http://mirrors.pubyun.com/centos/RPM-GPG-KEY-CentOS-6 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras - mirrors.aliyun.com +failovermethod=priority +baseurl=http://mirrors.pubyun.com/centos/$releasever/extras/$basearch/ +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras +gpgcheck=1 +gpgkey=http://mirrors.pubyun.com/centos/RPM-GPG-KEY-CentOS-6 + +#additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus - mirrors.aliyun.com +failovermethod=priority +baseurl=http://mirrors.pubyun.com/centos/$releasever/centosplus/$basearch/ +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus +gpgcheck=1 +enabled=0 +gpgkey=http://mirrors.pubyun.com/centos/RPM-GPG-KEY-CentOS-6 + +#contrib - packages by Centos Users +[contrib] +name=CentOS-$releasever - Contrib - mirrors.aliyun.com +failovermethod=priority +baseurl=http://mirrors.pubyun.com/centos/$releasever/contrib/$basearch/ +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib +gpgcheck=1 +enabled=0 +gpgkey=http://mirrors.pubyun.com/centos/RPM-GPG-KEY-CentOS-6[epel] +name=Extra Packages for Enterprise Linux 6 - $basearch +baseurl=http://mirrors.pubyun.com/epel/6/$basearch +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch +failovermethod=priority +enabled=1 +gpgcheck=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 6 - $basearch - Debug +baseurl=http://mirrors.pubyun.com/epel/6/$basearch/debug +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=0 + +[epel-source] +name=Extra Packages for Enterprise Linux 6 - $basearch - Source +baseurl=http://mirrors.pubyun.com/epel/6/SRPMS +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=0 +[epel-testing] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch +baseurl=http://mirrors.pubyun.com/epel/testing/6/$basearch +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug +baseurl=http://mirrors.pubyun.com/epel/testing/6/$basearch/debug +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 + +[epel-testing-source] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source +baseurl=http://mirrors.pubyun.com/epel/testing/6/SRPMS +#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 +gpgcheck=1 \ No newline at end of file diff --git a/PerfectSSL.conf b/PerfectSSL.conf new file mode 100644 index 0000000..d2971ba --- /dev/null +++ b/PerfectSSL.conf @@ -0,0 +1,53 @@ +## +## 本配置评分可以达到 A+,评分地址: https://www.ssllabs.com/ssltest/ +## 更多配置信息可以看: https://mozilla.github.io/server-side-tls/ssl-config-generator/ +## + +# Nginx 1.9+ 才支持 HTTP2 协议 +# listen 443 ssl http2; +listen 443 ssl; + +# 开启 SSL 功能 +ssl on; + +# 修改这里,SSL 证书文件路径,由证书签发机构提供 +ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; + +# 修改这里,SSL 密钥文件路径,由证书签发机构提供 +ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; + +# 修改这里,CA 根证书文件路径,由证书签发机构提供 +ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem; + +# 修改这里,Diffie-Hellman 密钥文件路径,建议定期更改 +# 生成方法: openssl dhparam -out dhparam.pem 4096 +ssl_dhparam /etc/nginx/ssl/dhparam.pem; + +# 修改这里,加密或解密 session_ticket 密钥文件路径,建议定期更改 +# 生成方法: openssl rand 48 > session_ticket.key +ssl_session_ticket_key /etc/nginx/ssl/session_ticket.key; + +# TLSv1.3 需要 Nginx 1.13+,OpenSSL draft-18+ 分支 +# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; +# ssl_ciphers "TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"; + +ssl_protocols TLSv1 TLSv1.1 TLSv1.2; +ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"; + +ssl_prefer_server_ciphers on; +ssl_session_timeout 1d; +ssl_session_cache shared:SSL:50m; +ssl_session_tickets on; +ssl_buffer_size 1400; +ssl_stapling on; +ssl_stapling_verify on; + +# 修改这里,国内填 223.5.5.5 223.6.6.6,国外填 8.8.4.4 8.8.8.8 +resolver 8.8.4.4 8.8.8.8 valid=300s; + +resolver_timeout 5s; + +add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; +add_header X-Content-Type-Options "nosniff"; +add_header X-Frame-Options "DENY"; +add_header X-XSS-Protection "1; mode=block"; diff --git a/config/.vimrc b/config/.vimrc new file mode 100644 index 0000000..c9e188d --- /dev/null +++ b/config/.vimrc @@ -0,0 +1,16 @@ +filetype on +syntax on +set number +set history=1000 +set background=dark +set wrapscan +set autoindent +set smartindent +set tabstop=4 +set shiftwidth=4 +set showmatch +set showmode +set guioptions-=T +set ruler +set hlsearch +set incsearch \ No newline at end of file diff --git a/config/.zshrc b/config/.zshrc new file mode 100644 index 0000000..3cc0c04 --- /dev/null +++ b/config/.zshrc @@ -0,0 +1,99 @@ +# Path to your oh-my-zsh installation. +export ZSH=/Users/maicong/.oh-my-zsh +## export ZSH=/root/.oh-my-zsh +export all_proxy='socks5://127.0.0.1:1080' +# Set name of the theme to load. +# Look in ~/.oh-my-zsh/themes/ +# Optionally, if you set this to "random", it'll load a random theme each +# time that oh-my-zsh is loaded. +ZSH_THEME="robbyrussell" +#ZSH_THEME="aussiegeek" +#ZSH_THEME="xxf" +#ZSH_THEME="agnoster" + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(autojump brew brew-cask colored-man-pages command-not-found common-aliases composer copydir copyfile cp emoji emoji-clock encode64 fancy-ctrl-z git gitfast git-extras git-flow github git-hubflow gitignore git-prompt git-remote-branch grunt history history-substring-search jsontools jump man mix mix-fast node npm osx python svn sublime terminalapp thefuck urltools vim-interaction vi-mode zsh-autosuggestions zsh-completions zsh-syntax-highlighting zsh-navigation-tools) + +#autoload -U compinit && compinit + +# User configuration + +export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" +# export MANPATH="/usr/local/man:$MANPATH" + +source $ZSH/oh-my-zsh.sh + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# ssh +# export SSH_KEY_PATH="~/.ssh/dsa_id" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +alias fuck='$(thefuck $(fc -ln -1 | tail -n 1)); fc -R' +alias cnpm="npm --registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc" + +source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +export PATH="$(brew --prefix homebrew/php/php70)/bin:/usr/local/sbin:$PATH" + +[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh +## [[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh diff --git a/scrollList.js/scrollList.js b/scrollList.js/scrollList.js new file mode 100644 index 0000000..ee73a9b --- /dev/null +++ b/scrollList.js/scrollList.js @@ -0,0 +1,111 @@ +/** + * + * 列表滚动侦听 + * + * 此插件备用,暂不加说明 + * + * @author MaiCong (i@maicong.me) + * @create 2016-09-12 23:14:35 + * @update 2016-09-12 23:14:35 + * @since 0.1 + */ + +!(function ($) { + $.fn.scrollList = function (options) { + var defaults = { + listBlock: '.list-block', + listElem: '.list-group', + listTitle: '.list-title', + navBlock: '.list-index', + navElem: 'span' + }; + var opts = $.extend(defaults, options || {}), + isJump = false, + $elems = [], + $nav = [], + $this = $(this), + $listBlock = $this.find(opts.listBlock), + $listElem = $listBlock.find(opts.listElem), + $navBlock = $this.find(opts.navBlock); + + // 监听滚动 + $this._scroll = function ($navElem) { + var isScrolling = false, timer = null; + $.map($navElem, function (e) { + $nav.push({ + 'offset': $(e).position().top + }); + }); + $listBlock.on('scroll', function () { + var _top = $(this).scrollTop(), + _eNum = Math.floor($navBlock.height() / 2 / $navElem.height()), + _offset = 0, i = 0; + if (timer !== null) { + window.clearTimeout(timer); + } + timer = window.setTimeout( function () { + for (; i < $elems.length; i++) { + _offset = (isJump) ? $elems[i].offset: $elems[i].offheight; + if (_top <= _offset) { + break; + } + } + if ($navBlock[0].scrollHeight > $navBlock.height()) { + if (isScrolling) { + return false; + } + isScrolling = true; + $navBlock.scrollTo({ + to: i > _eNum ? $nav[i].offset - $navBlock.height() / 2: 0, + callback: function () { + isScrolling = false; + } + }); + } + isJump = false; + $navElem.eq(i).addClass('active').siblings(opts.navElem).removeClass('active'); + }, 150); + }); + }; + + // 配置 + $this._init = function () { + // 遍历列表 + $.map($listElem, function (elem, i) { + var _height = $(elem).height(), + _offset = $(elem).position().top, + _title = $(elem).find(opts.listTitle).text(); + $elems.push({ + 'height': _height, + 'offset': _offset, + 'offheight': _height + _offset, + }); + if (i === $listElem.length - 1) { + $(elem).css({ + marginBottom: $listBlock.height() - _height + 4 + 'px' + }); + } + $navBlock.append($('<' + opts.navElem + '/>').text(_title)); + }); + $navBlock.find(opts.navElem).eq(0).addClass('active'); + + // 判断事件 + var $navElem = $navBlock.find(opts.navElem); + $navElem.on('click', function () { + var j = $(this).index(); + if ($elems[j]) { + isJump = true; + $listBlock.scrollTo({ + to: $elems[j].offset + }); + } + }); + + $this._scroll($navElem); + + window.initialledScroll = true; + }; + + return $this._init(); + }; +})(window.Zepto); diff --git a/scrollTo.js/README.md b/scrollTo.js/README.md new file mode 100644 index 0000000..41a5a96 --- /dev/null +++ b/scrollTo.js/README.md @@ -0,0 +1,16 @@ +scrollTo 滚动到指定位置插件 +======= + +有两个版本,选其一就行 + +### Zepto版 滚动到指定高度 + +``` +$('body').scrollTo({ to: 0 }); +``` + +### 非 Zepto 版 + +``` +animatedScrollTo(document.body, 0); +``` \ No newline at end of file diff --git a/scrollTo.js/scrollTo.js b/scrollTo.js/scrollTo.js new file mode 100644 index 0000000..b8f7a41 --- /dev/null +++ b/scrollTo.js/scrollTo.js @@ -0,0 +1,98 @@ +/** + * + * scrollTo 滚动到指定位置插件 + * + * 有两个版本,选其一就行 + * + * @author MaiCong (i@maicong.me) + * @create 2016-09-12 22:59:37 + * @update 2016-09-12 22:59:37 + * @since 0.1 + */ + +// Zepto版 滚动到指定高度 +// +// $('body').scrollTo({ to: 0 }); +// +!(function ($) { + $.fn.scrollTo = function(options){ + var defaults = { + to : 0, + durTime : 350, + delay : 10, + callback: null + }; + var opts = $.extend(defaults,options), + timer = null, + _this = this, + curTop = _this.scrollTop(), + subTop = opts.to - curTop, + index = 0, + dur = Math.round(opts.durTime / opts.delay), + smoothScroll = function(t){ + index++; + var per = Math.round(subTop/dur); + if(index >= dur){ + _this.scrollTop(t); + window.clearInterval(timer); + if(opts.callback && typeof opts.callback === 'function'){ + opts.callback(); + } + return; + }else{ + _this.scrollTop(curTop + index*per); + } + }; + timer = window.setInterval(function(){ + smoothScroll(opts.to); + }, opts.delay); + return _this; + }; +})(window.Zepto); + + +// 非 Zepto 版 +// +// animatedScrollTo(document.body, 0); +// +var animatedScrollTo = function(element, to, duration, callback) { + var requestAnimFrame = (function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); }; })(); + var easeInOutQuad = function(t, b, c, d) { + t /= d / 2; + if (t < 1) return c / 2 * t * t + b; + t--; + return -c / 2 * (t * (t - 2) - 1) + b; + }; + var start = element.scrollTop, + change = to - start, + animationStart = +new Date(); + var animating = true; + var lastpos = null; + var animateScroll = function() { + if (!animating) { + return; + } + duration = duration || 600; + requestAnimFrame(animateScroll); + var now = +new Date(); + var val = Math.floor(easeInOutQuad(now - animationStart, start, change, duration)); + if (lastpos) { + if (lastpos === element.scrollTop) { + lastpos = val; + element.scrollTop = val; + } else { + animating = false; + } + } else { + lastpos = val; + element.scrollTop = val; + } + if (now > animationStart + duration) { + element.scrollTop = to; + animating = false; + if (callback) { callback(); } + } + }; + requestAnimFrame(animateScroll); +}; \ No newline at end of file diff --git a/server/BatToExe/Bat_To_Exe(32bit).exe b/server/BatToExe/Bat_To_Exe(32bit).exe new file mode 100644 index 0000000..5de5137 Binary files /dev/null and b/server/BatToExe/Bat_To_Exe(32bit).exe differ diff --git a/server/BatToExe/Bat_To_Exe(64bit).exe b/server/BatToExe/Bat_To_Exe(64bit).exe new file mode 100644 index 0000000..9650268 Binary files /dev/null and b/server/BatToExe/Bat_To_Exe(64bit).exe differ diff --git a/server/autorun/start_server.exe b/server/autorun/start_server.exe new file mode 100644 index 0000000..6e6f1c3 Binary files /dev/null and b/server/autorun/start_server.exe differ diff --git a/server/autorun/stop_server.exe b/server/autorun/stop_server.exe new file mode 100644 index 0000000..8d521d1 Binary files /dev/null and b/server/autorun/stop_server.exe differ diff --git a/server/bat/start_server.bat b/server/bat/start_server.bat new file mode 100644 index 0000000..c23b7fb --- /dev/null +++ b/server/bat/start_server.bat @@ -0,0 +1,9 @@ +@echo off +tasklist | findstr /i mysqld.exe && taskkill /f /im mysqld.exe +tasklist | findstr /i php-cgi.exe && taskkill /f /im php-cgi.exe +tasklist | findstr /i nginx.exe && taskkill /f /im nginx.exe +tasklist | findstr /i svnserve.exe && taskkill /f /im svnserve.exe +tasklist | findstr /i start_server.exe && taskkill /f /im start_server.exe + +mysqld.exe | php-cgi.exe -c C:/server/php/php.ini -b 127.0.0.1:9000 | nginx.exe -p C:/server/nginx | svnserve.exe -d -r C:\server\svn --log-file C:\server\temp\svn.log +exit \ No newline at end of file diff --git a/server/bat/stop_server.bat b/server/bat/stop_server.bat new file mode 100644 index 0000000..5e153f1 --- /dev/null +++ b/server/bat/stop_server.bat @@ -0,0 +1,7 @@ +@echo off +tasklist | findstr /i mysqld.exe && taskkill /f /im mysqld.exe +tasklist | findstr /i php-cgi.exe && taskkill /f /im php-cgi.exe +tasklist | findstr /i nginx.exe && taskkill /f /im nginx.exe +tasklist | findstr /i svnserve.exe && taskkill /f /im svnserve.exe +tasklist | findstr /i stop_server.exe && taskkill /f /im stop_server.exe +exit \ No newline at end of file diff --git a/svn.md b/svn.md new file mode 100644 index 0000000..c7ff03d --- /dev/null +++ b/svn.md @@ -0,0 +1,30 @@ +`yum install subversion -y` + +`mkdir -p /var/svn/repos/project` + +`svnadmin create /var/svn/repos/project` + +`cp /var/svn/repos/project/hooks/post-commit.tmpl /var/svn/repos/project/hooks/post-commit` + +``` +#!/bin/sh + +export LANG=zh_CN.UTF-8 + +REPOS="$1" +REV="$2" +WEB_PATH=/home/wwwroot/project +LOG_PATH=/tmp/svn_update.log +SVN_PATH=/usr/bin/svn +SVN_REPOS=svn://localhost/repos/project +SVN_USER="username"; +SVN_PWD="password"; + +echo "nnn##########开始提交 " `date "+%Y-%m-%d %H:%M:%S"` '##################' >> $LOG_PATH +echo `whoami`,$REPOS,$REV >> $LOG_PATH +echo `$SVN_PATH checkout $SVN_REPOS $WEB_PATH --username $SVN_USER --password $SVN_PWD --no-auth-cache >> $LOG_PATH` +chown -R www:www $WEB_PATH + +``` + +`systemctl start svnserve` diff --git a/tengine.sh b/tengine.sh new file mode 100644 index 0000000..72e5a45 --- /dev/null +++ b/tengine.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +wget https://dn-amh.qbox.me/@/tengine/tengine-2.1.1.tar.gz +wget https://dn-amh.qbox.me/@/tengine/ngx_cache_purge-2.3.tar.gz +wget https://dn-amh.qbox.me/@/tengine/v0.6.4.tar.gz +wget https://dn-amh.qbox.me/@/tengine/jemalloc-4.0.4.tar.bz2 +wget https://dn-amh.qbox.me/@/tengine/pcre-8.38.tar.gz +wget https://dn-amh.qbox.me/@/tengine/zlib-1.2.8.tar.gz +wget https://dn-amh.qbox.me/@/tengine/openssl-1.0.2d.tar.gz + +tar -zxf tengine-2.1.1.tar.gz +tar -zxf ngx_cache_purge-2.3.tar.gz +tar -zxf v0.6.4.tar.gz +tar -jxf jemalloc-4.0.4.tar.bz2 +tar -zxf pcre-8.38.tar.gz +tar -zxf zlib-1.2.8.tar.gz +tar -zxf openssl-1.0.2d.tar.gz + +mkdir -p /usr/local/src/{ngx_cache_purge,ngx_http_substitutions_filter_module,jemalloc,pcre,zlib,openssl} +cp -a ngx_cache_purge-2.3/* /usr/local/src/ngx_cache_purge +cp -a ngx_http_substitutions_filter_module-0.6.4/* /usr/local/src/ngx_http_substitutions_filter_module +cp -a jemalloc-4.0.4/* /usr/local/src/jemalloc +cp -a pcre-8.38/* /usr/local/src/pcre +cp -a zlib-1.2.8/* /usr/local/src/zlib +cp -a openssl-1.0.2d/* /usr/local/src/openssl + +chmod 755 -R /usr/local/src/jemalloc + +cd tengine-2.1.1 +./configure --prefix=/usr/local/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_spdy_module --with-http_concat_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_stub_status_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_addition_module --with-http_secure_link_module --with-mail --with-mail_ssl_module --with-ipv6 --with-pcre=/usr/local/src/pcre --with-zlib=/usr/local/src/zlib --with-openssl=/usr/local/src/openssl --with-jemalloc=/usr/local/src/jemalloc --without-http_uwsgi_module --without-http_scgi_module --add-module=/usr/local/src/ngx_cache_purge --add-module=/usr/local/src/ngx_http_substitutions_filter_module; + +make +make install + +# /usr/local/tengine/sbin/nginx -V diff --git "a/wget\346\225\264\347\253\231\344\270\213\350\275\275.txt" "b/wget\346\225\264\347\253\231\344\270\213\350\275\275.txt" new file mode 100644 index 0000000..48ec3ff --- /dev/null +++ "b/wget\346\225\264\347\253\231\344\270\213\350\275\275.txt" @@ -0,0 +1 @@ +wget -r -p -c -np -k --restrict-file-names=nocontrol http://www.domain.com/ \ No newline at end of file