![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux技术
Linux日常知识
m0_46485771
这个作者很懒,什么都没留下…
展开
-
ssh连接慢解决办法
ssh连接慢解决办法(成功)用真机连接虚拟机卡的话:1.进入虚拟机vim /etc/ssh/sshd_config2.将 #UseDNS yes改为UseDNS no即可如下:使用/UseDNS找到地方然后添加#UseDNS yesUseDNS no#PidFile /var/run/sshd.pidsystemctl restart sshd[root@foundation21 network-scripts]# ssh root@172.25.254.121root@172.25.转载 2022-03-25 13:12:41 · 479 阅读 · 0 评论 -
shell重启脚本-脚本停止
经常需要对shell进行重启,重启首先就得停止原来的程序。有时候需要使用kill 进程的方式,每次手工查进程,比较麻烦,下面弄个工具:APP_NAME=app.jarecho “---停止XXX应用服务---”is_exit(){ #获取PID PID=`ps -ef |grep ${APP_NAME} |grep -v grep |awk '{print $2}'` if [ -z "${PID}" ] then return 1 else return 0 fi}is_ex原创 2021-06-05 13:53:05 · 448 阅读 · 0 评论 -
分布式程序Shell脚本批量部署-expect工具
分布式程序Shell脚本批量部署和重启,使用expect工具。原创 2021-06-05 13:38:34 · 224 阅读 · 0 评论 -
并发编程-Linux环境下C语言并发理解-一
在centos7上安装gcc使用yum命令安装还是非常easy的。yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件使用VI工具编写如下代码#include<pthread.h>#include<stdio.h>//定义一个变量 接受创建线程后的线程idpthread_t pid;//定义线程的主体函数//void* thread_entity(void* arg){ printf("i原创 2021-03-04 10:44:27 · 196 阅读 · 1 评论 -
Linux文章系列-操作系统
SUSE Linux 收费SUSE(发音 /ˈsuːsə/)是指SUSE Linux ,是德国 SuSE Linux AG公司发行维护的Linux发行版,是属于此公司的注册商标。第一个版本出现在1994年年初。2004年这家公司被Novell公司收购。Redhat Linux 收费REDHAT一般指Red Hat。Red Hat(红帽)公司(NYSE:RHT)是一家开源解决方案供应商,Redhat Linux Redhat 公司产品。Centos 免费CentOS是免费的、开源的、可以重新分发的原创 2021-02-20 11:30:29 · 153 阅读 · 0 评论 -
Linux文章系列--运维相关命令
查看CPUhttps://www.cnblogs.com/grimm/p/5622491.htmlhttps://www.linuxprobe.com/linux-cpu-message.html原创 2021-02-20 11:18:56 · 62 阅读 · 0 评论 -
Centos7Min版本联网情况下基础软件安装-FTP工具
一、搭建vsftp服务器1.安装vsftpdyum -y install vsftpd2.配置vsftpvim /etc/vsftpd/vsftpd.conf显示行号 :set nu修改第12行为: anonymous_enable=NO 禁止匿名登录参考:https://blog.csdn.net/dingpeiqiang/article/details/87829518...原创 2021-01-19 22:13:00 · 99 阅读 · 1 评论 -
Centos文章系列--关闭防火墙
查看状态systemctl status firewalld.service关闭防火墙systemctl stopfirewalld.service可永久关闭防火墙systemctl disable firewalld.service[root@bogon ~]# systemctl disable firewalld.serviceRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Re原创 2021-01-05 19:51:03 · 58 阅读 · 0 评论 -
VMware里Centos7设置静态IP
之前设置过VMware Workstation Pro固定IP,没有记录,这次又需要操作一次,记录一下。这样不用每次都要修改IP了。这个是关键,先设置为NAT模式,配置好子网并记住,后面需要用到。我IP分配从130开始。大致计划是130以内的暂时预留,未来作为Docker使用。主环境Win10.Centos桌面版本配置,界面操作打开网络配置界面:使用命令systemctl restart network测试:[root@localhost ~]# ping www.baidu.com原创 2020-07-04 14:39:16 · 427 阅读 · 0 评论 -
Centos 7端口开放
Centos 7使用firewalld代替了原来的iptables。下面记录如何使用firewalld开放Linux端口:[root@localhost ~]# firewall-cmd --list-ports21/tcp[root@localhost ~]# firewall-cmd --query-port=21/tcpyes[root@localhost ~]# firewall...原创 2020-06-11 22:59:10 · 147 阅读 · 0 评论