Skip to content

Instantly share code, notes, and snippets.

@jingmian
jingmian / aplien操作记录
Created February 14, 2020 12:02
aplien操作
//更新源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
apk add --update-cache bash
@jingmian
jingmian / Dockerfile
Created October 14, 2019 02:24 — forked from tylerchr/Dockerfile
Compiling V8 for alpine (link against musl)
#
# 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
@jingmian
jingmian / mongo操作
Last active August 7, 2019 14:07
mongo操作笔记
##开启auth后,需要验证登录
>use admin;
> db.auth('root', '123456');
@jingmian
jingmian / docker_dnmp配置thinkphp5的PATH_INFO
Created March 7, 2019 07:09
docker_dnmp配置thinkphp5的PATH_INFO
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;
@jingmian
jingmian / Navicat远程连接服务器上的Mysql数据库
Created February 19, 2019 06:31
Navicat远程连接服务器上的Mysql数据库
//阿里云安全组开放
//mysql端开放
ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
flush privileges;
//centos7防火墙开放3306
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
//保存配置
service iptables save
service iptables restar
@jingmian
jingmian / lnmp配置二级图片域名
Created November 27, 2018 07:48
lnmp配置二级图片域名
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;
@jingmian
jingmian / .txt
Created November 23, 2018 15:43
ab带post测试
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
@jingmian
jingmian / swooledistributed使用.sh
Created November 23, 2018 03:31
swooledistributed使用
//获取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
@jingmian
jingmian / docker安装Lnmp.sh
Last active September 16, 2024 03:29
docker安装Lnmp
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 \
@jingmian
jingmian / .sh
Last active September 22, 2018 16:10
git定时脚本拉取
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 #注意命令一定要用绝对路径