代码改变世界

随笔分类 -  linux

superset 初探

2019-06-27 17:59 by brookin, 347 阅读, 收藏, 编辑
摘要: 前置知识 http://pandas.pydata.org/pandas docs/stable/ https://www.sqlalchemy.org/ http://druid.io/ https://www.anaconda.com/ python https://www.cnblogs.co 阅读全文

redis 基础

2019-06-10 17:40 by brookin, 247 阅读, 收藏, 编辑
摘要: 源码编译安装 1. 下载,解压,进入源码目录,指定安装目录,编译安装 tar xzf redis 5.0.5.tar.gz cd redis 5.0.5 make PREFIX=/home/user_00/services/redis 5.0.5 install 2. 配置文件复制 mkdir /h 阅读全文

windows nginx 目录配置

2019-05-12 20:57 by brookin, 3722 阅读, 收藏, 编辑
摘要: ``` http { server { listen 80; server_name www.test.com; location / { root E:/data/www; index index.html index.htm; } } } ``` 阅读全文

zip unzip tar 压缩相关

2019-05-09 17:11 by brookin, 324 阅读, 收藏, 编辑
摘要: unzip 解压时,需要直接覆盖以解压的文件 o 则不再进行询问,直接覆盖原文件解压缩 示例 unzip o file_name.zip 阅读全文

curl 支持 http2

2019-04-15 21:07 by brookin, 7819 阅读, 收藏, 编辑
摘要: 让 curl 支持 HTTP2 我们需要安装 nghttp2(http2 的 C 语言库) 源码安装 安装 nghttp2 编译 curl 验证 测试 附注 yum 安装 安装 yum 源 新建 yum 源(功能与 安装 yum 源 相同) vim /etc/yum.repos.d/city fan 阅读全文

查看编译参数

2019-04-08 22:10 by brookin, 264 阅读, 收藏, 编辑
摘要: nginx /usr/local/nginx/sbin/nginx V httpd cat apache_dir/build/config.nice php php i |grep configure mysql cat /usr/local/mysql/bin/mysqlbug |grep con 阅读全文

awk 同时指定多个分隔符

2019-01-21 22:36 by brookin, 3557 阅读, 收藏, 编辑
摘要: $ echo "id: xxx(6667)xxx"|awk -F "[()]" '{print $2}' $ 6667 $ echo "abc[defg]higk" | awk -F "[][]" '{print $2}' $ defg -F "[可以制定多个分隔符]" 阅读全文

date 常用

2019-01-07 16:08 by brookin, 166 阅读, 收藏, 编辑
摘要: 格式化UTC为可读格式 MAC mbp:~ user_00$ date r 1546848158 2019年 1月 7日 星期一 16时02分38秒 CST linux [user_00@txyun ~]$ date d @1546848158 Mon Jan 7 16:02:38 CST 2019 阅读全文

进程查看

2017-12-25 23:16 by brookin, 260 阅读, 收藏, 编辑
摘要: 查看apache进程消耗内存 shift + m [Sort by memory usage] top p 那些命令接受标准输入输出 查看指定进程的状态 使用free m 在开启指定程序和关闭指定程序后内存变化,即内存使用情况。 阅读全文

查看CPU信息

2017-12-02 17:23 by brookin, 369 阅读, 收藏, 编辑
摘要: 基础知识 示例: 开发机器是1个物理CPU,4核8线程,Intel(R) Core(TM) i7 3770 CPU @ 3.40GHz 基础 i3:2核模拟4线程,无睿频 i5:4核模拟4线程,有睿频,平台不同(CPU核数也不相同,详见: ) i7:4核模拟8线程, 台式机:i5有双核四线程(如i5 阅读全文

check process id exists

2017-11-22 10:43 by brookin, 239 阅读, 收藏, 编辑
摘要: kill 0 pid sending the signal 0 to a given PID just checks if any process with the given PID is running and you have the permission to send a signal t 阅读全文

常用 shell & 语法

2017-08-28 12:05 by brookin, 153 阅读, 收藏, 编辑
摘要: 参数逻辑判断 watch 功能:监控 PHP 进程的变化 原理: 重复的执行后面的命令,默认时间间隔是2秒 参数解释 阅读全文

inotify resources exhausted

2016-12-06 20:50 by brookin, 2074 阅读, 收藏, 编辑
摘要: inotify resources exhausted tail f /var/log/kubelet.log tail: inotify resources exhausted tail: inotify cannot be used, reverting to polling debug cat 阅读全文

mysql-5.7.14 源码安装笔记

2016-08-05 00:03 by brookin, 2458 阅读, 收藏, 编辑
摘要: 安装编译 下载源码 mysql 5.7.14.tar.gz 解压定义安装变量 cd /usr/local/src mysql_version="mysql 5.7.14" tar zxf "${mysql_version}.tar.gz" cd ${mysql_version} 配置 cmake \ 阅读全文

基于域名虚拟主机配置注意事项

2016-02-26 11:44 by brookin, 506 阅读, 收藏, 编辑
摘要: 基于域名的虚拟主机 解析流程 第一个virtual host 是默认的virtual host, 如果你配置了Name based virtual host , 主服务配置将不再被使用 1. 根据域名,找到相应的IP,通过IP 到达指定的 server 2. 根据http header 中带的 ho 阅读全文

shell 环境初始化顺序

2015-09-21 13:29 by brookin, 321 阅读, 收藏, 编辑
摘要: 登陆shell 的执行顺序 /etc/profile /etc/profile.d/file /etc/bashrc .bashrc .bash_profile 非登录shell 的执行顺序, 例如: 切换用户 /etc/profile /etc/profile.d/file ... 阅读全文

Thinkpad 装 centos 7后发热量大处理

2015-09-21 13:22 by brookin, 1608 阅读, 收藏, 编辑
摘要: 原因 :由于没有独立显卡驱动导致发热量大,禁用独立显卡去驱动即可。 步骤 : 开机按 Fn+F1 进入BIOS. 选择 config 选项卡, 找到 Primary Display [SG] BIOS config——display SG:Switchable Graphic 可切换显... 阅读全文

双系统启动引导设置

2015-09-21 13:19 by brookin, 918 阅读, 收藏, 编辑
摘要: 背景 :两个系统分别安装两个硬盘中。 方法一 进入centos,对grub进行设置 vim /boot/grub2/grub.cfg 添加 menuentry 'win7' { set root=(hd0,1) 注意:grub2的第一个分区是(hd0,1),不是(hd0,0) ... 阅读全文

mount: unknown filesystem type 'ntfs'

2015-08-26 23:28 by brookin, 1394 阅读, 收藏, 编辑
摘要: # mount: unknown filesystem type 'ntfs' #**问题描述** # mount –t ntfs /dev/sdc1 /mnt/usb2 mount: unknown filesystem type ‘ntfs’原因:系统无法识别ntfs格式分区**解决办法**编译... 阅读全文

linux /usr/bin/ld: cannot find -lxxx

2015-07-23 23:34 by brookin, 372 阅读, 收藏, 编辑
摘要: 在linux环境编译应用程式或lib的source code时出现如下错误:/usr/bin/ld: cannot find -lxxx这些讯息会随着编译不同类型的source code 而有不同的结果出来如:/usr/bin/ld: cannot find -lc/usr/bin/ld: cann... 阅读全文