
Linux
okhelper
专注freeswitch软交换开发,三汇,东进设备及网关
展开
-
iptables给docker正在运行的容器添加端口映射
例如 :运行docker容器时,没有映射50600端口,想在不影响运行的情况下,添加该端口映射:iptables -t nat -A DOCKER -p udp --dport 50600 -j DNAT --to 172.17.0.2:50600iptables -t nat -A POSTROUTING -p udp -s 172.17.0.2 -d 172.17.0.2 --dport 50600 -j MASQUERADEiptables -A DOCKER -p udp --dpor.原创 2021-01-29 16:22:15 · 611 阅读 · 0 评论 -
Linux查看某个命令属于哪个包
# 查找命令ifconfig属于哪个包yum provides "/*/ifconfig"原创 2020-12-21 11:52:44 · 1115 阅读 · 0 评论 -
CentOS7使用ODBC连接mysql时,程序崩溃
Freeswitch 1.4.26和使用Qt开发的应用程序,在CENTOS7下连接数据库时,都出现崩溃情况处理办法:1、odbc.ini配置在CentOS7中odbc的配置与CentOS6中不同,多了一个Threading参数2、查看unixODBC安装配置信息odbc.ini和odbcinst.ini默认是在/etc目录下,上图可见配置路径有问题export OD...原创 2019-11-04 14:34:55 · 506 阅读 · 0 评论 -
Shell检测IP地址是否PING通
#!/bin/baship=192.168.1.36check_ret=`ping $ip -c 2 | grep -q 'ttl=' && echo "yes" || echo "no"`idx=1echo $check_retwhile [ $check_ret = "no" ]do echo "$idx.okhelper" ((idx += ...原创 2019-10-20 15:05:37 · 2375 阅读 · 0 评论 -
Linux删除正文首行的#号注释
sed 's/\#//g' /etc/crontab原创 2017-04-18 16:25:46 · 3071 阅读 · 0 评论 -
Linux给正文第一行添加注释
sed 's/^/\#&/g' /etc/crontab原创 2017-04-18 16:24:29 · 3983 阅读 · 0 评论 -
CentOS6.5本地yum源配置
主要通过createrepo来创建本地yum源1、挂载系统ISO镜像,或拷贝系统安装包 1) mkdir /local_yum 创建存储rpm包的目录 2) mkdir /mnt/cdrom 3) mount -o loop -t iso9660 /home/centos_6.5.iso /mnt/cdrom 将/home目录原创 2017-02-27 12:33:30 · 15247 阅读 · 1 评论 -
linux挂载ISO光盘镜像
新建挂载点:mkdir /mnt/cdrommount -o loop -t iso9660 /home/centos_6.5.iso /mnt/cdrom原创 2017-02-06 16:06:17 · 674 阅读 · 0 评论 -
CentOS 6.4下PXE+Kickstart无人值守安装操作系统
一、简介1.1 什么是PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFT转载 2016-10-18 15:11:16 · 351 阅读 · 0 评论 -
linux crontab
基本格式 : * * * * * command 分 时 日 月 周 命令 第1列表示分钟1~59 每分钟用*或者 */1表示 第2列表示小时1~23(0表示0点) 第3列表示日期1~31 第4列表示月份1~12 第5列标识号星期0~6(0表示星期天)原创 2016-08-16 22:26:18 · 283 阅读 · 0 评论 -
Shell导出MySql部分表及数据
#!/bin/bash#export MySql table and table's data#table's name in single file,shell to read this file and read by line#shell script by okhelper ,2016-02-26cat $1 | while read LINE原创 2016-02-26 13:32:35 · 1454 阅读 · 0 评论 -
Linux 启动报错,/dev/mapper/vg_freeswitch-lv_root UNEXPECTED INCONSISTENCY;RUN fsck MANUALLY
/dev/mapper/vg_freeswitch-lv_root UNEXPECTED INCONSISTENCY;RUN fsck MANUALLY(ie.,without -a pr -p options)an error occured during the file system checkdroping you to a shell;the system will reboot原创 2015-03-12 13:49:54 · 2109 阅读 · 0 评论 -
yum(Another application is holding the yum lock, cannot continue)
#rm -f /var/run/yum.pid /sbin/service #yum-updatesd restart 有时候不用执行这个原创 2014-12-26 13:06:46 · 779 阅读 · 0 评论