我想知道创build一个好的脚本来启动/停止/重启一些服务是一个很好的实践。 我会尽量让自己更清楚,好吗? 现在,我做这样的事情:假设我想创build一个脚本来start/stop/restart一个服务,所以我创build一个文件夹/company/service name/然后把start.sh和stop.sh ,这是这样的: start.sh #!/bin/bash #VARIABLES SERVICE_NAME="<service name>" USERDEPLOYER="<service name>_deployer" FOLDER=/company/<service name>/ KEYWORD="<keyword>" # #CHECKING SYSTEM STATUS PROC=`ps -ef | grep $SERVICE_NAME | grep $KEYWORD | grep -v grep | awk -F" " '{ print $2 }'`; if [ $PROC ]; then echo "$SERVICE_NAME is running!" echo "Stop then first!" exit fi ### […]
SendMail | CentOS的 为了debugging/故障排除的目的,我想检查一下sendmail发送到本地milter的原始信息(还有milter返回的数据)。 那可能吗? 如果我将confLOG_LEVEL改为最大值,我能看到这个吗?
如果我运行netstat -tnep我会看到大约二十左右的regulra连接,然后是数百和数百个本地环回连接到端口7080.我认为这是与Plesk有关,但是谁能告诉我这是否有问题,以及如何修理它。 Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name … snip … tcp 0 0 ::ffff:127.0.0.1:7080 ::ffff:127.0.0.1:39875 TIME_WAIT 0 0 – tcp 0 0 ::ffff:127.0.0.1:7080 ::ffff:127.0.0.1:40225 TIME_WAIT 0 0 – tcp 0 0 ::ffff:127.0.0.1:7080 ::ffff:127.0.0.1:39980 TIME_WAIT 0 0 – tcp 0 0 ::ffff:127.0.0.1:7080 ::ffff:127.0.0.1:39061 TIME_WAIT […]
我想知道是甚至可以使用mysql用户作为一个login通过FTP检索一些数据? 如: su mysql(如果是这样的话,密码是什么,默认密码是什么,或者有什么地方可以改变它?)谢谢。
我刚刚得到一个新的VPS和一切工作正常,除了一个小的细节:DNS。 坦率地说,我对BIND(或一般的DNS)的经验非常有限(不存在),经过相当长的一段时间,我现在失去了我的生活意志。 我的域名是bartplatak.net和VPS居民212.1.209.239 。 我已经指出我的域名的DNSlogging到我的DNS服务器(似乎工作正常),configuration和启动我的named 。 但是,DNS查找表示连接被“拒绝”。 DNS爬虫只输出: Querying a.root-servers.net (198.41.0.4)… delegated Querying k.gtld-servers.net (192.52.178.30)… delegated Querying ns2.bartplatak.net (212.1.209.239)… refused Querying ns1.bartplatak.net (212.1.209.239)… refused Unable to find: bartplatak.net 我的/etc/named.conf : options { //listen-on port 53 { 127.0.0.1; }; //listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { localhost; […]
我有一个安装了plesk 11.0.9的中等dv 4。 当我运行yum install httpd-devel时,我得到以下内容 httpd-devel-2.2.3-76.el5.centos.x86_64 from updates has depsolving problems –> Missing Dependency: httpd = 2.2.3-76.el5.centos is needed by package httpd-devel-2.2.3-76.el5.centos.x86_64 (updates) Error: Missing Dependency: httpd = 2.2.3-76.el5.centos is needed by package httpd-devel-2.2.3-76.el5.centos.x86_64 (updates) 这是安装的httpd版本: * atomic: www6.atomicorp.com * base: mirror.symnds.com * extras: centos.aol.com * updates: mirror.lug.udel.edu Installed Packages Name : httpd Arch […]
我正在尝试从centos linux到rdesktop到Windows机器,但我只是得到下面的消息 $] rdesktop xxx.xxx.xxx.xxx:port Autoselected keyboard map en-us 并没有用户界面。 我究竟做错了什么?
我试图复制一个生产环境,所以我运行PHP 5.3.15是非常重要的。 问题是我的开发服务器正在运行Centos 6,而软件包pipe理器只会安装PHP 5.3.3。 我读过,Centos 6永远与PHP 5.3.3绑定,不鼓励升级。 这是真的? 我试图直接安装PHP 5.3.15 rpm,但由于依赖性问题而失败: error: Failed dependencies: libcrypto.so.6()(64bit) is needed by php-common-5.3.15-1.w5.x86_64 libcurl.so.3()(64bit) is needed by php-common-5.3.15-1.w5.x86_64 libssl.so.6()(64bit) is needed by php-common-5.3.15-1.w5.x86_64 我应该为我的开发环境考虑一个不同的Linux发行版吗? 我对所有这些都是新鲜的,所以非常感谢能够为我解决这个问题的人。
我的问题是关于多播和iptables 。 我希望允许来自本地VLAN 192.168.1.0/24以及CentOS机器上的0.0.0.0 ICMP和IGMP组播,所以我在入站链上添加了以下规则: #ACCEPT – 来自当前VLAN的组播224.0.0.1以及0.0.0.0 # – ICMP iptables -A IP-INPUT -s 192.168.1.0/24 -d 224.0.0.1 -m pkttype -pkt-type multicast -protocol icmp -j ACCEPT iptables -A IP-INPUT -s 0.0.0.0 -d 224.0.0.1 -m pkttype -pkt-type multicast -protocol icmp -j ACCEPT # – IGMP iptables -A IP-INPUT -s 192.168.1.0/24 -d 224.0.0.1 -m pkttype -pkt-type multicast […]
我无法前往工作。 这是我的postconf输出: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 default_verp_delimiters = += disable_verp_bounces = no home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mailq_path = /usr/bin/mailq.postfix […]