accept

CentOS6.6服务器系统配置(LAMP+phpMyAdmin)全流程

二次信任 提交于 2020-01-01 00:29:27
CentOS6.6服务器系统配置(LAMP+phpMyAdmin)全流程 昨天在腾讯云上买了个服务器,是CentOS6.6操作系统的裸机,里面什么都没,然后开始了一天一夜的LAMP(Apache+MySql+PHP)的环境配置。借鉴了很多人的做法,花了很多时间,流了很多的汗水,虽然成功了,但是考虑到以后可能还有用,或者能给别人做做参考,于是写下这篇博客。(这篇博客借鉴了其他很多博客,借鉴最多的就是 osyunwei 的这篇博客,但是那些博客都是配置低版本的php和mysql,不便现在我们使用,我整合了所有博客中有用的部分,拼凑成我这篇博客,绝对可行,而且php和mysql都是5.5的版本) 1.CentOS6.6防火墙及SELINUX配置 CentOS6.6下的防火墙是不允许外网访问的,所以我们要在裸机上配置防火墙,开启80端口、3306端口 命令行输入 vi /etc/sysconfig/iptables,然后按 i 进行编辑,添加下面两个字段 -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT :wq! #保存退出,注意 80 得放在 20 的下面!

ubuntu中防火墙iptables配置

非 Y 不嫁゛ 提交于 2019-12-30 22:47:37
1.查看系统是否安装防火墙 root@localhost:/usr # which iptables /sbin/iptables root@localhost:/usr # whereis iptables iptables: /sbin/iptables /etc/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz 如果是这样的信息,那么表明iptables就是安装了的。 如果没有安装,那么使用sudo apt-get install iptables 安装。 2.查看防火墙的配置信息 配置好了的,是这个样子。 root@localhost:/usr # sudo iptables -L Chain INPUT ( policy DROP ) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt: 22 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http

selenium python (十一)alert/confirm/prompt的处理(js中的弹出框)

女生的网名这么多〃 提交于 2019-12-30 14:25:28
webdriver中处理js所生成的alert、confirm以及prompt,采用switch_to_alert()方法定位到alert/confirm/prompt。然后使用text/accept/dismiss/send_keys进行操作   ①text:返回alert/confirm/prompt中的文字信息   ②accept:点击确认按钮   ③dismiss:点击取消按钮   ④send_keys:输入值,这个alert/confirm/prompt没有对话框就不能使用,否则会报错 eg:百度的设置页面,在设置完成后点击“保存设置”所弹的提示框 ======================================================= #!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'zuoanvip' from selenium import webdriver import time driver = webdriver.Firefox() driver.get('http://www.baidu.com') #打开搜索设置 driver.find_element_by_name('tj_setting').click() driver.find_element_by_id('SL

CentOS 7搭建FTP服务器

99封情书 提交于 2019-12-30 08:35:18
安装vsftpd 命令:yum -y install vsftpd 修改ftp配置文件 命令:vim /etc/vsftpd/vsftpd.conf 按i进入insert模式后,按以下要求修改 anonymous_enable=YES #改为anonymous_enable=NO chroot_local_user=YES #去掉前面的注释 #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd/chroot_list #不受限制的用户列表,用不用都OK allow_writeable_chroot=YES   #加上这行解决了无法登陆的问题(重点,不然可能会出现530问题) 重启ftp systemctl start vsftpd.service systemctl restart vsftpd.service 设置开机启动ftp systemctl enable vsftpd.service 配置防火墙(重点!) #先检查是否安装了iptables service iptables status #安装iptables yum install -y iptables #升级iptables yum update iptables #安装iptables-services yum install iptables

centos7 关闭firewall安装iptables并配置

夙愿已清 提交于 2019-12-30 08:34:37
一、配置防火墙,开启80端口、3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。 1、关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp

centos7 关闭firewall安装iptables并配置

前提是你 提交于 2019-12-30 08:34:21
一、配置防火墙,开启80端口、3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。 1、关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp

centos7 关闭firewall安装iptables并配置

拈花ヽ惹草 提交于 2019-12-30 08:34:13
centos7 关闭firewall安装iptables并配置 一、配置防火墙,开启80端口、3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。 1、关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A

浅析 Nginx 网络事件

浪尽此生 提交于 2019-12-29 14:41:22
Nginx 是一个事件驱动的框架,所谓事件主要指的是网络事件,Nginx 每个网络连接会对应两个网络事件,一个读事件一个写事件。在深入了解 Nginx 各种原理及在极端场景下的一些错误场景处理时,需要首先理解什么是网络事件。 网络传输 好看的小说 www.shupu.org 接下来看上面这张图,比如主机 A 就是一台家里的笔记本电脑,那么主机 B 就是一台服务器,上面跑着 Nginx 服务。从主机 A 发送一个 HTTP 的 GET 请求到主机 B,这样的一个过程中主要经历了哪些事件?通过上图数据流部分可以看出: 应用层 里发送了一个 GET 请求 -> 到了 传输层 ,这一步主要在做一件事,就是浏览器打开了一个端口,在 windows 的任务管理器中可以看到这一点,他会把这个端口记下来以及把 Nginx 打开的端口比如 80 或者 443 也记到传输层 -> 然后在 网络层 会记下我们主机所在的 IP 和目标主机,也就是 Nginx 所在服务器公网 IP -> 到 链路层 以后 -> 经过 以太网 -> 到达家里的路由器( 网络层 ),家中的路由器会记录下所在运营商的一些下一段的 IP -> 通过 广域网 -> 跳转到主机 B 所在的机器中 -> 报文会经过 链路层 -> 网络层 -> 到 传输层 ,在传输层操作系统就知道是给那个打开了 80 或者 443 的进程

Nginx子域名配置

岁酱吖の 提交于 2019-12-28 03:24:23
extends:http://blog.csdn.net/xiaoping0915/article/details/53899465 ,http://www.myhack58.com/Article/48/66/2012/34999.htm?spm=5176.100239.blogcont48640.5.jM0gSj 在阿里云服务器的域名解析里添加你要增加的子域名主机记录 然后在centos 的Nginx 配置中,增加子域名解析 如果你解析的是本地IP端口地址 server { listen 80; server_name B.ABC.com; location / { proxy_pass http://localhost:4321; //设置主机头真实IP地址的用户避免获得为代理服务器的地址 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } 如果你解析的是目录网页 #MY CONFIG START server { listen 80; server_name qq.com; root /usr/share/nginx/html; index index.php

java 函数式接口Consumer

假如想象 提交于 2019-12-27 03:44:34
目录 简介 accept方法 andThen方法 经典应用-iterable 扩展类介绍 简介 Consumer是一个函数式接口, 它有一个需要覆盖的方法accept,代表接受一个参数输入且没有任何返回值的操作 。不同于其它的函数式接口, Consumer期望通过方法的实现来执行具体的操作 。 accept方法 可以看到它接受一个参数,什么都不返还 /** * Performs this operation on the given argument. * <p>接受一个参数,覆盖的方法对它做出动作,什么都不返回 * @param t the input argument */ void accept(T t); 具体使用例子 Consumer<String> consumer=new Consumer<String>() { @Override public void accept(String t) { System.out.println(t+"123"); } }; consumer.accept("abc"); 最后打印abc123 andThen方法 这个方法返回一个组合过的consumer实例, 它的accept方法是先调用this这个consumer的accept方法,然后调用after的accept方法 /** * Returns a composed {