Articles of centos7

DFOREGROUND与Apache混淆

所以我刚刚在一个新的CentOS 7服务器上安装了Apache,使用Yum。 我之前已经安装了很多次Apache,但从来没有见过这样的情况:当我运行ps aux时 ,它总是显示出来 / usr / sbin / httpd -DFOREGROUND 谷歌告诉我,这意味着这个过程将在前台运行,而不是从shell中分离出来,但是我没有真正意识到这一点 – 如果closures我的shell,Apache会死? 我只是想获得正常的Apache行为,并且像往常一样习惯于运行httpd,在后台徘徊,我需要禁用DFOREGROUND吗? (我不知道如何btw)

CentOS 7和Hyper-V

我正在尝试使用Hyper-V来安装CentOS 7,并且出现以下错误消息: tsc: Fast TSC calibration failed PCI: Fatal: No config space access function found i8042: No controller found [long waiting period…] dracut-initqueue[475]: Warning: Could not boot. dracut-initqueue[475]: Warning: /dev/disk/by-label/CentOS-7-livecd-x86_64 does not exist dracut-initqueue[475]: Warning /dev/mapper/live-rw does not exist Warning: /dev/disk/by-label/CentOS-7-livecd-x86_64 does not exist Warning: /dev/mapper/live-rw does not exist Generating "/run/initramfs/rdsosreport.txt" 我已经创build了第2代虚拟机并禁用了安全引导,因此至less会启动引导。

为什么systemctl在CentOS 7上启动redis-server?

我已经在新的CentOS 7盒子上安装了redis,但无法使用systemctl启动它。 它是这样安装的: rpm -i http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm yum install redis 试图像这样启动它似乎默默无闻(没有输出): systemctl start redis-server # also tried redis-server.service 以下是尝试连接时发生的情况: redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected> 但手动启动它的作品: [root@redis ~]# redis-server /etc/redis.conf [root@redis ~]# redis-cli 127.0.0.1:6379> 任何人都知道什么是错的,或者如何debugging呢? 更新: /var/log/redis/redis.log输出如下。 顺便说一句,这是一个512MB的RAM VPS。 [1972] 29 Jul 18:52:16.258 # You requested maxclients of 10000 requiring […]

我如何永久性地在Centos 7中设置ulimit -n 8192?

我想永久性地为Centos 7中的所有用户设置打开的文件限制,但是在Google上似乎存在大量冲突的信息。 谢谢!

在CentOS 7上安装更新版本的Git

我喜欢在我的CentOS 7服务器上启用Git“Push to Deploy”。 目前我只能通过yum获得Git 1.8.3.1。 我需要一个更新的版本。 我必须从源代码构build它还是有任何我可以使用的回购? 我alreay添加了EPEL和elrepo,但是yum仍然给我Git 1.8.3.1。

如何确保sshd是在关机期间要停止的最后一个服务?

我注意到,当我发出reboot命令时,我的SSH连接在CentOS 7上立即closures。这并不意味着服务器已经重新启动,因为我仍然可以ping通它。 看来systemd太早杀死sshd了。 有时服务会停滞不前,或者速度很慢,即使服务器启动,我也无法再login来validation是什么错误。 有没有办法告诉systemd在所有其他服务closures后才杀sshd?

每次启动时,Apache的PidFile目录都会被删除

每次服务器重新启动时,目录/ run / httpd都将被删除。 / run是一个tmpfs文件系统,因此安装在RAM中。 / run / httpd仅在安装过程中创build。 当我重启后启动httpd时,目录不会被重新创build。 服务器安装了CentOS 7和官方的Apache软件包(2.4.6-18)。 Apache安装并启动后,目录如下所示: # ls -alR /run/httpd/ /run/httpd/: total 8 drwx–x—. 3 root apache 120 Sep 30 08:39 . drwxr-xr-x. 28 root root 1020 Sep 30 08:37 .. -rw-r–r–. 1 root root 8 Sep 30 08:39 authdigest_shm.2953 drwx——. 2 apache apache 40 Jul 23 […]

我怎样才能远程观看terminal窗口?

我之前离开了办公室,并在Centos 7服务器上运行脚本。 现在我已经从家里接入,我想看看它到底在哪里。 这可能吗? 我可以从这里重新join同一个terminal窗口吗?

禁用SSL检查rpm

当试图运行任何rpm命令时,我得到跟随错误。 我不知道为什么我得到一个curl错误,但我已经尝试了许多不同的选项,都失败了。 运行CentOS7和代理 [root@CentOS7]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm curl: (60) Peer's certificate issuer has been marked as not trusted by the user. More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify […]

从vSphere 5.5 – 从模板部署Centos 7将忽略自定义设置

从模板中部署CentOS7时,我一直有麻烦,因为定制不起作用。 对于VM操作系统设置 – 我select了RHEL7作为操作系统而不是CentOS(以前在以前的工作中已经学习了Oracle Linux 6.5的课程)。 它应该工作正确吗? 不完全是。 症状 : 从CentOS7模板中部署新的虚拟机后,首次启动时服务器会出现正确的主机名,然后执行定制脚本,在虚拟机重启之后,它将重新获得原始的模板主机名,而/ etc / sysconfig / network- scripts / ifcfg-ether具有正确的设置,正确的nic(ifcfg-e *)的ifcfg设置尚未实现。 背景 : 我遵循了VMWare的CentOS安装说明: http : //partnerweb.vmware.com/GOSIG/CentOS_7.html 添加了几个软件包(包括vSphere自定义所需的networking工具)之后,我使用“templatize脚本”对模板进行了如下修改( http://lonesysadmin.net/2013/03/26/preparing -linux-template-vms /步骤): #!/bin/bash clean yum cache /usr/bin/yum clean all #remove udev hardware rules /bin/rm -f /etc/udev/rules.d/70* #remove nic mac addr and uuid from ifcfg scripts /bin/sed -i […]