名字 | 链接 |
---|---|
我的代码库 | github 开源中国 csdn coding |
本地管理 | mongo 个人主页 印象笔记 |
mongo | rockmongo php_mongo 中文社区 |
skynet参考 | skynet研究 skynet源码 |
python | 资源大全 |
vim配置 | vim |
lua | 库 应用库 zlib 5.3手册 |
nginx | 淘宝翻译 |
OpenResty | 官网 源码 学习资源 语法 |
json | 不同语言API |
mysql | csdn知识库 |
前端 | 博客 |
vim配置 | vim |
机器人算法 | |
bootstrap | 布局 |
ansible | 模块 应用 |
图表 | 百度图表 淘宝图表 淘宝图片裁剪 |
其他 | 网易公开课 开源黄页 IT牛人博客 编程书籍 |
ansible-playbook site.yml -vv --skip-tags="ali"
名字 | 信息 |
---|---|
wordpress | dQgjoGK5()TRNkjkpP |
Shadowsocks | ssserver -p 443 -k password -m rc4-md5 |
$emplate myformat, "%$NOW% %TIMESTAMP:8:$% %hostname% %syslogtag% %msg%\n"
>>/etc/rsyslog.conflocal0.info /var/log/local0.log;myformat
>>/etc/rsyslog.conf
:BundleInstall
.bashrc增加export TERM="screen-256color"
[Solarized Dark]
text=839496
cyan(bold)=93a1a1
text(bold)=839496
magenta=dd3682
green=859900
green(bold)=586e75
background=042028
cyan=2aa198
red(bold)=cb4b16
yellow=b58900
magenta(bold)=6c71c4
yellow(bold)=657b83
red=dc322f
white=eee8d5
blue(bold)=839496
white(bold)=fdf6e3
black=002b36
blue=268bd2
black(bold)=073642
[Names]
name0=Solarized Dark
count=1
- 缩进:v模式 +
<>
- 分窗:
ctrl+W
+v
或s
- vimrc支持tmux
if exists('$TMUX')
set term=screen-256color
endif
##openresty##
yum install php php-fpm
echo "user = www">>/etc/php.ini
echo "group = www">>/etc/php.ini
chkconfig php-fpm on
service php-fpm start
php
yum install pcre-devel openssl-devel
git clone https://liuxuezhan@git.oschina.net/liuxuezhan/my_tool.git
cd my_tool/ngx_openresty-1.9.7.1/bundle/LuaJIT-2.1-20151219
make
make install
./configure --prefix=/www --with-luajit
配置nginx.conf
server {
listen 6699 default so_keepalive=2s:2s:8;
server_name foo.com;
root /www/nginx/html;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}
location /1.0/websocket {
lua_socket_log_errors off;
lua_check_client_abort on;
content_by_lua '
local server = require "resty.websocket.server"
local wb, err = server:new{
timeout = 5000, -- in milliseconds
max_payload_len = 65535,
}
if not wb then
ngx.log(ngx.ERR, "failed to new websocket: ", err)
return ngx.exit(444)
end
while true do
local data, typ, err = wb:recv_frame()
if wb.fatal then
ngx.log(ngx.ERR, "failed to receive frame: ", err)
return ngx.exit(444)
end
if not data then
local bytes, err = wb:send_ping()
if not bytes then
ngx.log(ngx.ERR, "failed to send ping: ", err)
return ngx.exit(444)
end
elseif typ == "close" then break
elseif typ == "ping" then
local bytes, err = wb:send_pong()
if not bytes then
ngx.log(ngx.ERR, "failed to send pong: ", err)
return ngx.exit(444)
end
elseif typ == "pong" then
ngx.log(ngx.INFO, "client ponged")
elseif typ == "text" then
local bytes, err = wb:send_text(data)
if not bytes then
ngx.log(ngx.ERR, "failed to send text: ", err)
return ngx.exit(444)
end
end
end
wb:send_close()
';
}
}
- 映射6699到到宿主80端口
- 关闭selinux
chown -R www:www /www
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
- 重启查看sestatus
/www/nginx/sbin/nginx -p /www/nginx -c conf/nginx.conf
- 开机启动 创建
#!/bin/sh
(
cat <<EOF
[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
ExecStart=/www/nginx/sbin/nginx -p /www/nginx -c conf/nginx.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
) >/usr/lib/systemd/system/nginx.service
ln -s /usr/lib/systemd/system/nginx.service /etc/systemd/system/multi-user.target.wants/
systemctl daemon-reload
chkconfig nginx on
service nginx start
#!/bin/sh
(
cat <<EOF
[mongodb-org-3.0]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1
EOF
) >/etc/yum.repos.d/mongodb-org-3.0.repo
yum install mongodb-org
echo "security:">>/etc/mongod.conf
echo "authorization: abled">>/etc/mongod.conf
mongod -f /etc/mongod.conf
ln -s /usr/lib/systemd/system/mongod.service /etc/systemd/system/multi-user.target.wants/
systemctl daemon-reload
chkconfig mongod on
service mongod start
- 查看mongod的错误日志:/var/log/mongodb/mongod.log
- 映射27017到到宿主27017端口
git clone https://github.com/iwind/rockmongo.git
yum install php-devel
wget http://pecl.php.net/get/mongo-1.6.13.tgz
tar -xzvf mongo-1.4.5.tgz
cd mongo-1.4.5
phpize
./configure
make
make install
echo "extension=mongo.so">>/etc/php.ini
cp rockmongo /www/nginx/html/rockmongo
- config.php 配置
host
- config.php 配置
auth false
- http://192.168.1.100/rockmongo/index.php?action=admin.index