上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页

2017年10月25日

Linux安装VM虚拟化软件

摘要: 我电脑系统是kali最新版首先去官网下一个vm安装包,给个直达网址http://www.vmware.com/cn/products/workstation/workstation-evaluation.html下相应linux版的,顺便附上密钥VY1DU-2VXDH-08DVQ-PXZQZ-P2K 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(351) 评论(0) 推荐(0)

mysql配置my.cnf文件,以及参数优化提升性能

摘要: 系统centos7 mariadb通过yum安装 mysql配置文件位于/etc/my.cnf 常用参数: 1)max_connections设置最大连接(用户)数,其默认值为100,设置太小会出现too many connections错误。例如,max_connections=1000 其修改方 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(9904) 评论(0) 推荐(0)

mysql再探

摘要: select子句及其顺序select from where group by having order by limit 创建表create table student(id int not null auto_increment,name varchar(20) default 'noname', 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(123) 评论(0) 推荐(0)

mysql深入

摘要: 使用存储过程create procedure productpricing() begin select avg(prod_price) as priceaverage from products; end; 创建一个新的存储过程productpricing执行存储过程call productpri 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(245) 评论(0) 推荐(0)

Centos7安装jdk

摘要: 首先查看是否有java环境,如果看到java版本是1.8,注意这个是openjdk,不是我们需要的jdk,那么我们需要先卸载改jdk。(最小化安装没有这个openjdk) 尴尬,卸载完1.8版本,1.7版本又自动顶上去了,那么就继续干掉它呗,出问题了再恢复快照就ok了,反正又不是生产环境 回车后,执 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(696) 评论(0) 推荐(1)

centos7之防火墙firewalld配置入门

摘要: linux部分 iptables -L 列出当前防火墙策略 iptables -F 清空防火墙策略 iptables -P INPUT DROP 默认设置丢弃进来的流量包(-p指默认策略,该命令设置后不可ping通,无法上网) iptables -I INPUT -p icmp -j ACCEPT 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(2119) 评论(0) 推荐(0)

centos 7 lvs 负载均衡搭建部署

摘要: 本文最近编辑与2021-11-25环境: 在vm里开三个虚拟机 负载调度器:10.0.3.102 真实服务器1:10.0.3.103 真实服务器2:10.0.3.104 虚拟ip: 10.0.3.99 (用来飘移) 负载调度器上 ifconfig eth0:0 10.0.3.99 netmask 2 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(1561) 评论(0) 推荐(0)

SSH实现免密登录及其原理

摘要: 本文最近更新于2021.11.25 (一)ssh免密登录原理 客户端私钥是自己独有的,公钥是公开的。服务器公钥加密后的数据只有客户端使用自己的私钥才能解密 challenge指公钥加密“质询” 认证过程分为两个步骤。 会话密钥(session key)生成 客户端请求连接服务器,服务器将 As 发送 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(1551) 评论(0) 推荐(0)

Centos7使用PXE+Kickstart无人值守安装服务

摘要: 最近更新:2021.12.09首先,关闭selinux和防火墙PXE是一种引导方式,即预启动执行环境。客户端通过dhcp获取IP,从ftp和http上下载启动配置文件(通过kickstart生成)和系统镜像,从而实现无人值守安装。 我们需要安装的软件如下 dhcp(用来获取ip) tftp-serv 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(269) 评论(0) 推荐(0)

centos7安装终端分屏软件terminator

摘要: 用惯了terminator再用系统自带的终端,发现很不习惯不能快速分屏,于是琢磨着给centos7安装terminator 方法一:rpm安装 首先,下载rpm包 wget -c http://li.nux.ro/download/nux/dextop/el7/x86_64//terminator- 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(1134) 评论(0) 推荐(0)

排序算法——二元选择排序

摘要: 二元选择排序 原理:这个是在选择排序方法上改进的。这种排序法会同时查找最大值和最小值。找到最大最小值之后需要注意它是怎么放到正确的位置的,我就是在交换位置这里耗了一个下午,先是把头尾的值放到最大最小的那两个位置那里,在把最小和最大值分别放到头尾。 [03:20:54] vi eryuanselect 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(305) 评论(0) 推荐(0)

pread和pwrite函数

摘要: 先来介绍pread函数 [root@bogon mycode]# cat test.c #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> char buf[20]; void testpread(int 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(506) 评论(0) 推荐(0)

算法与数据结构——选择,插入,希尔排序

摘要: 首先来看比较简单的选择排序(Selection sort),插入排序(Insertion sort),然后在分析插入排序的特征和缺点的基础上,介绍在插入排序基础上改进的希尔排序(Shell sort)。 一 选择排序 原理:现在假设我们给一个队伍排序。首先我们找到那个最矮的叫他站第一位,再找出第二矮 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(142) 评论(0) 推荐(0)

sudo权限的设置

摘要: 什么是sudo,为什么要sudo呢?就我个人愚见普通用户sudo之后拥有root用户的所有权限,其优点在于,虽然该用户拥有root权限,但他却不需要知道root用户密码,需要输入的是他本身的密码。 那既然sudo用户也具有潜在的毁灭性,比如说一时头脑短路,普通用户sudo rm -rf /* 不就完 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(223) 评论(0) 推荐(0)

防火墙端口转发的实现

摘要: 安装tomcat后,想从80端口访问tomcat怎么实现?我们可以通过端口转发实现 firewall-cmd –add-forward-port=port:80:proco=tcp:toport=8080 将80端口请求转发至8080端口,如果需要永久生效,加–permanent选项 命令执行后没有 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(915) 评论(0) 推荐(0)

怎么把某服务加入到防火墙服务中,直接让防火墙通过其请求

摘要: 一般来说,我们yum安装的服务,会自动把该服务增加到防火墙里面,至于到底是不是,我还没实验过,以后有时间我再去验证一下 回到正题,我们安装了tomcat,怎么让它通过防火墙被外界访问到,除了直接允许防火墙通过8080端口(这也是我目前唯一知道的方法,不,还有一种方法是关闭防火墙来着),那有没有其它方 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(455) 评论(0) 推荐(0)

linux配置防火墙

摘要: centos6.5 防火墙开放80端口 iptables -I INPUT -p tcp –dport 80 -j ACCEPT //注意,dport前面是两个-,其中-I是指在防火墙INPUT表最前面插入该条规则-p 用来指定协议的 –dport指定端口 那么我们再看看怎么关闭80端口 iptab 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(213) 评论(0) 推荐(0)

截断文件函数truncate和ftruncate

摘要: 两个函数目的都是将文件大小设置为length参数指定的值 int truncate(const char *pathname,off_t length)//pathname就是路径 int ftruncate(int fd,off_t length);//该系统调用不会修改文件偏移量 其中trunc 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(954) 评论(0) 推荐(0)

dup等复制文件描述符函数

摘要: [root@bogon code]# cat b.c #include<stdio.h> #include<error.h> #include<unistd.h> #include<fcntl.h> #define MAX_SIZE 5 int main() { int fd=open("a.c", 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(221) 评论(0) 推荐(0)

fcntl获取和修改文件打开状态标志

摘要: [root@bogon code]# cat b.c #include<stdio.h> #include<error.h> #include<unistd.h> #include<fcntl.h> int main() { int fd=open("a.c",O_RDONLY);//以可读方式打开 阅读全文

posted @ 2017-10-25 18:06 标配的小号 阅读(224) 评论(0) 推荐(0)

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 30 下一页

导航