CentOS 7已经切换到 systemd,系统指令也有所变化。之前用于启动、重启、停止各种服务的service作为向后兼容的指令还能使用,但是将来可能会消失。同时,chkconfig也改成了systemctl了。这里列举了一些常用的对应于service和chkconfig的新的systemctl指...
分类:
其他好文 时间:
2015-05-09 17:24:47
阅读次数:
125
centos6.3配置gitlab-7.10.0-omnibus(使用smtp服务进行邮件发出)1.依赖包安装yuminstallopenssh-servercronie-y#yuminstallpostfix//使用sendmail进行发送邮件需要安装,但是没有配置成功,这里采取smtp服务器进行邮件发出,故不再安装postfix。#servicepostfixstart#chkconfig..
分类:
其他好文 时间:
2015-05-08 00:19:30
阅读次数:
219
关闭网络管理器 chkconfig NetworkManager off ##和桥接有冲突,要关闭 service NetworkManager stop 修改eth0为物理网口,br0为桥接网口配置文件: [root@vfeelit network-scripts]# cat ifcfg-br0 ...
分类:
其他好文 时间:
2015-05-07 20:20:08
阅读次数:
177
1. 安装nfs-utils和rpcbindyum install nfs-utils rpcbind2.设置开机启动服务chkconfig nfs onchkconfig rpcbind on3.第一次启动服务servicerpcbind startservicenfs start2.创建共享目录...
分类:
其他好文 时间:
2015-05-07 13:53:49
阅读次数:
114
启动脚本:vim/etc/init.d/rabbitmq-server#!/bin/sh##rabbitmq-serverRabbitMQbroker##chkconfig:-8005#description:EnableAMQPserviceprovidedbyRabbitMQ####BEGININITINFO#Provides:rabbitmq-server#Required-Start:$remote_fs$network#Required-Stop:$remote_fs$network#De..
分类:
其他好文 时间:
2015-05-07 12:42:23
阅读次数:
798
#!/bin/sh
sz=`uname-a|grep"x86_64"|wc-l`
if[$sz-ne1]
then
echo"systemhardware-platformerror"
exit1
fi
echo"----------------------------------------------------------------------"
echo"closesomeservices"
{
chkconfig--level3abrtdoff
chkconfig--level3acpidoff
..
分类:
其他好文 时间:
2015-05-06 18:19:50
阅读次数:
128
最简洁粗暴版的虚拟用户配置FTPyum安装FTP: yum install vsftpd pam* db4* -y 设置为系统服务:chkconfig –level 35 vsftpd on 2.vsftpd 开启: /etc/init.d/vsftpd start 或者 service vsfp....
分类:
其他好文 时间:
2015-05-06 12:34:24
阅读次数:
248
chkconfig--level3irqbalanceoff#!/usr/bin/envpythonimportsocketimportfcntlimportstructimportarrayimportplatformimportosimportsysBYTES=4096buf=4096defget_cpu_core_num():try:importmultiprocessingreturnmultiprocessing.cpu_count()except(ImportError,NotImplemente..
分类:
编程语言 时间:
2015-05-05 16:49:09
阅读次数:
230
1 检查当前开发的端口#netstat -an假设发现了不必要的端口 6312 查找端口对应的服务#lsof -i :631631对应的服务是cupsd3 查看当前所有的服务#chkconfig –list发现cupsd的服务名是cups4 关闭服务#/sbin/service cups stop5...
分类:
其他好文 时间:
2015-05-04 13:40:20
阅读次数:
121
DR类型中,Director和RealServer的配置脚本示例:Director脚本:#!/bin/bash
#
#LVSscriptforVS/DR
#chkconfig:-9010
#
./etc/rc.d/init.d/functions
#
VIP=192.168.11.100
DIP=192.168.11.11
RIP1=192.168.11.12
RIP2=192.168.11.13
PORT=80
RSWEIGHT1=2
RSWEIGHT2=4
#
case"$1..
分类:
其他好文 时间:
2015-05-04 10:19:49
阅读次数:
176