随笔分类 -  linux

上一页 1 2
centos7修改网卡名称
摘要:1:进入vim /etc/sysconfig/network-scripts目录 2:先编辑网卡的配置文件将里面的NAME DEVICE项修改为eth0 vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 3:修改name和device值为eth 阅读全文
posted @ 2017-08-08 17:33 网络终结者 阅读(424) 评论(0) 推荐(0)
Linux下jdk下载
摘要:wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-l... 阅读全文
posted @ 2017-02-22 11:57 网络终结者 阅读(676) 评论(0) 推荐(0)
zookeoper在root下设置开机启动
摘要:1 准备工作 1) 切换到/etc/rc.d/init.d/目录下 2) 创建zookeeper文件:touch zookeeper 3)更新权限:chmod +777 zookeeper 4)编辑文件,在zookeeper里面输入如下内容 2 设置等级:chkconfig --level zook 阅读全文
posted @ 2017-01-15 14:25 网络终结者 阅读(264) 评论(0) 推荐(0)
linux jdk环境变量
摘要:使环境变量立马生效: 阅读全文
posted @ 2017-01-14 22:08 网络终结者 阅读(155) 评论(0) 推荐(0)
Maven deploy
摘要:1.在maven/conf/setting.xml中: 在中加入 internal username password 2.maven命令 mvn deploy:deploy-file -Durl=仓库url -DrepositoryId=internal -Dfile=test.jar -DgroupId=com.ce.test -... 阅读全文
posted @ 2017-01-09 21:01 网络终结者 阅读(1110) 评论(0) 推荐(0)
Linux 环境变量PS1设置
摘要:新建用户不显示IP和机器名 CentOS下新增加一个用户,登录进去会发现shell脚本信息没有显示用户名和主机名,反而显示的是user1@202.173.1.12 解决方案: 1.在新建用户的~目录下新建或者更改.bash_profile;这个过程中可能需要root用户来新建或者修改 2.在.bas 阅读全文
posted @ 2016-12-02 14:22 网络终结者 阅读(5463) 评论(0) 推荐(0)
添加sudo权限
摘要:进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用) 添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。 编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx... 阅读全文
posted @ 2016-12-01 13:38 网络终结者 阅读(228) 评论(0) 推荐(0)
ssh免密码认证
摘要:举例:有机器PC_A(172.0.246),PC_B(172.0.1.140)。现想A通过ssh免密码登录到B。 1.在PC_A主机下生成公钥/私钥对 2.将PC_A主机下的公钥id_rsa.pub复制到PC_B机下 3.将PC_B主机上的公钥添加到/home/comodo/.ssh/authorz 阅读全文
posted @ 2016-11-16 14:43 网络终结者 阅读(1622) 评论(0) 推荐(0)
nginx指定配制文件
摘要:nginx启动: nginx重启 验证nginx.conf是否正确 Nginx安装: 阅读全文
posted @ 2016-05-04 10:27 网络终结者 阅读(274) 评论(0) 推荐(0)
ssh-copy-id帮你建立信任
摘要:一、ssh-keygen -t rsa 二、ssh-copy-id knet@192.168.15.14 阅读全文
posted @ 2016-03-25 17:19 网络终结者 阅读(249) 评论(0) 推荐(0)
救火必备linux命令
摘要:查看tomcat并发数: 阅读全文
posted @ 2016-03-25 11:24 网络终结者 阅读(204) 评论(0) 推荐(0)
Linux 常用命令
摘要:--查询端口 netstat -tunlp | grep 80 阅读全文
posted @ 2016-01-29 10:31 网络终结者 阅读(139) 评论(0) 推荐(0)
根据名称查询当前运行的程序的个数
摘要:#!/bin/bash PROC_NAME=$1 ProcNumber=`ps -ef |grep $PROC_NAME|grep -v grep|wc -l` if [ $ProcNumber -le 0 ];then result=0 else result=1 fi echo ${result 阅读全文
posted @ 2016-01-28 17:41 网络终结者 阅读(243) 评论(0) 推荐(0)
把所有特权给root '%'所有IP
摘要:grant all privileges on *.* to root@'%' identified by 'root';--把所有特权给root '%'所有IP 阅读全文
posted @ 2016-01-16 22:46 网络终结者 阅读(175) 评论(0) 推荐(0)
scp命令
摘要:对拷文件夹 (包括文件夹本身)scp -r /home/wwwroot/www/charts/util root@192.168.1.65:/home/wwwroot/limesurvey_back/scp对拷文件夹下所有文件 (不包括文件夹本身)scp /home/wwwroot/www/... 阅读全文
posted @ 2016-01-10 01:03 网络终结者 阅读(258) 评论(0) 推荐(0)
Linux下用SCP无需输入密码传输文件
摘要:在Linux环境下,两台主机之间传输文件一般使用scp命令,通常用scp命令通过ssh获取对方linux主机文件的时候都需要输入密码确认。不过通过建立信任关系,可以实现不输入密码。这里假设A的IP:192.168.10.1B的IP:192.168.10.2需要从A免密码输入复制文件至B。1. 在主机... 阅读全文
posted @ 2016-01-10 01:00 网络终结者 阅读(3679) 评论(0) 推荐(0)
Linux 安装 nginx注意
摘要:./configure --prefix=/usr/local/nginx TO./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf 阅读全文
posted @ 2015-12-25 22:08 网络终结者 阅读(203) 评论(0) 推荐(0)

上一页 1 2