Loading

邢栋博客

“服务器笔记“

nginx设置404页面

打开nginx配置文件,加入代码 error_page 404 = /404.html; 如图所示:

linux服务区设置禁止ping

设置仅有ping broadcasts地址时才取消ping的回应 echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 设置全部ping都回应 echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all 建议选择第一种

linux编译php7后找不到php.ini

今天在编译php7后竟然没有找到 php.ini这个配置文件 最后解决办法 执行 /server/php7/bin/php --ini 显示 Configuration File (php.ini) Path: /server/php7/lib/ Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none) php.ini位置修改方法如下: 编辑php时 ./conf...

make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

编译php7时报错 make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1 原来竟然是我的内存小于1G造成的,穷人没办法啊 解决办法 在编译时 加上 --disable-fileinfo ./configure --prefix=/lnmp/php7/ --disable-fileinfo PS:Disable fileinfo support 禁用 fileinfo

configure: error: xml2-config not found. Please check your libxml2 installation

编译php7时报错 configure: error: xml2-config not found. Please check your libxml2 installation 检查是否安装了libxm包 执行rpm -qa |grep libxml2 显示 libxml2-2.7.6-14.el6_5.2.x86_64 libxml2-python-2.7.6-14.el6_5.2.x86_64 重新安装libxml2和libxml2-devel包 yum install libxml2 yum install libxml2-devel 安装完之...

linux下memcache以及其php扩展的安装

安装memcache ,先下载 1.首先安装依赖包libevent yum –y install libevent 主包已经安装,别忘记安装libevent-devel,不然./configure过不去 tar xzf /lamp/memcached-1.4.10.tar.gz 解压memcached cd /lamp/memcached-1.4.10 进入 memcached目录 ./configure --prefix=/usr/local/memcache 配置 make && make install 编译与安装 userad...

wampserver环境下apache配置多站点

之前一直用,也没总结过,现在简单的总结下: wampserver环境下apache配置多站点 目前wampserver的安装目录是在 :D:\wamp 1.先修改host文件:文件位置 C:\Windows\System32\drivers\etc (我的是win7 64位) 添加一条记录:(www.study.com为站点域名) 127.0.0.1 www.study.com 2.修改httpd.conf文件:文件位置 D:\wamp\bin\apache\apache2.4.9\conf a.找到<Directory "d:/wamp...

mongo的基本操作(包括php的)

db.test.find()<==> select from test db.test.find({'name':'foobar'})<==> select from test where name='foobar' db.test.find({'ID':10}).count()<==> select count() from test where ID=10 db.test.find().skip(10).limit(20)<==> select from test limit 10,20 db.test...

linux挂载命令

1查询与自动挂载 mount 查询系统中已经挂载的设备 mount -a 依据配置文件/etc/fstab的内容,自动挂载 2.挂载命令格式 mount [-t 文件系统] [-o 特殊选项] 设备文件名 挂载点 选项: -t 文件系统:加入文件系统类型来指定挂载的类型,可以ext3 ext4 iso9660等文件系统 -o 特殊选项: 可以指定挂载的额外选项 atime/noatime 更新访问时间/不更新访问时间。访问分区文件时,是否更新文件的访问时间,默认为更新 async/sync 异步/同步,默认为异步 auto/noauto 自动/手动,mo...

linux常用的查看系统配置信息的命令

linux常用的查看系统配置信息的命令,查看cpu,内存,版本信息 查看CPU信息(型号) cat /proc/cpuinfo 查看内 存信息 cat /proc/meminfo 看查看系统位数 uname -a 查看操作系统版本 lsb_release -a 查看端口占用 netstat -tunlp 或者 netstat -tunlp |grep 22 查看进程 杀死进程 ps -ef 或者 #ps -ef| grep php-fpm 或者 #ps -aux| grep php-fpm(显示所有状态) kill -9 [PID] 查看磁盘空间 d...