Linux应用
M_O_
书山有路勤为径,学海无崖苦作舟
展开
-
ubuntu 10.4 下安装samba
参考了网贴子:http://blog.163.com/txy_2009_hz/blog/static/124795635200981491332633/?fromdm&fromSearch&isFromSearchEngine=yeshttp://hejiantx.blog.163.com/blog/static/6186734201072754338170/1.安装:sudo apt-get install samba smbfs smbclient samba 用来创建,修改,删除samba原创 2010-12-13 20:58:00 · 2130 阅读 · 0 评论 -
Ubuntu16.04 安装jira7.2.2
1.安装MYSQL5.6因为目前jira(最新版本7.2.3)不支持mysql最新版5.7,所以只能安装mysql5.6版本: 如果已安装5.7,需要卸载并清除5.7: sudo dpkg -l | grep mysql sudo apt-get purge 上面命令显示的包 安装5.6版本: sudo apt-get install software-properties-common原创 2016-11-13 12:59:57 · 7515 阅读 · 3 评论 -
在ubuntu上架设软ap
先安装软件: sudo apt-get install hos原创 2014-06-30 10:14:36 · 2210 阅读 · 0 评论 -
getnameinfo Non-recoverable name resolution failure 错误
原文地址:http://www.jimmo.org/non-recoverable-name-resolution-failure-with-getnameinfo-on-solaris/函数原型:int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t翻译 2013-10-16 10:57:34 · 2646 阅读 · 0 评论 -
使用OSS播放WAV音频
#include #include #include #include #include #include #define BUFFER_LEN 16*1024unsigned char ucWAVHeader[] ={ // RIFF WAVE Chunk 0x52, 0x49, 0x46, 0x46, // "RIFF" 0x00, 0x00,原创 2013-03-23 13:47:06 · 2707 阅读 · 0 评论 -
LINUX TCP编程
相关结构体: struct sockaddr_in { sa_family_t sin_family; /* address family: AF_INET */ in_port_t sin_port; /* port in network byte order */原创 2012-11-22 12:34:17 · 883 阅读 · 0 评论 -
pthread多线程编程
●头文件:#include●在编译时注意加上-lpthread参数,以调用静态链接库。因为pthread并非Linux系统的默认库●man帮助中看不到pthread的手册,使用命令安装:sudo apt-get install manpages-posix manpages-posix-dev linux下进程和线程使用的函数比较: 1.线程的创建int转载 2010-12-26 22:23:00 · 1976 阅读 · 0 评论 -
VIM相关
让VIM打开文件时回到上次的光标位置: 编辑/etc/vim/vimrc,启动这段:" Uncomment the following to have Vim jump to the last position when" reopening a fileif原创 2011-10-18 22:17:17 · 581 阅读 · 0 评论 -
命令行参数解析: getopt()和getopt_long()
<br />Linux下非常多程式甚至那些具有图像用户界面(graphical user interface,GUI)的程式,都能接受和处理命令行选项。对于某些程式,这是和其他程式或用户进行交互的主要手段。具有可靠的复杂命令行参数处理 机制,会使得你的应用程式更好、更有用。不过非常多研发人员都将其宝贵的时间花在了编写自己的命令行解析器,却不使用 getopt(),而后者是个专门设计来减轻命令行处理负担的库函数。<br />1、命令行参数<br />命令行程式设计的首要任务是解析命令行参数,GUI派的程式员非转载 2010-11-19 10:17:00 · 890 阅读 · 0 评论 -
LINUX UDP网络编程
<br />地址的转换:<br />主机字节序和网络字节序的转换函数,通常X86用的是大端格式,而网络是小端格式,所以在设定IP地址时要来一个转换<br />#include <netinet/in.h><br />uint32_t htonl(uint32_t hostlong);<br />uint16_t htons(uint16_t hostshort);<br />uint32_t ntohl(uint32_t netlong);<br />uint16_t ntohs(uint16_t nets转载 2010-12-27 14:43:00 · 788 阅读 · 0 评论 -
ubuntu 网络设置
Ubuntu中配置网络方式:使用配置文件/etc/network/interfaces方式使用NetworkManager软件管理。Ubuntu Server版对于UbuntuServer,因为只有命令行模式,所以要想进行网络参数设置,只能通过修改 /etc/network/interfaces,具体设置方法如下:sudo vi /etc/network/interfacesauto eth原创 2016-09-14 13:45:37 · 3549 阅读 · 2 评论