共 129 篇文章 |
|
开源web终端ssh解决方案。安装 gateone.#cd /opt/gateone#./gateone.py#运行这个脚本,会生成server.conf配置文件。#cd /opt/gateone #./gateone.py.#vim /opt/gateone/server.conf.Gateone 提供了基于 web 的 ssh 功能,那么,资产系统,运维系统,其他用户权限分配系统,以及日志回放功能,需要 devops 自己去开发,结合 gateone ,保证让... 阅3176 转11 评0 公众公开 14-11-13 17:20 |
var $defineProperty = Object.defineProperty;但如今已然不是apache的时代了,在linux+nginx+mysql+php下怎么防止不同虚拟主机进行跨站?nginx实际上只是一个反向代理服务器,它接收到请求以后会看当前请求是否是.php文件,如果是则转交给php-fpm来处理,获得结果后再发给用户。所以有两个权限需要考虑:第一是nginx的权限,第二是php-fpm的权... 阅322 转0 评0 公众公开 14-11-12 23:01 |
Linus:利用二级指针删除单向链表 | 酷 壳。People who understand pointers just use a “pointer to the entry pointer”, and initialize that with the address of the list_head. And then as they traverse the list, they can remove the entry without using any conditionals, by just doing a “*pp = entry->next”. (了解指针... 阅263 转1 评0 公众公开 14-10-31 19:28 |
linux环境内存分配原理。情况二、malloc大于128k的内存,使用mmap分配内存,在堆和栈之间找一块空闲内存分配(对应独立内存,而且初始化为0),如下图:printf("\theap_malloc_total=%lu heap_free_total=%lu heap_in_use=%lu\n\tmmap_total=%lu mmap_count=%lu\n", heap_malloc_total*1024, heap_free_total*1024, heap_... 阅3176 转31 评0 公众公开 14-10-25 15:55 |
《tr命令。[rocrocket@rocrocket programming]$ tr ‘ ‘ ‘\11′ <height.txt |sed -n l1.79\t1.83$1.65\t1.59$[rocrocket@rocrocket programming]$ tr ‘a-z’ ‘A-Z’ <word.txtABCDE.[rocrocket@rocrocket programming]$ cat number.txt1234567890[rocrocket@rocrocket programming]$ tr ‘1-5′ ‘[A*]‘ <number.txtAAAAA67890.... 阅49 转0 评0 公众公开 14-10-20 17:37 |
阅8342 转2 评0 公众公开 14-10-15 10:37 |
再者,据他们的说法,修改信号处理方式是为了避免僵尸进程,当然初衷是好的,但这样的升级影响了一些函数的使用方式,比如system()函数、wait()函数、waipid()、fork()函数,这些函数都与子进程有关,如果你希望使用wait()或waitpid()对子进程收尸,那么你必须使用上面介绍的方式:在调用前(事实上是fork()前)将SIGCHLD信号置为SIG_DFL处理方... 阅307 转2 评0 公众公开 14-09-28 21:34 |
也可以修改系统文件来调整 core 选项在 /etc/profile 通常会有这样一句话来禁止产生 core 文件,通常这种设置是合理的 :# No core files by defaultulimit -S -c 0 >/dev/null 2>&1但是在开发过程中有时为了调试问题,还是需要在特定的用户环境下打开 core 文件产生的设置。祭出linux下经典的调试器GDB,首先带着core文件载入程序:g... 阅2564 转6 评0 公众公开 14-09-28 18:57 |
struct rcu_synchronize rcu;return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) || __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));六:有关rcu_read_lock_bh()/rcu_read_unlock_bh()/call_rcu_bh(). 在上面的代码分析的时候,经常看到带有bh的RCU代码.现在来看一下这些带bh的RCU是什么样的. #define ... 阅1020 转3 评0 公众公开 14-07-26 17:28 |