安装nginx前,我们首先要确保系统安装了g++、gcc、openssl-devel、pcre-devel和zlib-devel软件。永久性关闭防火墙:chkconfig--level35iptablesoff## 注意中间的是两个英式小短线;重启如果是 CentOS 6 以上,RPM 地址为 ht...
分类:
其他好文 时间:
2015-05-15 19:33:22
阅读次数:
121
1、安装系统时+选包(最小化安装+ssh-server)
2、配置国内源或公司内部源
3、禁用开机不需要启动的服务(chkconfig或sysv-rc-conf)
4、根据项目情况修改系统内核参数/etc/sysctl.conf
5、根据项目情况修改系统文件描述符、堆栈等配置
6、禁止root远程登录、修改ssh端口为特殊端口..
分类:
其他好文 时间:
2015-05-14 20:40:33
阅读次数:
168
安装LNMP环境,PHP5.4.37版本安装成功,添加php-fpm服务到系统启动项时,报错servicephp-fpmdoesnotsupportchkconfig;php-fpm服务不支持chkconfig;编辑/etc/init.d/php-fpm启动脚本,打开之后是乱码,查找原因是拷贝php-fpm启动脚本文件错误。从同样环境下同样的php版本拷贝p..
分类:
Web程序 时间:
2015-05-13 13:08:51
阅读次数:
263
以下这段脚本:#! /bin/sh## chkconfig: - 55 45# description: The memcached daemon is a network memory cache service.# processname: memcached# config: /etc/sy....
分类:
系统相关 时间:
2015-05-13 12:35:06
阅读次数:
255
#!/bin/bash#chkconfig:-3021#description:httpservice.#SourceFunctionLibrary./etc/init.d/functions#NginxSettingsNGINX_SBIN="/usr/local/nginx/sbin/nginx"NGINX_CONF="/usr/local/nginx/conf/nginx.conf"NGINX_PID="/usr/local/nginx/logs/nginx.pid"RETVAL=0prog="Nginx..
分类:
其他好文 时间:
2015-05-12 01:48:23
阅读次数:
147
chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。使用语法:chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level ][系统服务...
分类:
其他好文 时间:
2015-05-10 22:03:19
阅读次数:
161
(一)、检查是否已经安装:chkconfig –list | grep vsftpd(二)、若没有反应,输入安装命令:yum –y install vsftpd截图如下:从上面的结果中看出,已经成功安装。然后为它创建日志文件:touch /var/log/vsftpd.log这样简单的两个命令就完成...
分类:
其他好文 时间:
2015-05-10 20:21:13
阅读次数:
129
systemd的主要命令行工具是systemctl。大多数Linux系统管理员应该都已经非常熟悉系统服务和init系统管理,比如service,chkconfig和telinit命令的使用。systemd也完成同样的管理任务,只是命令工具systemctl的语法...
分类:
系统相关 时间:
2015-05-10 13:02:56
阅读次数:
199
1.关闭不必要的服务ntsysvchkconfig必须开启的服务有: crond/messagebus/network/iptables/sshd/syslog/sysstat/snmpd关闭不必要的服务脚本:foriin`chkconfig--list|awk‘/3:on/{print$1}‘|grep-v"crond\| messagebus\|sshd\|iptables\|network\|syslog\|snmpd\|sysstat"`;doc..
分类:
系统相关 时间:
2015-05-10 08:37:18
阅读次数:
211
一、linux查看防火墙当前的状态1)查看防火墙状态:/etc/init.d/iptablesstatus暂时关闭防火墙:/etc/init.d/iptablesstop禁止防火墙在系统启动时启动/sbin/chkconfig--level2345iptablesoff重启iptables:/etc/init.d/iptablesrestart二、重启后生效开启:chkconfigiptableson关..
分类:
系统相关 时间:
2015-05-09 20:33:48
阅读次数:
177