Install OpenLiteSpeed on CentOS

OpenLiteSpeed Benchmark

To install OpenLiteSpeed web server on CentOS, install repository for your CentOS version For CentOS 6 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm For CentOS 7 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm For CentOS 8 rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm To install OpenLiteSpeed, run yum install openlitespeed Before you can install PHP, you need epel repository enabled with yum install epel-release Install PHP with … Read more

Set hostname in CentOS 7

Hostname is a sub domain. To set hosting, edit file vi /etc/hosts Add SERVER_IP_HERE HOSTNAME.yourdomain.com HOSTNAME Example 72.21.51.194 server32.serverok.in server32 Now run echo HOSTNAME.yourdomain.com > /etc/hostname Example echo server32.serverok.in > /etc/hostname Run /bin/hostname -F /etc/hostname Edit file vi /etc/sysconfig/network Edit or add HOSTNAME entry NETWORKING=yes HOSTNAME=HOSTNAME.yourdomain.com Reboot the server with reboot You can verify hostname … 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 yum install -y epel-release Install yum-utils yum install -y yum-utils Install remi repo rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm Select PHP version you need yum-config-manager –enable remi-php73 … Read more

CentOS 7 Grub 2

CentOS

To regenerate grub config on CentOS 7, run grub2-mkconfig -o /boot/grub2/grub.cfg If you use UEFI, run grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg OVH CentOS 7 server grub rescue prompt Back to grub

Install Nginx on CentOS 8

Nginx Web Server

To install Nginx web server on CentOS 8, create repo vi /etc/yum.repos.d/nginx.repo Add [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 Install nginx with dnf or yum dnf install nginx Open HTTP and HTTPS ports on firewall firewall-cmd –zone=public –permanent –add-service=http firewall-cmd –zone=public –permanent –add-service=https firewall-cmd –zone=public –permanent –add-service=ssh firewall-cmd –reload

Install PHP 7.4 on CentOS 7

To install PHP 7.4 on CentOS 7, first install remi repository. yum install epel-release -y rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-7.rpm Set PHP 7.4 as default PHP yum install yum-utils yum-config-manager –enable remi-php74 Install PHP with yum install -y php php-bcmath php-cli php-common php-devel php-gd \ php-imap php-intl php-json php-ldap php-lz4 php-mbstring php-mysqlnd \ php-soap php-intl php-opcache php-xml … 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 cd ; wget http://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf install remi-release-8.rpm if you have older php version and don’t want to keep it, uninstall it with dnf remove php-gd php-xml … Read more

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

First disable SELinux by editing file vi /etc/selinux/config Find SELINUX=enforcing Replace with SELINUX=disabled Now restart the server. reboot 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.. dnf -y install wget curl telnet bind-utils net-tools git Configure … Read more

Creating CentOS 8 Virtual Machine with Vagrant

CentOS 8 vagrant

Create a directory for Vagrant project mkdir -p ~/vagrant/centos8 cd ~/vagrant/centos8 vagrant init generic/centos8 This will create a file with name “Vagrantfile” on current folder. To start the CentOS 8 VM, run vagrant up To SSH into CentOS 8 virtual machine vagrant ssh To stop a VM, run vagrant halt See Vagrant

CentOS 8 disable Activate the web console message

When login to CentOS 8 using SSH, you get a message asking you to enable web console. Activate the web console with: systemctl enable –now cockpit.socket You can uninstall cockpit with command yum remove cockpit* If you just need to disable the message, delete the file rm -f /etc/motd.d/cockpit This is actually a symlink to … Read more