Installing Omada Controller 4 on linux

Since Omada 4 doesn’t contain java and mongodb with the installer package, you will need to install it manually first.

This is the guide for CentOS7

Java

 yum install java-1.8.0-openjdk -y

MongoDB

touch /etc/yum.repos.d/mongodb-org.repo

Paste the following into /etc/yum.repos.d/mongodb-org.repo

[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc

yum install mongodb-org
systemctl enable mongod
systemctl start mongod

Recovering ESXi root Login

  1. Boot the server up with a linux disc, such as CentOS 7 in recovery mode
  2. Once booted, mount 250MB partition. Usually /dev/sda5. mount /dev/sda5 /mnt
  3. cd to /mnt
  4. Copy state.tgz to /tmp cp state.tgz /tmp
  5. cd to /tmp, then extract state.tgz. cd /tmp; tar -zxvf state.tgz
  6. Extract local.tgz. tar -zxvf local.tgz
  7. Open the /tmp/etc/shadow file using your favorite text editor. nano /tmp/etc/shadow
  8. Under your root (or account with root), remove the shadow password. The resulting row may look like this. root::13358:0:99999:7:::
  9. Now repack all the files back in. cd /tmp; tar -zcvf local.tgz etc; tar -zcvf state.tgz local.tgz
  10. Copy the state.tgz back into /mnt. cp /tmp/state.tgz /mnt;
  11. Now reboot the server. Once ESXi is booted back online, you will be able to log into your root with a blank password.

Litespeed web server + Forbidden: PHP engine is disable

Recently upgraded from Apache (runing suPHP as a PHP handler) to Litespeed.

Everything worked as they should, as Litespeed is a direct drop-in replacement for apache.

However, there is one issue I ran into with Magento.

Bunch of Magento installs weren’t working, even brand new installs are broken. After doing some checking, it appears some important CSS and JS files were being blocked from loading. If you try to load a CSS or JS file in the /pub/static folder, it will fail and return the following message.

Forbidden: PHP engine is disable

After speaking with LiteSpeed support, it appears Magento the previous setup (Apache + suPHP) was working because it somehow ignore the

php_flag engine 0

flags set in the /pub/static/.htaccess file.

There are two ways to fix this.

  1. Comment out both of the flags in the /pub/static/.htaccess for your Magento install.
  2. Add the following code in your Litespeed configuration

<IfModule LiteSpeed>

CacheRoot /home/lscache/

php_admin_flag engine on

</IfModule>

If you are running cPanel, then you just have to goto WHM -> Apache Configuration -> Include Editor -> Pre Main Include -> All Versions