
Linux
文章平均质量分 93
tina_tian1
行到水穷处,坐看云起时
展开
-
Shell 操作符
文章目录Shell 操作符SummaryOperatorPracticeShell 操作符SummaryOperator定义说明举例备注普通变量$((运算式))result=$(((2+5)*5))$[运算式]result=$[(2+5)*5]`expr 运算式`tmp=`expr 2 + 5`注意必须有空格result=`expr $tmp \* 5`注意*号要转义Otherif [ condition原创 2020-05-19 20:59:11 · 2505 阅读 · 0 评论 -
进程管理 Process Management
文章目录Process ManagementSummaryPracticeps auxps -elfpstree -u 显示进程所属用户pstree -p 显示进程的pidServiceSummaryservice firewalld status/ect/init.dvim /etc/inittabsystemctl get-default如果不小心将默认的运行级别设置成0或7,怎么处理chkconfig --listchkconfig idm --listchkconfig --level 2 idm原创 2020-05-19 20:50:56 · 914 阅读 · 0 评论 -
Shell 变量
文章目录Shell 变量Summary变量注释Practice普通变量`unset`定义静态变量 `readonly`命令返回值赋给变量 \`命令\` 或 $(命令)**参数变量**预定义变量Shell 变量Summary变量定义说明举例备注普通变量=定义A=“test”注意不能有空格unset撤销unset Areadonly静态变量readonly A=“test”`命令`赋给变量命令返回值RESULT=`ls -l /原创 2020-05-19 20:38:47 · 627 阅读 · 0 评论 -
Virtualbox Linux 和 Window 10共享文件夹
文章目录Virtualbox Linux 和 Window 10共享文件夹1. windows 10创建文件夹`C:\Workshop\sharedwindows`2. virtualbox 上添加Shared Folder3. Linux Cenos 上执行如下操作4. 可以相互创建文件进行验证Virtualbox Linux 和 Window 10共享文件夹1. windows 10创建文件夹C:\Workshop\sharedwindows2. virtualbox 上添加Shared Fold原创 2020-05-14 23:01:41 · 354 阅读 · 0 评论 -
docker 命令记录
Docker 命令:docker build -f ci/indy-pool.dockerfile -t indy_pooldocker kill 6a6683e55c7edocker pssystemctl restart dockersystemctl daemon-reloadsystemctl restart dockerdocker imagesdocker kil...原创 2019-02-28 14:21:46 · 166 阅读 · 0 评论 -
vim 配色
1. downlowd from:https://github.com/altercation/vim-colors-solarized2. $ cd vim-colors-solarized/colors$ mkdir -p ~/.vim/colors$ cp solarized.vim ~/.vim/colors/$ vi ~/.vimrcsyntax enableset原创 2017-09-14 23:46:51 · 199 阅读 · 0 评论 -
Window直接执行远程Linux命令
可直接通过git 的 bash.exe执行本地Windows:477_deploy.cmd文件内容如下:"C:\Program Files\Git\bin\bash.exe" -c 'scp /c/tmp/*.jar tiaxia@c9t26477.itcs.hpecorp.net:/home/tiaxia/'"C:\Program Files\Git\bin\bash.exe原创 2017-08-14 18:00:17 · 1442 阅读 · 0 评论 -
Linux ftp访问
[root@nh-cdh-24 setuptools-1.4.2]# ftp 172.28.4.200Connected to 172.28.4.200 (172.28.4.200).220 Welcome to blah FTP service.Name (172.28.4.200:root): ops_user331 Please specify the password.原创 2016-01-27 14:51:24 · 1720 阅读 · 0 评论 -
Centos安装g++错误 :No package g++ available
错误命令:[root@localhost cswapserver]# yum install g++已加载插件:fastestmirror, refresh-packagekit, security设置安装进程Loading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirro原创 2015-10-09 11:04:50 · 6160 阅读 · 0 评论 -
Linux service 创建和注册
1. 创建[root@c4t22927 init.d]# pwd/etc/rc.d/init.d[root@c4t22927 init.d]# vim tian#! /bin/bash # chkconfig: 2345 10 90 # start functionstart() { echo "=== tian startService ===" ...原创 2016-05-19 17:47:28 · 5483 阅读 · 0 评论 -
Linux基本命令一
1. 编译及链接生成可执行文件示例gcc -c -I /usr/local/include/ http_test.cpp-o http_test.ogcc -L /usr/local/lib-lboost_locale http_test.o -o test2.查找当前目录下内容包含某个字段的文件,并显示文件目录:find . -name “*.h” ...原创 2015-08-13 18:36:18 · 1671 阅读 · 0 评论 -
Jenkins && Pipeline Public/Private Key errors
1. Jenkins test configuration failed:jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [prop-原创 2017-11-16 10:49:49 · 2528 阅读 · 0 评论 -
ssh 端口转发笔记
From :https://www.ibm.com/developerworks/cn/linux/l-cn-sshforward/一. 概念SSH能够将其他 TCP 端口的网络数据通过 SSH 链接来转发,并且自动提供了相应的加密及解密服务。这一过程有时也被叫做“隧道”(tunneling)二. 两功能加密 SSH Client 端至 SSH Server 端之间的通讯数据。...原创 2019-05-24 18:32:35 · 807 阅读 · 0 评论 -
Ubuntu安装Nginx 并转发请求到Tomcat
一. 安装步骤1. apt update2. apt install nginx3. ufw app listAvailable applications: Nginx Full Nginx HTTP Nginx HTTPS OpenSSH4.ufw allow 'Nginx HTTP'5. systemctl status nginx二. 路径:...原创 2019-09-02 21:17:37 · 497 阅读 · 0 评论 -
Linux Ubuntu基本
1.root 密码装机后需要设置root密码,命令sudo passwd进行root设置。2.弹出终端a.CTRL+ALT+Tb. ALT + F2 搜索 gnome-terminal3. 防火墙开启: ufw enable关闭: ufw disable查看状态: ufw status4. 安装ssh serversudo apt-getinsta...原创 2016-03-09 20:54:44 · 593 阅读 · 0 评论 -
Linux 命令(开放系统端口号/查看端口使用情况)
1. 开放系统端口号a. /sbin/iptables -I INPUT -p tcp--dport 8181 -j ACCEPTb. /etc/rc.d/init.d/iptables savec. 可以通过以下命令查看端口的状态:/etc/init.d/iptables status原创 2015-08-13 18:32:56 · 1028 阅读 · 0 评论 -
linux shell脚本获取git代码
#!/usr/bin/expectset timeout 300spawn git checkout feature/developmentspawn git fetchexpect { "Password:" { send "××××××\r" }}interactspawn git pullexpect { "原创 2015-10-22 16:04:55 · 4978 阅读 · 0 评论 -
gdb调试linux可执行程序
[root@localhost CSwapServer_dist]# gdb CSwapServerGNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)Copyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later原创 2015-11-13 18:18:50 · 7657 阅读 · 0 评论 -
make 错误: *** 没有指明目标并且找不到 makefile。 停止。
错误[root@localhost cswapserver]# makemake: *** 没有指明目标并且找不到 makefile。 停止。[root@localhost cswapserver]# cat Makefile.amAUTOMAKE_OPTIONS=foreignSUBDIRS=IDBCommon \ CMarketServer \原创 2015-10-09 11:34:59 · 13090 阅读 · 0 评论 -
linux shell脚本登录远程执行命令,交互通过脚本
expect -c " set timeout 15 spawn ssh root@172.16.17.34 expect *password* { send ××××××\r } expect \"]#\" send \"cd /\r\" send \"tar jxvf name.tar.bz2\r\" expect \"]#\"原创 2015-10-22 16:17:47 · 3989 阅读 · 0 评论 -
Linux C++编译 错误:‘std::tr1’尚未声明
加入头文件#if !defined(_MSC_VER)#include #endif原创 2015-10-09 17:20:47 · 3339 阅读 · 0 评论 -
How to install g++ 4.7.2 & c++11 on CentOS 5.x
From:http://unix.stackexchange.com/questions/63587/how-to-install-g-4-7-2-c11-on-centos-5-xFrom this answer to "Install gcc 4.7 on CentOS [6.x]", the easiest way to get g++ 4.7, and the requir转载 2015-10-20 09:54:56 · 1056 阅读 · 0 评论 -
UNIX命令学习--(解压和压缩命令)
From: http://linux.chinaunix.net/techdoc/system/2008/09/17/1032551.shtml .cpio解包: cpio -idmv ---------------------------------------------.tar解包: tar xvf FileName.tar打包:tar cv转载 2015-10-19 18:18:58 · 3618 阅读 · 0 评论 -
Linux下log4cxx的安装使用
From: http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=78707&id=368589Log4cxx是开放源代码项目Apache Logging Service的子项目之一,用于为C++程序提供日志功能,以便开发者对目标程序进行调试和审计。要使用log4cxx,首先要从官网下载,官网是http://logging.转载 2015-10-12 13:59:12 · 3545 阅读 · 0 评论 -
autoscan automake on centos
1. [root@localhost cswapserver]# yum install -y automake2.https://www.ibm.com/developerworks/cn/linux/l-makefile/原创 2015-10-08 17:17:56 · 683 阅读 · 0 评论 -
linux脚本传输文件(本机到远程)
expect -c " set timeout 10 spawn scp ××××××.tar.bz2 root@172.16.17.34:/ expect yes/no { send yes\r ; exp_continue } expect password: { send ××××××\r } expect 100% sleep 1"原创 2015-10-22 16:08:27 · 991 阅读 · 0 评论 -
Ubuntu 屏幕分辨率设置
hp@ubuntu:~$ xrandrScreen 0: minimum 1 x 1, current 800 x 600, maximum 8192 x 8192Virtual1 connected primary 800x600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 800x600 60.原创 2016-03-25 23:05:38 · 1116 阅读 · 0 评论 -
虚拟机的三种网络模式
1. 桥接 (VMnet0)(完全开放)本地物理网卡和虚拟网卡通过VMnet0虚拟交换机进行桥接,虚拟机和物理机地位平等,处于同一网段。可访公网。2. NAT(VMnet8)(半与世隔绝)虚拟机借助NAT(网络地址转换)功能,通过宿主机器所在的网络来访问公网。虚拟机网段由vmware创建。因此,和宿主机网段无关。3. Host-Only(VMnet1)(完全与世隔绝)...原创 2016-03-09 21:37:52 · 322 阅读 · 0 评论 -
gdb调试core dump文件
[root@localhost CMarketServer_dist]# gdb -c core.18669GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)Copyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or lat原创 2015-11-16 18:00:59 · 5699 阅读 · 0 评论 -
CentOS 6.5上安装Python 2.7.8
Installing Python 2.7.8 on CentOS 6.51. UpdateCentOS and install development tools1.1 yum-y update1.2 yumgroupinstall -y 'development tools' 2. Installthe packages2.1原创 2015-08-13 18:25:36 · 564 阅读 · 0 评论