Set hostname in CentOS 7

Hostname is a sub domain. To set hosting, edit file

Add

Example

Now run

Example

Run

Edit file

Edit or add HOSTNAME entry

Reboot the server with

You can verify hostname with command

Related Posts Change Server Hostname in VestaCP Set Permanant hostname on AWS […]

Read More…

CentOS 7 VestaCP Upgrade PHP to 7.x

On CentOS 7 VestaCP install PHP 5.6 by default. This is very old version of PHP. To upgrade PHP to latest version 7.x, you can install remi repo. Install EPEL repo

Install yum-utils

Install remi repo

Select PHP version you need

Here i selected PHP 7.3. You can select differnt PHP […]

Read More…

Install Nginx on CentOS 8

Nginx Web Server

To install Nginx web server on CentOS 8, create repo

Add

Install nginx with dnf or yum

Open HTTP and HTTPS ports on firewall

[…]

Read More…

Install PHP 7.4 on CentOS 7

To install PHP 7.4 on CentOS 7, first install remi repository.

Set PHP 7.4 as default PHP

Install PHP with

After installing check PHP version with php -v, you will see At the time of installation, it is PHP version 7.4.0RC3, it will change as new 7.4 release become available. Related Posts […]

Read More…

Install PHP 7.3 in CentOS 8

CentOS 8 comes with PHP 7.2. To install PHP 7.3, you need to enable remi repo. You can download remi-release rpm file from http://rpms.remirepo.net Download and install remi-release rpm

if you have older php version and don’t want to keep it, uninstall it with

Install PHP 7.3

Set it as default PHP […]

Read More…

Install Apache, MySQL, PHP (LAMP) Stack on CentOS 8

First disable SELinux by editing file

Find

Replace with

Now restart the server.

Verify SELinux is disabled by running “sestatus” command. It should show disabled. Install basic tools Lets start by installing some basic tools like whois, curl, git etc..

Configure Firewall On CentOS 8 by default only port 22 […]

Read More…

Creating CentOS 8 Virtual Machine with Vagrant

CentOS 8 vagrant

Create a directory for Vagrant project

This will create a file with name “Vagrantfile” on current folder. To start the CentOS 8 VM, run

To SSH into CentOS 8 virtual machine

To stop a VM, run

See Vagrant […]

Read More…

CentOS 8 disable Activate the web console message

When login to CentOS 8 using SSH, you get message asking you to enable web console.

To disable this message, delete file

This is actually a symlink to file /run/cockpit/motd See CentOS 8 […]

Read More…