技术改变生活

博客园 首页 新随笔 联系 订阅 管理
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页

2020年7月10日 #

摘要: 在Linux中,下载用的命令通常是wget。但是wget命令是单线程的,也就是说在下载国外的某些软件时容易断开连接,这也就意味着,本机会死机。 下载视频,可以使用you-get下载,默认下载格式为flv,you-get下载工具是python语言编写,所以需要先安装python3-pip工具,然后使用 阅读全文
posted @ 2020-07-10 17:26 小阿峰 阅读(1458) 评论(0) 推荐(0) 编辑

摘要: CentOS7通过epel的yum安装dnf后,运行dnf会报以下错误: Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> from dnf.cli import main File "/usr/ 阅读全文
posted @ 2020-07-10 17:15 小阿峰 阅读(5727) 评论(1) 推荐(2) 编辑

2020年7月2日 #

摘要: 第一步:搭建http服务 安装apache并启动 [root@x112 html]# yum install -y httpd [root@x112 html]# systemctl start httpd [root@x112 html]# systemctl enable httpd 查看运行状 阅读全文
posted @ 2020-07-02 10:22 小阿峰 阅读(228) 评论(0) 推荐(0) 编辑

2020年7月1日 #

摘要: [root@x112 html]# setfacl -m u:apache:r /var/www/html/setfacl: /var/www/html/: Operation not supported 解决方法如下(转载): 情景1 硬盘挂载:问题:/mnt/bak为硬盘的一个分区,在fstab 阅读全文
posted @ 2020-07-01 16:56 小阿峰 阅读(911) 评论(0) 推荐(0) 编辑

摘要: 搭建nfs服务器,服务端配置如下: [root@x160 ~]# yum -y install nfs-utils [root@x160 ~]# systemctl start nfs-server [root@x160 ~]# systemctl enable nfs-server [root@x 阅读全文
posted @ 2020-07-01 16:46 小阿峰 阅读(389) 评论(0) 推荐(0) 编辑

摘要: vmware的nat模式上网 此种模式,原理是使用了2次nat功能,现在的移动及联通多数使用这种方式上网,解决了ipv4地址不足的问题。需要注意的是,2次nat,需要分配2个不同的网段。 例如: [root@x112 ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mt 阅读全文
posted @ 2020-07-01 10:50 小阿峰 阅读(688) 评论(0) 推荐(0) 编辑

2020年6月30日 #

摘要: centos7默认服务器网卡名称,如下图: [root@localhost ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.160 netmask 255.255.255.0 阅读全文
posted @ 2020-06-30 17:12 小阿峰 阅读(454) 评论(0) 推荐(0) 编辑

摘要: centos修改主机名 1、临时修改,重启失效 [root@centos17 ~]# hostname abc [root@centos17 ~]# hostname abc 2、永久修改,修改配置文件,重启生效 [root@centos17 ~]# cat /etc/hostname centos 阅读全文
posted @ 2020-06-30 11:19 小阿峰 阅读(167) 评论(0) 推荐(0) 编辑

2020年6月26日 #

摘要: 临时修改umask值,(umask 044;touch a.txt;ll a.txt) [root@localhost ~]# (umask 044;touch a.txt;ll a.txt) -rw--w--w- 1 root root 0 Jul 29 00:12 a.txt ()表示在子she 阅读全文
posted @ 2020-06-26 14:55 小阿峰 阅读(1982) 评论(0) 推荐(0) 编辑

2020年6月22日 #

摘要: mysql> alter table a1 change id idname int(20) unsigned not null; 修改表字段属性关键字change,语法:alter table 表名 change 旧字段名称 新字段名称 新字段属性;需要注意地方,unsigned 必须紧跟在int 阅读全文
posted @ 2020-06-22 17:05 小阿峰 阅读(375) 评论(0) 推荐(0) 编辑

2020年6月5日 #

摘要: mysql表复制 mysql表结构复制+mysql表数据复制 mysql> create table t2 like t1; mysql> insert into t2 select * from t1; mysql> select * from t1 into outfile '/tmp/a.tx 阅读全文
posted @ 2020-06-05 12:50 小阿峰 阅读(140) 评论(0) 推荐(0) 编辑

摘要: mysql中使用root用户登录出现:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 错误产生的原因是root用户没有localhost登录的权限,修改 /etc/my.cnf数据 阅读全文
posted @ 2020-06-05 12:46 小阿峰 阅读(2332) 评论(0) 推荐(1) 编辑

2020年4月28日 #

摘要: 1 [root@localhost mv_test]# cat mv.sh 2 #!/bin/bash 3 4 DIR=/root/linshi/move 5 FILE=/root/linshi/test/mv 6 if [ -d $DIR ];then 7 rm -rf $DIR/* 8 fi 9 阅读全文
posted @ 2020-04-28 11:17 小阿峰 阅读(1241) 评论(0) 推荐(0) 编辑

2020年4月27日 #

摘要: 1 [root@localhost array]# cat function_locate.sh 2 #!/bin/bash 3 if [ $# -ne 3 ];then 4 echo "usage: `basename $0` part1 part2 part3" 5 exit 6 fi 7 8 阅读全文
posted @ 2020-04-27 23:02 小阿峰 阅读(225) 评论(0) 推荐(0) 编辑

摘要: 1 [root@localhost array]# cat for.sh 2 #!/bin/bash 3 for i 4 do 5 #echo abc 6 let sum+=$i 7 done 8 echo $sum 9 [root@localhost array]# sh for.sh 1 2 3 阅读全文
posted @ 2020-04-27 22:39 小阿峰 阅读(380) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页