最近在具有以下驱动器的 PowerEdge R320 上安装了 RHEL7:
2 x 300GB sas 15k
2 x 1TB sas 7.2k
Run Code Online (Sandbox Code Playgroud)
在安装过程中设置 LVM 时,我特意留下了数百 GB 的可用空间,以备以后需要扩展时使用。
我现在发现我需要扩展安装过程中创建的卷之一。
问题是 pvs 仅显示我创建的内容,而不显示任何可用的可用空间。
[user@box ~] pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name rhel_os
PV Size 165.79 GiB / not usable 0
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 42443
Free PE 0
Allocated PE 42443
PV UUID sDdEfu-qagM-qq35-OGfF-HpPw-Bizd-LcXazt
--- Physical volume ---
PV Name /dev/sdb1
VG Name rhel_data
PV Size 139.71 GiB / …Run Code Online (Sandbox Code Playgroud) 我正在使用这些说明在 ubuntu 机器上安装 Kerberos5-1.12.1 。
每当我尝试做:
kinit user1
Run Code Online (Sandbox Code Playgroud)
我正面临一个错误:
kinit: Cannot contact any KDC for realm 'UBUNTU' while getting initial credentials
Run Code Online (Sandbox Code Playgroud)
下面是我的 krb5.conf 和 kdc.conf 文件:
[libdefaults]
default_realm = UBUNTU
# The following krb5.conf variables are only for MIT Kerberos.
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following encryption type specification will be used by MIT Kerberos
# if uncommented. In general, the defaults …Run Code Online (Sandbox Code Playgroud) 我使用以下方法创建了 Windows Server 2012 共享:
PS C:\Windows\system32> nfsshare testshare2=C:\testshare2 -o anon=yes anonuid=0 anongid=0 rw=uuu.uuu.uuu.uuu
testshare2 was shared successfully
Run Code Online (Sandbox Code Playgroud)
其中uuu.uuu.uuu.uuu是我的 Ubuntu 系统的 IP。
接下来,我从 Ubuntu 机器上安装了 Windows NFS 共享,如下所示:
sudo mount -t nfs xxx.xxx.xxx.xxx:/testshare2 /mnt/testshare2
Run Code Online (Sandbox Code Playgroud)
其中xxx.xxx.xxx.xxx是 Windows Server 2012 机器的 IP。
挂载时没有显示错误,但是当我ls挂载目录时,会出现以下内容:
ls: cannot open directory /mnt/testshare2/: Input/output error
我没有在 Ubuntu 的系统日志中显示任何错误。
编辑 1:尝试从 RHEL7 机器挂载 Server 2012 NFS 共享时,我收到相同的输入/输出错误。Mount 工作正常我只是不能 ls 目录或触摸文件。
编辑 2:在 Server 2012 中,NFS 日志显示成功挂载到 …
我需要在非默认 httpd 目录上设置 selinux 权限:/www/virtualhosts/site01等。
所以我发出:
[mybox]# semanage fcontext -a -t http_sys_content_t "/www(/.*)?"
Run Code Online (Sandbox Code Playgroud)
并得到:
ValueError: Type http_sys_content_t is invalid, must be a file or device type
Run Code Online (Sandbox Code Playgroud)
配置 selinux 以使用我的非默认 httpd 目录需要做什么?
我正在努力设置Trac使用wsgi,并且在使 mod_wsgi 工作时遇到了麻烦。我下载并安装了 mod_sgi。
[框]# apachectl configtest
httpd:/etc/httpd/conf/httpd.conf 的第 214 行语法错误:无法在文件 /etc/httpd/modules/mod_wsgi.so 中找到 API 模块结构“mod_wsgi”:/etc/httpd/modules/mod_wsgi .so:未定义符号:mod_wsgi
httpd.conf 的第 214 行:
LoadModule mod_wsgi modules/mod_wsgi.so
Run Code Online (Sandbox Code Playgroud)
这是在文件系统上找到的 mod_wsgi.so:
[box]# locate mod_wsgi.so
/usr/lib64/httpd/modules/mod_wsgi.so
Run Code Online (Sandbox Code Playgroud)
我可能会忽略什么?
我熟悉如何用 PHP 解决这个问题,但是我想更多地练习 bash 脚本。
任务是删除文件夹中的所有文件,该文件夹本身包含子文件夹(带有文件)。这些文件通常是 .pdf(或某些变体:PDF、Pdf、pDf 等),但有时可能会有其他文件类型,包括我目前未知的扩展名。
这是我到目前为止所拥有的。它与文件名相呼应,但如果我发出 rm $i,系统将返回在每个文件上找不到的文件。
for i in `ls -bRC1 /foo/temp_folders/* ` ; do echo $i ; rm $i ; done
Run Code Online (Sandbox Code Playgroud)
发出 rm $i 时如何强制使用绝对路径?
在修复DROWN 时,我需要更新多个 EL6 服务器上的 openssl 包。SSLv2 很久以前就关闭了,但需要更新这些二进制文件。
我发现 yum update 在其中两台机器上显示了更新的 openssl 二进制文件,但在第三台上没有。所有三台机器上的存储库都是相同的。
yum 是否有理由向一个框而不是另一个框提供更新(再次假设两台机器上的 repo 配置相同)?