This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//更新源 | |
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | |
apk add --update-cache bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Building V8 for alpine is a real pain. We have to compile from source, because it has to be | |
# linked against musl, and we also have to recompile some of the build tools as the official | |
# build workflow tends to assume glibc by including vendored tools that link against it. | |
# | |
# The general strategy is this: | |
# | |
# 1. Build GN for alpine (this is a build dependency) | |
# 2. Use depot_tools to fetch the V8 source and dependencies (needs glibc) | |
# 3. Build V8 for alpine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##开启auth后,需要验证登录 | |
>use admin; | |
> db.auth('root', '123456'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name www.abb8.com; | |
root /var/www/html/abb8/public/; | |
index index.html index.htm index.php; | |
#charset koi8-r; | |
access_log /dev/null; | |
#access_log /var/log/dnmp/nginx.abb8.access.log main; | |
error_log /var/log/dnmp/nginx.abb8.error.log warn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim /usr/local/nginx/vhost/img.conf | |
server{ | |
listen 80; | |
server_name img.xxx.net; | |
set $root '/home/wwwroot/tpAdmin/static/'; | |
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ | |
{ | |
root $root; | |
expires 7d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab -n 1000 -c 1000 -p 'post.txt' -T 'application/x-www-form-urlencoded' 'http://www.yyyy.com/index/login/reg' | |
vim post.txt | |
phone=13892832323&q_pass=123456&pass=123456&code=2123 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//获取inotify监听数量 | |
$ cat /proc/sys/fs/inotify/max_user_watches | |
8192 | |
//增加限制以使Listen正常工作。永久方法 | |
# benton @ benton-name in ~ [11:24:50] | |
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf | |
[sudo] benton 的密码: | |
fs.inotify.max_user_watches=524288 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COPY ./sources.list.jessie /etc/apt/sources.list | |
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free | |
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free | |
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free | |
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free | |
//安装docker | |
sudo apt-get remove docker docker-engine docker.io | |
sudo apt-get install \ | |
apt-transport-https \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service crond restart #重启 | |
crontab -e | |
* * * * * /bin/bash /home/test.sh #每分钟运行 | |
//test.sh 必须有执行权限x | |
############################ | |
cd /www/wwwroot/xxxxx.xyz/ | |
/usr/local/git/bin/git pull origin master >> /tmp/test.log #注意命令一定要用绝对路径 |