How to install OpenLiteSpeed web server in centos ?
OpenLiteSpeed is a high-performance, lightweight web server software developed by LiteSpeed Technologies. It boasts low CPU and RAM usage and is straightforward to install on a CentOS server.
OpenLiteSpeed offers many useful features to effectively manage websites, including page caching for faster load times, a WebAdmin interface, and Apache-compatible rewrite rules. It also supports third-party modules through an application programming interface (API).
Requirements
- Operating System: CentOS 7 and 8
- CPU: Intel 80486 and up, PowerPC G4 and up
- Memory: 32MB minimum (1GB or more recommended for optimal performance)
Installation Steps
The installation process takes about 15-25 minutes. Run the following command to install OpenLiteSpeed and additional components:
bashCopy codebash <(curl -k https://raw.githubusercontent.com/openlitepanel/olpinstall/master/install.sh)
Enter or paste your product license key when prompted.
What This Script Installs
- OpenLiteSpeed web server (latest stable version)
- ProFTPD (latest stable version)
- MariaDB (latest stable version)
- PHP versions 7.2, 7.3, 7.4 (with ionCube, SuExec, and PHP version switcher)
- phpMyAdmin 4.9.5 (latest stable version)
The script also includes simple commands to manage your web server:
- Start, stop, restart, or reload OpenLiteSpeed
- Create or delete virtual hosts
- Create MySQL databases
- Install Let’s Encrypt certificates (auto-renewal)
- Daily file backups of the web directory
- Daily MySQL backups
- Define backup retention policies
- Upgrade OpenLiteSpeed version
- Upload backups to Google Drive (coming soon)
- Access OpenLiteSpeed via a command-line interface
Accessing OpenLiteSpeed and phpMyAdmin
- OpenLiteSpeed WebAdmin:
https://yourhostorip:7080- Create a username and password with:bashCopy code
/usr/local/lsws/admin/misc/admpass.sh
- Create a username and password with:bashCopy code
- phpMyAdmin:
https://yourhostorip:8090- MariaDB root password is auto-generated and stored in
/root/.MariaDB
- MariaDB root password is auto-generated and stored in
Managing Your Web Server
- Start/Stop Web Server:
lsws start(uselsws helpfor more commands) - Create Virtual Hosts:
/scripts/lscreate(enter domain name, FTP username, and FTP password) - Install Let’s Encrypt Certificate:
/scripts/certbot(enter domain) - Create Databases:
/scripts/createdb - List Databases:
/scripts/listdb - Check Server Health:
/scripts/olphealth
For more features and detailed commands, refer to the official documentation.
Share this content: