“服务器笔记“
linux centos 查看修改计算机名
linux centos 查看修改计算机名 查看计算机名 hostname //更多信息查看可以 hostname --help 修改计算机名 vim /etc/sysconfig/network //修改为HOSTNAME=Action vim /etc/hosts // 修改为10.51.105.19 Action 10.51.105.19是我服务器的ip 重启计算机 reboot ps:不适用于centos7+
vim取消之前搜索的文字高亮
vim取消之前搜索的文字高亮 :noh 顺便记录下取消行号:set nonu
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...