07 2021 档案
摘要:package main import ( "fmt" "io" "os" "strconv" "bytes" ) func check(e error) { if e != nil { panic(e) } } /** * 判断文件是否存在 存在返回 true 不存在返回false */ func
阅读全文
摘要:if _, ok := map[key]; ok { //存在}
阅读全文
摘要:package main import ( "encoding/json" "fmt" "reflect" ) func main() { resString := ` { "access_token": "47_qIFirLMuWsDXVBWbUCRqWa8LnHku4L2oIALxb29p3j6
阅读全文
摘要:下载地址: wget -c http://sphinx-for-chinese.googlecode.com/files/sphinx-for-chinese-1.10.1-dev-r2287.tar.gz wget -c http://sphinx-for-chinese.googlecode.c
阅读全文
摘要:vim /usr/local/sphinx/etc/sphinx-min.conf source main { type = mysql sql_host = localhost sql_user = root sql_pass = root sql_db = test sql_port = 330
阅读全文
摘要:下载地址:https://github.com/php/pecl-search_engine-sphinx/tree/php7 /configure 的时候可能出错,提示 checking for libsphinxclient headers in default path... not foun
阅读全文
摘要:1、下载源码包 wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.0.18.tgz 2、解压缩包 tar -xzvf mongodb-linux-x86_64-rhel70-4.0.18.tgz 3、配置mongo
阅读全文
摘要:MongoDB是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。 1.配置存储库 创建一个/etc/yum.repos.d/mongodb-enterprise.repo文件,以便可以使用以下yum命令直接安装MongoDB Enterprise
阅读全文
摘要:1、关闭selinux setenforce 0 vim /etc/selinux/config SELINUX=disabled 保存退出 2、开启自动获取ip(桥接模式) vim /etc/sysconfig/network-scripts/ifcfg-ens32 TYPE=EthernetPR
阅读全文
摘要:1、分别在多台服务器上安装keepalived yum install -y keepalived 2、分别在多台服务器上安装nginx yum install -y nginx 3、配置keepalived(主从服务器分别填写自己的ip和权重) !Configuration File for ke
阅读全文
摘要:需要准备四台同一个网段IP的虚拟机,需要关闭防火墙或者防火墙开放80端口 cli:192.168.81.128 dr-lvs:192.168.81.131ifconfig ens32:0 192.168.81.123 broadcast 192.168.81.255 netmask 255.255.
阅读全文
摘要:1、安装虚拟机和安装centos7系统步骤省略 2、安装完centos7系统之后登录系统 注意:如果系统没有自动分配ip地址的话需要修改配置文件 vim /etc/sysconfig/network-scripts/ifcfg-ens32 将ONBOOT=no改为ONBOOT=yes 关闭selin
阅读全文
摘要:要求sqlserver 2012以上版本 使用命令 SELECT @@VERSION 查看版本号 select * from table_name order by id offset 0 rows fetch next 10 rows only;
阅读全文
摘要:1.隐藏 X-Powered-By vim /usr/local/php/etc/php-fpm.d/www.conf 添加:php_flag[expose_php] = off 2.修改响应头Server的信息 需要重新编译nginx vim src/http/ngx_http_header_fi
阅读全文
摘要:nginx防盗链有两种方式: 1使用第三方模块ngx_http_accesskey_module,这个下次记录 2.使用ngx_http_referer_module模块 location ~* \.(gif|jpg|swf)$ { valid_referers none blocked *.you
阅读全文