Linux
norsd
这个作者很懒,什么都没留下…
展开
-
CentOS设置定时任务
crontab 的配置文件在/var/spool/cron/下面。如果是root用户,文件名就是root。原创 2023-03-29 22:01:48 · 149 阅读 · 0 评论 -
Linux Centos 查看CPU信息,服务器厂商信息
【代码】Linux Centos 查看CPU信息,服务器厂商信息。原创 2023-01-21 16:28:43 · 682 阅读 · 0 评论 -
Linux Centos 确定端口被占用
Linux确定端口被谁占用原创 2022-10-27 15:51:27 · 425 阅读 · 0 评论 -
Linux Centos 离线安装库
离线安装库原创 2022-10-27 15:46:31 · 122 阅读 · 0 评论 -
Linux CentOS yum 更换源
yum源原创 2022-09-12 14:19:19 · 7252 阅读 · 0 评论 -
Linux 输出 SO文件的EntryPoint 函数地址和名字
nm -D xxxx.so > test.txt原创 2022-03-02 01:36:54 · 228 阅读 · 0 评论 -
Linux Centos yum/rpm 设置代理
yum 设置代理:vim /etc/yum.conf添加形如:proxy = http://user:pass@ip:portrpm 设置代理sudo rpm -Uvh https://xxxxx.rpm --httpproxy ip --httpport portreference: https://www.lightnetics.com/topic/3698/how-do-i-install-an-rpm-package-using-a-http-proxy...原创 2022-03-02 01:18:41 · 1205 阅读 · 0 评论 -
MognoDb Linux C++ Driver 编译,运行注意事项
1.MongoDb C++ Driver 一般安装于 ./usr/local目录下,在这个目录下你能看到 boost文件夹, include文件夹(内部有bsoncxx,libbson, libmongoc, mongocxx等), lib文件夹(libson,libmongoc,mongocxx的各种so文件) 2.我们使用VisualStuio编译Linux工程,工程文件的设置如下: ...原创 2018-05-26 16:27:57 · 606 阅读 · 0 评论 -
CentOS 添加静态路由
找到目标网卡的名字 , 这里是 em1进入 /etc/sysconfig/network-scripts/vim route-em1 (可能是新建文件)172.30.3.0/24 via 170.20.88.253 dev em1保存退出原创 2018-04-16 11:55:37 · 3151 阅读 · 0 评论 -
Linux 设置路由
route add -net 192.168.106.0/24 gw 170.20.18.3 em1原创 2017-05-25 19:27:57 · 603 阅读 · 0 评论 -
Linux 如何改变输出的内容
auto nLineCount = _vtInfo.size();for (auto str : _vtInfo){ cout << str.c_str() << endl;}cout << "Connect Count:" << _mdAF101.GetConnectCount() << endl;cout << instrument << " " << ++_nRecevied原创 2017-08-18 10:22:57 · 522 阅读 · 0 评论 -
CountBitsSetTable
ref: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTableCounting bits set by lookup tablestatic const unsigned char BitsSetTable256[256] = {define B2(n) n, n+1, n+1, n+转载 2017-07-01 14:50:04 · 324 阅读 · 0 评论 -
Linux 设置永久ip地址的方法
Centos 6.5 查看 /etc/sysconfig/network-scripts/ 找到对应的网卡配置文件 如果没有,可以创建一个 形如: ifcfg-Auto_devicename 的配置文件,随后从其他类似文件把信息copy过来 例如:TYPE=EthernetBOOTPROTO=noneIPADDR=10.1.2.3.4GATEWAY=10.1.2.1NETMASK原创 2017-06-06 21:34:46 · 10065 阅读 · 0 评论 -
Linux 一些问题
终端以root账号执行 su - root原创 2016-05-16 17:01:24 · 362 阅读 · 0 评论 -
GDB 远程调试Linux (CentOS)
1.引用: https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/注意安装gdbserver的命令是 yum install gdb-gdbserver 不是文中的gdbserver2.linux各个组件安装后之后, 确定gcc是否符合标准,例如需要c11的,可能要升级gcc3.Vis原创 2016-06-07 15:30:38 · 7776 阅读 · 0 评论 -
CentOS 6.5 升级gcc到4.8 以及libstdc++
CentOS 6.5 自带gcc太旧不支持c11, 升级到4.8的步骤:引用: http://cache.baiducontent.com/c?m=9d78d513d99216f31eb0d5690d67d371182497634bc0d16578c39339c6350a564717e5ac27551a10948522685be90f1efdf1456f2a4665f28cc8ff1b8ae7d4原创 2016-05-24 21:28:23 · 11204 阅读 · 1 评论 -
CentOS设置代理, yum, wget
/etc # vi yum.conf [main] cachedir=/var/cache/yum/basearch/basearch/releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limi原创 2016-06-02 11:28:50 · 6679 阅读 · 0 评论 -
CentOS 6.5 安装Clang 3.5.0
来自引用: http://www.cnblogs.com/dudu/p/4294374.html编译llvm几乎耗费了1个小时…..编译CoreCLR需要Clang 3.5,而CentOS上安装的是Clang 3.4.2(yum repos中最新版也是这个),只能自己手工编译LLVM的源代码进行安装。(注:CentOS的版本是6.6)一、安装libstdc++4.7(注:如果是CentOS 7.0转载 2016-06-28 21:24:25 · 2241 阅读 · 0 评论 -
在Visual Studio中编译Linux的一些问题
相对路径: 在windows下,和当前文件同一个目录下的引用会这么写: #include “SubDirectory\header.h” 或者 #include “SubDirectory/header.h” 但是这些语句没法被Linux正确识别,Linux需要: #include “./SubDirectory/header.h”原创 2016-08-10 15:17:39 · 364 阅读 · 0 评论 -
CentOS多网卡下 应用层无法收到组播的问题解决
rp_filter = 0 系统配置文件 1. /etc/sysctl.conf 把 net.ipv4.conf.all.rp_filter和net.ipv4.conf.default.rp_filter设为0即可 net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.all.rp_filter = 0原创 2017-03-10 14:18:56 · 6035 阅读 · 0 评论 -
Linux tcpdump 监听指定网卡udp指定port
tcpdump -i eth0 udp port 12345 Not signed i原创 2017-03-25 00:38:28 · 21725 阅读 · 1 评论 -
使用C++11和相关驱动访问MongoDb
#include <cstdio>#include <iostream>#include <bsoncxx/array/view.hpp>#include <bsoncxx/builder/stream/document.hpp>#include <bsoncxx/json.hpp>#include <mongocxx/client.hpp>#include <mongocxx/instan原创 2017-03-25 17:38:43 · 1433 阅读 · 0 评论 -
CentOS 设置DNS
修改对应网卡的DNS的配置文件vi /etc/resolv.conf修改以下内容nameserver 8.8.8.8 #google域名服务器 nameserver 8.8.4.4 #google域名服务器REF: http://blog.csdn.net/iamfafa/article/details/6209009转载 2017-05-03 23:27:25 · 568 阅读 · 0 评论 -
CentOS 安装配置vncserver
yum 安装tiger vncserver yum install tigervnc-server安装后输入 vncserver 设置密码3.配置用户 vim /etc/sysconfig/vncservers VNCSERVERS=”1:root” VNCSERVERARGS[2]=” -geometry 800x600 tcp” 注意去掉 local, nolisten4.关闭原创 2016-06-02 12:27:11 · 502 阅读 · 0 评论