Modify CentOS hostname

Modify CentOS hostname#

1. Open network file

[ root@yxy ~]# vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=yxy (the host name you want to modify)

2. Modify the system host table file

[ root@yxy ~]# vi /etc/hosts

127.0.0.1 localhostlocalhost.localdomain localhost4 localhost4.localdomain4

::1 localhostlocalhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1 yxy localhost.localdomain localhost4localhost4.localdomain4 (add this line)

3. Restart the system

[ root@yxy ~]# reboot

Broadcast message from root@yxy

( /dev/pts/0) at 0:20...

The system is going down for reboot NOW!

[ root@yxy ~]#

Set up password-free login#

Set up password-free login:

[ root@yxy ~]# ssh-keygen (press 3 enter)

[ root@yxy ~]# ssh-copy-id yxy (host name) 1032763126 (password)

If -bash: ssh-copy-id: command not found appears

Install with command first

[ root@yxy ~]# yum -y install openssh-clients

Use after installation

[ root@yxy ~]# ssh-copy-id yxy 1032763126

Test whether the password-free login is effective:

[ root@yxy ~]# ssh yxy

1. Introduction to Hadoop#

· Hadoop is an open source distributed system infrastructure developed by the Apache Foundation. It is developed using Java and is a software platform for processing large-scale data.

· Hadoop can scale from a single node to thousands of nodes. Users can develop distributed programs without understanding the underlying details of distributed. Make full use of the power of clusters for high-speed computing and storage.

**2.**Install JavaJDK

https://tomcat.apache.org/ can download tomcat.tar.gz

  1. Put jdk.gz under /root

  2. Unzip the installation package to /root/apps

tar -zxvfjdk-7u45-linux-x64.gz –c apps/

  1. cd apps

  2. cd jdk/bin

  3. . /java –version

  4. Modify the environment variable vi /etc/profile, add two lines at the end

  5. Reload environment variables #source/etc/profile

  6. Verify that the jdk is successfully configured: #java –version

Recommended Posts

Modify CentOS hostname
How to modify the hostname on CentOS 8
CentOS 8 (2)
CentOS 8 (1)
Centos system modify time zone
Centos7 modify Docker default storage location
CentOS7 modify the network card name
Modify CentOS server time to Beijing time
centos7 python3.7+vi
CentOS7 modify network card name and network repair
CentOS + Python3.6+
CentOS + Jenkins
1.5 Install Centos7
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos 7.5 python3.6
How to modify the hostname on Ubuntu 20.04
How to quickly modify root password under CentOS8
How to modify the CentOS server time to Beijing time
Use command to clear specific hostname in CentOS7
Modify the default encoding of mysql5.6 under CentOS7
Centos7 modify the system language to simplified Chinese