[基础]Linux的dns主机名等设置
dns
/etc/resolv.conf
主机名
1)#hostname tt.com
2)/etc/sysconfig/network中的hostname
3)修改/etc/hosts文件
=>sendmail->/etc/mail/local-host-names
gateway
etc/sysconfig/network
ip
/etc/sysconfig/network-scripts/ifcfg-eth0
1. 变更当前主机名
两种方法: echo new-hostname > /proc/sys/kernel/hostname
或者: hostname new-hostname
2. 修改配置文件,使得下次重启的时候,使用新的主机名
编辑文件: /etc/sysconfig/network
修改: HOSTNAME=new-hostname.domainname
3. 配置本机的域名解析文件,使得本机的应用程序能够解析新的主机名
编辑文件: /etc/hosts
修改: xxx.xxx.xxx.xxx new-hostname.domainname new-hostname
(这里的xxx代表本机的网络地址,也可以是环回地址127.0.0.1)
相关文档:
本文介绍在GNU/Linux环境下一个C程序由源代码到程序,到加载运行,最后终止的过程。同时以此过程为载体,介绍GNU/Linux平台下软件开发工具的使用。
本文以我们最常见的hello, world!为例:
#include <stdio.h>
main ()
{
printf(“hello, world!\n” ......
本文介绍在GNU/Linux环境下一个C程序由源代码到程序,到加载运行,最后终止的过程。同时以此过程为载体,介绍GNU/Linux平台下软件开发工具的使用。
本文以我们最常见的hello, world!为例:
#include <stdio.h>
main ()
{
printf(“hello, world!\n” ......
1, 首先准备Linux环境, RedHat5.3的系统, jdk是1.6版本的,MyEclipse是7.0的, 连接时可以使用ssh或是crt进行windows与Linux的交流。
2,为了上传方便, 在时使用crt,他可以使上传,下载的速度更快。
3, 在Linux下创建比如说是jdk目录, 使用rz上传工具进行上传, 上传以后,赋予文件夹得权限,并且 ......
=================文件操作==================
不使用find直接使用通配符对文件操作:
cp ./*/*attch* /testout_attch/
文件内容显示
head/tail:
## (1) displays the first 6 lines of a file
head -6 readme.txt
## (2) displays the last 25 lines of a file
tail -25 mail.txt
# ......