
Linux
文章平均质量分 58
周弓紧
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Linux平台Makefile文件的编写基础篇
目的: 基本掌握了 make 的用法,能在Linux系统上编程。 环境: Linux系统,或者有一台Linux服务器,通过终端连接。一句话:有Linux编译环境。 准备: 准备三个文件:file1.c, file2.c, file2.h file1.c: #include转载 2015-12-30 13:10:48 · 384 阅读 · 0 评论 -
ubuntu 安装 gedit
安装 gedit sudo apt-get update sudo apt-get install gedit-gmate sudo apt-get install gedit-plugins sudo apt-get remove gedit sudo apt-get install gedit转载 2017-03-30 17:24:39 · 39373 阅读 · 3 评论 -
Linux下redis 的安装以及C++操作redis
安装Redis 打开Redis官网,进入下载页面,选择一个适合自己电脑的版本下载即可,下载飞机票http://redis.io/download,下载完成后解压、编译、安装,依次在终端下执行如下命令: tar -zxvf redis-2.8.7.tar.gz cd redis-2.8.7 sudo apt-get install tcl(redis测试程序需要t转载 2017-03-13 15:11:58 · 2013 阅读 · 1 评论 -
Linux下使用pthread
#include #include #include void *thrd_func(void *arg); pthread_t tid; int main(){ if (pthread_create(&tid,NULL,thrd_func,NULL)!=0) { printf("Create thread error!\n"); e转载 2017-03-28 10:02:39 · 2109 阅读 · 0 评论 -
Linux下写日志
#include #include #include #include #include #include #include #include #include enum switch_mode { mode_minute, mode_hour, mode_day, mode_month转载 2017-03-28 09:55:30 · 1581 阅读 · 0 评论 -
Linux下套接字详解(四)----简单的TCP套接字应用(迭代型)
文章出处 @ http://blog.youkuaiyun.com/gatieme TCP编程流程说明 (1)SERVER 服务器端编程流程 TCP服务器端编程流程如下: ① 创建套接字socket; ② 绑定套接字bind; ③ 设置套接字为监听模式,进入被动接受连接状态listen; ④ 接受请求,建立连接accpet; ⑤ 读写数据read/w转载 2017-03-09 16:50:01 · 427 阅读 · 0 评论 -
CentOS 6.4安装GDB
CentOS 6.4 GDB 打开页面http://ftp.gnu.org/gnu/gdb/ 选择合适的安装包,在这里,我下载的gdb-1.10.tar.gz 解压缩包,输入命令:tar xzvf gdb-7.10.tar.gz 进入解压缩出来的目录gdb-7.10转载 2017-03-09 11:07:23 · 1284 阅读 · 0 评论 -
Linux学习--gdb调试
一.gdb常用命令: 命令 描述 backtrace(或bt) 查看各级函数调用及参数 finish 连续运行到当前函数返回为止,然后停下来等待命令 frame(或f) 帧编号 选择栈帧 info(或i) locals 查看当前栈帧局部变量的值 list(或l)转载 2017-03-09 11:20:24 · 284 阅读 · 0 评论 -
Linux下MySQL数据库常用基本操作
1、显示数据库 show databases; 2、选择数据库 use 数据库名; 3、显示数据库中的表 show tables; 4、显示数据表的结构 describe 表名; 5、显示表中记录 SELECT * FROM 表名 6、建库 create databse 库名; 7、建表转载 2017-03-08 15:51:17 · 266 阅读 · 0 评论 -
centOS中mysql一些常用操作
安装mysql yum -y install mysql-server 修改mysql配置 vi /etc/my.cnf 这里会有很多需要注意的配置项,后面会有专门的笔记 暂时修改一下编码(添加在密码下方): default-character-set = utf8 设置mysql随系统启动 # chkconfig mysqld on ← 设置MySQL服务随系统启动自启动 # c转载 2017-03-08 15:49:39 · 290 阅读 · 0 评论 -
linux下c/c++日志记录及文件读取
1、日志记录 (1)代码writelog.cpp [html] view plain copy /*日志记录*/ #include stdio.h> #include stdlib.h> #include time.h> #include unistd.h> #include assert.h> #include转载 2017-03-08 11:35:09 · 5536 阅读 · 0 评论 -
g++: command not found的解决
g++: command not found的解决 G++没有装或却没有更新 以下方法都可以试试: centos: yum -y update gcc yum -y install gcc+ gcc-c++ ubuntu: apt-get update gcc apt-get install g++转载 2017-03-08 10:57:38 · 847 阅读 · 0 评论 -
Ubuntu下安装ICE-3.4.2
Ubuntu 11.04上使用ICE(www.zeroc.com),由于没有编译好的安装包,只好在上面用源码编译了。 步骤如下,很简单: 1、安装几个第三方的包 apt-get install libdb4.8-dev libbz2-dev libssl-dev libreadline6-dev libexpat1-dev libmcpp-dev 2、下载源转载 2017-04-06 18:17:18 · 1134 阅读 · 0 评论