How to configure static IP address on CentOS
How to configure static IP address on CentOS
By default CentOS minimal install does not come with pre-configure network. In this small tutorial i will explain how to set static ip address on CentOS 6.5 minimal.
First, need to edit the set up for the ethernet. Let’s start with editing this file:
EDIT Device:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=DC:41:A9:52:4E:6D TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no NM_CONTROLLED=yes PEERDNS=yes IPADDR=192.168.1.10 NETMASK=255.255.255.0
Now, configure default getaway: EDIT Network:
# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=centos6 GATEWAY=192.168.1.1 Configure DNS Server
EDIT DNS: # vi /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4
Now restart the network interface: # /etc/init.d/networking restart Check eth0:
check configuration: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr DC:41:A9:52:4E:6D inet addr:192.168.1.10 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::799f:e441:a0f6:8562/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:63262 errors:0 dropped:0 overruns:0 frame:0 TX packets:32456 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:111111111 (233.0 MiB) TX bytes:11111111 (139.0 MiB)
Centos old version - centos 6.10 download
Centos old version - centos 6.10 download
Index of /6.10/isos/x86_64 (centos.org)
CentOS-6.10-x86_64-LiveDVD.iso
CentOS-6.10-x86_64-bin-DVD1.iso
Centos 7
Index of /linux/centos/7.9.2009/isos/x86_64/ (man.poznan.pl)
How to Unzip zip files in CentOS
Installing unzip on CentOS 7:
On CentOS 7, the unzip package may not be installed by default. But it is available in the official package repository of CentOS 7. So it is very easy to install.
First update the YUM package repository cache with the following command:
#sudo yum makecache
Now install unzip with the following command:
check whether unzip works, run the following command:
Listing the Contents of the Zip file using unzip Command:
You can list all the files and directories stored inside a Zip file with the following command:
$ unzip -l app.zip
Extracting a Zip File using unzip Command:
You can extract a Zip file using the unzip command very easily.
To extract a Zip file into the current directory where the zip file is, run the following command:
$ unzip app.zip
Unzip zip files in command line in CentOS
To unzip a zip folder, use the unzip command followed by the name of the zip file.
unzip file.zip
The unzip command in CentOS will unzip the zip file to the current working directory.
Unzip zip file to specific directory
With -d option we can specify the directory, which we want to extract files.
unzip -d /tmp file.zip
This time CentOS unzip command will extract the zip file to the /tmp directory.
Centos 8 install SSH service step by step
Centos 8 install SSH service step by step
Install the openssh package:
# dnf install openssh-server
Start the OpenSSH service by executing the following command:
# systemctl start sshd
Check the status of the sshd service.
# systemctl status sshd
Enable the SSH service to start after the reboot:
# systemctl enable sshd
Open the firewall rules to accept incoming traffic on SSH default port 22:
# firewall-cmd --zone=public --permanent --add-service=ssh
Connect to the SSH server with IP eg. 10.1.1.1 as the root user from a remote client machine:
$ ssh Этот адрес электронной почты защищён от спам-ботов. У вас должен быть включен JavaScript для просмотра..6





