Centos
Open specific Port in Centos
to Open a specific port in centos you need to use these commands
firewall-cmd --zone=public --add-port=10000/tcp --permanent
then reload the firewall
firewall-cmd --reload
Notice: Undefined offset: 2 in Encryptor.php
Error : Notice: Undefined offset: 2 in vendor\magento\framework \Encryption\Encryptor.php
Some time you will have the below error after you move Magento2 from server to another server with different PHP version or even with the same PHP version , now what is the first solution we can do
mostly this library will be missed
php-sodium
So we need to install it , below is some command we can do to install it on Centos
How To Create a Sudo User on CentOS 7/8
The sudo
command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on CentOS, without having to modify your server’s sudoers
file. If you want to configure sudo for an existing user, simply skip to step 3.
Completely restore centOS 7 as it was on first installation ( Factory Reset)
# Get all yum commands previously run
yum history list all
# Get the details of the command
yum history info [entry number]
# Undo each command top-down
yum history undo [entry number]
You have to be careful not to undo the initial system install!
Undo previous commands Linux
# Get all yum commands previously run
yum history list all
# Get the details of the command
yum history info [entry number]
# Undo each command top-down
yum history undo [entry number]
How to Install Apache on CentOS 7
Install Apache:
- First, clean-up yum:
sudo yum clean all
- As a matter of best practice we’ll update our packages:
sudo yum -y update
- Installing Apache is as simple as running just one command:
sudo yum -y install httpd
Allow Apache Through the Firewall
CentOS at Hyper-V does not connect to the internet
1. Make sure you uncheck Secure Boot in the firmware section
2. I had to force the network adapter to release and renew the IP Address to get it to pull an address from DHCP. Used the commands
sudo dhclient -r
then ran
sudo dhclient
to request an address. After I did that I was up and running and could ping anything in my network.