小编rea*_*der的帖子

如何设置服务器的完全限定域名?

当我尝试重新启动apache发布/etc/init.d/apache2 restart时,我收到以下消息:

root@server:~# /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                                                             apache2: apr_sockaddr_info_get() failed for server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
 ... waiting apache2: apr_sockaddr_info_get() failed for server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                                                                                                                      [ OK ]
root@server:~# cat /etc/hostname
iSell
root@server:~# hostname
server
root@server:~# hostname -f
hostname: Name or service not known
root@server:~# cat /etc/hosts
127.0.0.1     localhost localhost.localdomain
108.1.*.*     eins
root@server:~# …
Run Code Online (Sandbox Code Playgroud)

apache configuration fqdn

7
推荐指数
1
解决办法
4万
查看次数

sed/awk + ​​regex删除第一个字段匹配的重复行(ip地址)

我需要一个解决方案来删除第一个字段是IPv4地址的重复行.例如,我在文件中有以下行:

192.168.0.1/text1/text2
192.168.0.18/text03/text7
192.168.0.15/sometext/sometext
192.168.0.1/text100/ntext
192.168.0.23/othertext/sometext
Run Code Online (Sandbox Code Playgroud)

因此,在上一个场景中它匹配的只是IP地址.我所知道的是IP地址的正则表达式是:

\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
Run Code Online (Sandbox Code Playgroud)

如果解决方案是一条线并且尽可能快,那将是很好的.

ip awk sed match

3
推荐指数
1
解决办法
2242
查看次数

标签 统计

apache ×1

awk ×1

configuration ×1

fqdn ×1

ip ×1

match ×1

sed ×1