[linux]shell自动化版本控制
中午“夜深人静”时分,写了个版本控制脚本,放在代码编译的开头,以后再也不用手动修改软件的版本号了,爽到没朋友有没有? #!/bin/bash tmp=`sed -n 's/.*VERSION.*"\(.*\)"/\1/p' version.h` echo tmp cnt=`echo $tmp | tr . "\n" | wc -l` a=0;b=0;c=0 if [ $cnt == 3 ]; then a=`echo $tmp|sed -n 's/\(.*\)\.\(.*\)\.\(.*\)/\1/p'` b=`echo $tmp|sed...标签: linux
[linux]Let mosquitto support websockets
1.Install libwebsockets $ wget http://git.libwebsockets.org/cgi ... 3-firefox-36.tar.gz $ tar zxvf libwebsockets-1.4-chrome43-firefox-36.tar.gz $ cd libwebsockets-1.4-chrome43-firefox-36 $ mkdir build $ cd build $ cmake .. $ make install $ ldco...标签: linux
[linux]mosquitto开启实名登录
1.修改mosquitto.conf #allow_anonymous true #password_file 改为 allow_anonymous false password_file /xxx/xxx/user.pass 2.产生密码文件user.pass mosquitto_passwd -b ./user.pass username password 注意文件路径标签: linux
[linux]最大线程数受多个原因制约
用 cat /proc/sys/kernel/threads-max 检查一下系统支持的最大线程数,一般来说数字都很大。但实际上用户创建线程的数量还是受几方面制约的。 1、PTHREAT_THREAD_MAX 这个值描述了单个用户进程可创建的最大线程数,直接修改并无效果,得在修改后重新编译C库才能起作用,除非有特殊要求,否则就小题大做了。 2、linux 中每个线程分配的栈空间缺省为8M,分配给用户编程的地址空间为3G,因此纯理论上包括主线程在内最大线程数不超过 3 * 1024 / 8 = 384 个,加上代码段,数据段等开销,这个数字还要减少。因此减少每个线程的栈大小可以增加创...标签: linux
[linux]Change the limit of file uploading in ubuntu
vi /etc/php5/apache2/php.ini upload_max_filesize = 2M memory_limit = 128M post_max_size = 8M sudo /etc/init.d/apache2 restart标签: linux
[linux]Solution of "cannot open shared object file"
"./sub: error while loading shared libraries: libmosquitto.so.1: cannot open shared object file: No such file or directory" Assuming you have installed the libraries to /usr/local/lib, which is the default, the correct answer is to run /sbin/ldconfig as root/sudo. On some systems you will need to ...标签: linux
[linux]查看端口使用情况
查看端口使用情况,使用netstat命令。 查看已经连接的服务端口(ESTABLISHED netstat -a 查看所有的服务端口(LISTEN,ESTABLISHED) netstat -ap 查看8080端口,则可以结合grep命令: netstat -ap | grep 8080 如查看8888端口,则在终端中输入: lsof -i:8888 若要停止使用这个端口的程序,使用kill +对应的pid即可标签: linux
[linux]Errors while making mosquitto in a new PC of Ubuntu12.04.
Make mosquitto in a new PC of Ubuntu12.04.There is some errors: 1."openssl/*.h: No such file or directory" install libssl-dev 2."ares.h: No such file or directory" install libc-ares-dev install libc-ares2 3."g++: command not found" install g++ 4."uuid/uuid.h No such file or dir...标签: linux
[linux]一些常用的命令(2)
1、man命令 该命令可以显示指定命令的用法和描述。 语法: man <command name> man ls root@nicholas:~# man ls LS(1) User Commands ...标签: linux
[linux]一些常用的命令(1)
1 ‘who -r’ 和 ‘runlevel’ 命令可以用来查看当前的Linux服务器的运行级别。 2 用 “route -n” 和 “netstat -nr” 命令,我们可以查看默认网关。除了默认的网关信息,这两个命令还可以显示当前的路由表。 3 在CentOS 5.X / RHEL 5.X中,可以用mkinitrd命令来创建初始化内存盘文件,举例如下: # mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r) 如果你想要给特定的内核版本创建初始化内存盘,你就用所需的内核名替换掉 ‘uname -r’ 。 在Cent...标签: linux
日历
最新微语
- 有的时候,会站在分叉路口,不知道向左还是右
2023-12-26 15:34
- 繁花乱开,鸟雀逐风。心自宁静,纷扰不闻。
2023-03-14 09:56
- 对于不可控的事,我们保持乐观,对于可控的事情,我们保持谨慎。
2023-02-09 11:03
- 小时候,
暑假意味着无忧无虑地玩很长一段时间,
节假意味着好吃好喝还有很多长期不见的小朋友来玩...
长大后,
这是女儿第一个暑假,
一个半月...
2022-07-11 08:54
- Watching the autumn leaves falling as you grow older together
2018-10-25 09:45
分类
最新评论
- Goonog
i get it now :) - 萧
@Fluzak:The web host... - Fluzak
Nice blog here! Also... - Albertarive
In my opinion you co... - ChesterHep
What does it plan? - ChesterHep
No, opposite. - mojoheadz
Everything is OK!... - Josephmaigh
I just want to say t... - ChesterHep
What good topic - AnthonyBub
Certainly, never it ...