Articles of centos

挂载不影响fstab – Centos 6

我在fstab中使用这一行来绑定/ sftp / feeds / incoming到/ var / www / online / public_html / feeds /sftp/feeds/incoming /var/www/online/public_html/feeds none bind 0 0 但是没有影响。 如果我使用: mount –bind /var/www/online/public_html/feeds /sftp/feeds/incoming 在正常工作的命令行上,当然在重启时会丢失。

NameVirtualHost地址不受支持,处理未定义的结果

Apache细节 服务器版本:Apache / 2.2.15(Unix)服务器内置:Aug 28 2015 22:18:57 漆 varnishd(varnish-3.0.7 revision f544cd8)Copyright(c)2006 Verdens Gang AS Copyright(c)2006-2014 Varnish Software AS OS CentOS版本6.7(最终版) Linux内核 2.6.32-042stab113.11#1 SMP Fri Dec 18 17:32:04 MSK 2015 x86_64 x86_64 x86_64 GNU / Linux 注意:当试图开始得到这个错误,并善意的build议如何解决这些错误,并启动Apache服务器。 我也安装和configurationvarnishcaching代理服务器。 Failed to start apache : Starting httpd: [Sat Mar 12 16:36:02 2016] [error] VirtualHost _default_:443 — mixing * […]

邮件从sendmail失败 – CentOS 7

我简单的PHP脚本发送邮件是 <?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $from = "[email protected]"; $to = "[email protected]"; $subject = "PHP Mail Test script"; $message = "This is a test to check the PHP Mail functionality"; $headers = "From:" . $from; mail($to,$subject,$message, $headers); echo "Test email sent"; ?> 当我在任何其他服务器上运行这个脚本时,它工作正常,但是当我在新的CentOS 7机器上执行时,我总是在/ var / log / maillog中出错 Mar 15 19:08:38 […]

子域错误:无法find服务器的DNS地址

我试图添加子域到我的域名。 我刚刚在我干净的centos 7上安装了httpd。起初,我使用以下内容创build了文件/etc/httpd/conf.d/htmltest.mydomain.com.conf: <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin [email protected] ServerName htmltest.mydomain.com DirectoryIndex index.html index.php DocumentRoot /www/sites/htmltest.mydomain.com/htdocs # Log file locations LogLevel warn ErrorLog /www/sites/htmltest.mydomain.com/log/error.log CustomLog /www/sites/htmltest.mydomain.com/log/access.log combined </VirtualHost> <Directory "/www/sites/htmltest.mydomain.com/htdocs"> Options Indexes FollowSymlinks AllowOverride None Require all granted </Directory> 另外/www/sites/htmltest.mydomain.com/htdocs文件夹是用index.html文件创build的。 有了这个configuration,我尝试访问htmltest.mydomain.com在浏览器中给出'服务器DNS地址无法find'的错误。 但是,mydomain.com会打开htmltest子域index.html。 在我的托pipeCP DNS设置有mydomain.com与htmltest'A'logging指向服务器IP,以及WWWlogging。 我怎样才能解决这个问题? UPD:我已经改变域使用vultr nameservers,它现在正常工作。

如何find在服务器上运行的networking服务器,并find为什么一些networking应用程序响应,有些不?

我没有configuration这个服务器,所以我不知道什么是正在运行或在哪里运行。 服务器是运行Centos的某种机架式服务器(运行在我们数据中心的1U或2U Dell)。 所以我们有在我们的服务器上运行的webapps。 一个是端口8080上的Jenkins。另一个是在服务器的端口1234上显示日志文件的目录列表。 我们以前可以通过端口1234访问日志,但是由于某种原因它今天停止工作。 我不知道什么Web服务器正在服务日志,但盲目执行: find / -name "tomcat*" 没有任何回报。 我也执行了 netstat -a | grep 1234 netstat -a | grep 8080 但它不显示端口,这是没有意义的B / Cjenkins正在运行,所以至less端口8080应该由netstat返回(至less我认为8080应该返回)。 jenkins看起来是在自己运行,所以它似乎没有使用tomcat java -jar /path/to/jenkins.war. 如果有人可以告诉我如何find运行在端口1234上的networking服务器,我会很感激。

Postfix发送垃圾邮件到本地电子邮件地址没有身份validation

运行在Centos 6.4上。 过去两周,我一直在接收来自位于服务器上的其他电子邮件帐户的电子邮件。 [email protected]发送到[email protected][email protected]发送到[email protected]。 他们都包含一个zip文件。 电子邮件最近开始从[email protected]进来(网站甚至没有子域)。 我相当密切地监视服务器,并没有看到任何违反FTP,SSH或PHP代码。 这些电子邮件似乎来自土耳其和其他中东地区。 没有垃圾邮件被送出服务器,他们只被发送和本地交付。 我以为我已经设置为validation所有用户,但它不authentication,仍然发送。 有人可以阐明如何做或改变? 这里是postfix / main.cf文件的一些内容。 mynetworks = 127.0.0.0/32 alias_maps = hash:/etc/aliases smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_tls_security_level = may smtpd_tls_key_file = /etc/pki/tls/private/site.com.key smtpd_tls_cert_file= /etc/pki/tls/certs/mycert.crt smtpd_tls_CAfile= /etc/pki/tls/certs/gd_bundle-g2-g1.crt smtpd_tls_loglevel = 1 smtpd_tls_session_cache_timeout = 3600s […]

如何为phpbrew创buildsystemd单元文件?

我想为systemd创build一个单元文件,它将在服务器重启后自动启动PHP FPM。 这里是文件内容: [Unit] Description=PHP 5.5.32 FPM [Service] User=deploy Group=deploy WorkingDirectory=/home/deploy ExecStartPre=/usr/local/bin/phpbrew use 5.5.32 ExecStart=/usr/local/bin/phpbrew fpm start [Install] WantedBy=multi-user.target 但是,当我试图启动服务通过runnint sudo systemctl start php55-fpm.service莫名其妙地不起作用。 这里是sudo systemctl status php55-fpm.service的输出 ● php55-fpm.service – PHP 5.5.32 FPM Loaded: loaded (/usr/lib/systemd/system/php55-fpm.service; enabled; vendor preset: disabled) Active: inactive (dead) since Wed 2016-03-30 05:13:52 CDT; 3min 50s ago Process: 20444 ExecStart=/usr/local/bin/phpbrew […]

CentOS:如何在服务器启动后创build默认路由

我在Proxmox KVM上使用CentOS 6.7。 现在我想让我的networking连接工作。 这是我的configuration: 现在我必须执行 ip route add 89.xxx.xxx.1 dev eth0 和 ip route add default via 89.xxx.xxx.1 获得连接。 那么,我想自动做到这一点,所以我创build了一个这样的脚本: 这是我的ifconfig输出: 这是我的路由表:

在CentOS 7中升级openssl

首先,我尝试从openssl.org下载源码压缩包openssl-1.0.1s.tar.gz并执行./config && make install ,尽pipe它似乎已经成功完成了这个过程,但我不知道编译的地方代码去,或者如果它被安装在所有,因为我仍然有一个非常旧版本的openssl链接在/usr/bin/ ,似乎没有工作。 [root@E345 openssl]# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 然后,我尝试下载rpm软件包并用rpm -Uvh安装,似乎安装正确,但是有大量的警告,和上面一样的结果, [root@E345 openssl]# rpm -Uvh openssl-1.0.1e-42.el7.9.src.rpm Updating / installing… 1:openssl-1:1.0.1e-42.el7.9 ################################# [100%] warning: user mockbuild does not exist – using root warning: group mockbuild does not exist – using root warning: user mockbuild does not exist – using root […]

不能ping任何主机名

我最近从一家公司获得了一个服务器来进行新的邮件服务configuration,但现在我有一个惊人的问题! “ping google.com”不工作,并返回“ping:未知的主机google.com”,但平8.8.8.8工作良好。 我已经检查了resolv.conf,iptables! 但没有任何改变。 我的内容是这样的: #cat resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 #iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination nslookup google.com ;; connection timed out; trying next origin ;; connection timed out; no […]