Easy Ways to Install Linux, Apache, MySQL & PHP (LAMP) + WordPress Using Tuxlite on Debian / Ubuntu

Must read:

Ferdian Alfianto

Ferdian Alfianto

Ferdian Alfianto is an Internet enthusiast, Mac Lover; likes using Wordpress, experimenting with Linux (especially Debian and Ubuntu), tinkering with pfSense routers, happy experimenting with LEMP (Linux, Nginx, MariaDB, PHP) and Redis. You can contact me here.

One of the things that website owners are afraid of when deciding upgrade hosting from share to a VPS / Dedicated Server is a shadow of the complexity of installing web server components.
Luckily with Tuxlite, that's not the case anymore. By using Tuxlite, the installation process for Linux, Apache, MySQL & PHP is very easy. Even for beginners!

What is Tuxlite?

Tuxlite is a shell script which contains the command line installation of Linux, Apache, MySQL & PHP (LAMP) or Linux, Nginx, MySQL & PHP (LEMP). Tuxlite will install and configure automatically so that your VPS / Dedicated Server can be used as soon as possible. With Tuxlite, you only need a few minutes to build a web server that is ready to use and secure!

Tuxlite is perfect for those who want to host their site to a VPS / Dedicated Server without the need for expensive & consuming a lot of control panels resource server.

Tuxlite will install the following components:

  1. Apache2 with mpm_worker or Nginx
  2. MySQL
  3. PHP-FPM or PHP-CGI (with suexec) + some commonly used PHP modules.
  4. Postfix e-mail server (only set to send outgoing e-mail)
  5. Varnish cache (optional)

Why use Tuxlite?

  1. Tuxlite configures Apache with mpm_worker and PHP with fastcgi. This provides higher performance, but lower memory consumption compared to a LAMP installation using mod_php.
  2. The original 100% installed application from the official repo! Security guarantees and application updates.
  3. Does not require large resources, fresh install only requires 50-60 MB of memory.
  4. Automatic virtual host configuration, with log rotation, traffic statistics with Awstats and PHPmyAdmin to manage database.
  5. Install Varnish to speed up server performance!
  6. Free and open source (open source). We are free to change the Tuxlite script according to our wishes & needs.

Note: In this tutorial we will install LAMP, for the LEMP tutorial I will write in a separate tutorial.

Before starting the installation, you must have at least a VPS with 80 MB of RAM or more. 256 MB or more is recommended.

Installation Process

  1. Create a directory to store Tuxlite scripts. For example / tuxlite /, then run the following command:
    mkdir / tuxlite && cd / tuxlite
  2. Download the tuxlite script
    wget https://tuxlite.com/scripts/tuxlite.tar.gz
  3. Extract the file with the command:
    tar zxvf tuxlite.tar.gz
  4. Edit the options.sh file to enter the server IP address, MySQL username, etc.
    nano options.conf
  5. Change parameters according to your server information:
    • HOSTNAME, replace it with the server hostname, for example HOSTNAME = node1
    • HOSTNAME_FQDN, replace it with the full name of the domain hostname, for example HOSTNAME_FQDN = node1.serversaya.com
    • SERVER_IP, enter the IP address of your server, for example SERVER_IP =
    • SSHD_PORT, replace the value 22 with another number if you want to change the SSH port, or just skip it if you want to stick with port 22.
    • APT_REGION, change the 2-letter country code closest to our server. For example, if our server is in Singapore, we can change it to APT_REGION = sg.
    • WEBSERVER, because we are going to install Apache, then enter option 2, until it becomes WEBSERVER = 2
    • MYSQL_ROOT_PASSWORD, enter the password you want to use for MySQL, you are free to choose, but it must be remembered because we will need it during the MySQL installation process and to manage our database later, for example parameters MYSQL_ROOT_PASSWORD = kad837gas7g
    • PMA_LINK, is the link to the location of the PHPmyAdmin installation file. Look at the PHPmyAdmin site (https: // https: //www.phpmyadmin.net), if there is a newer version, enter the link here.
    • DB_GUI, tuxlite provides a selection of tools to manage our database server, whether to use PHPmyAdmin or Adminer. If you want to use PHPmyAdmin enter number 1.
    • VARNISH_CACHE_SIZE, enter the amount of cache you want to use for varnish.
    • AWSTATS_ENABLE, if you want to install and activate the Awstats traffic monitoring tool, enter a variable yes, otherwise enter no.
    • MISC_PACKAGES, if you want to install other packages than those needed by tuxlite, please enter them here.
    • You can leave the variables as default.
  6. Then we chmod the script to make it run
    chmod 700 * .sh && chmod 700 options.conf
  7. Then we first update the APT database and install aptitude:
    apt-get update && apt-get -y install aptitude
  8. If you want to explore the tuxlite script function, run this command:
  9. Then we are ready to install Linux, Apache, MySQL and PHP by running the installation script:
  10. Create a new user other than root
    new user adduser

    replace userbaru with the name as you wish. Then enter the password for this user.

  11. Add the domain name you want to host on your server, for example, if you want to host my site123.com domain, then run the command:
    ./domain.sh add new username to my site123.com

    Then automatically tuxlite will create a directory for my site123.com at / home / userbaru / domains / my site123. You can upload your site files at / home / userbaru / domains / my site123 / public_html

  12. Next, we will install PHPMyAdmin or Adminer so that we can create a database, import and also manage our site database. Run the command:
    ./setup.sh dbgui
  13. Then you can activate or deactivate the use of PHPMyAdmin / Adminer with the command:
    ./domain.sh dbgui on

    to disable use the command:

    ./domain.sh dbgui off

    NOTE: If you have finished using PHPMyAdmin / Adminer, you should disable it. And reactivate if needed. This is for the security of our servers, minimizing brute force attack.

  14. Then if you want to activate the Awstats tool, run the command:
    ./domain.sh stats on

    And run this command to turn off Awstats:

    ./domain.sh stats off
  15. If you want to install varnish, run this command:
    ./varnish.sh install

    Run this command to activate varnish:

    ./varnish.sh on

    And to turn it off:

    ./varnish.sh off

    NOTE: Don't install varnish if you don't know how to configure varnish ACLs! This feature is optional only, it is recommended for those who have skill advanced level.

  16. If you want to install WordPress on your domain, tuxlite provides easy installation. With just one command line, your wordpress site will automatically be installed:

    Then the question will appear which domain you want to install with WordPress, enter the number in front of the domain you want to use. Then enter the database name, it's up to you the variables. Then the script will ask for the location of the installation folder, if your wordpress site address is later www.mysite123.com, just hit enter. But if your wordpress site address www.mysite123.com/blog, then enter "blogAt the question and hit enter.

    For wordpress database, tuxlite will create it automatically. After everything has been set by tuxlite, now please access your site to complete the wordpress installation process.

Easy right? To add another domain, you only need to run the command ./domain.sh add user namedomain.com and to install wordpress, just execute the command./wordpress.sh.

Next, for server security, you need to install iptables, install fail2ban, and install (D) DoS Deflate. Follow the tutorial Tips for Securing a Linux Server or VPS. And don't forget to Backup Files & Databases from Linux Server to Amazon S3 Using S3cmd.


Latest articles:

MongoDB logo

Easy to Install MongoDB on Ubuntu 20.04

This tutorial explains how to install and configure MongoDB Community Edition on Ubuntu 20.04. MongoDB is a free, open-source document database. Belongs to the so-called database family

Related article:

MongoDB logo

Easy to Install MongoDB on Ubuntu 20.04

This tutorial explains how to install and configure MongoDB Community Edition on Ubuntu 20.04. MongoDB is a free, open-source document database. Belongs to the so-called database family

rocket nginx

Rocket-Nginx + WP-Rocket: What are the Benefits?

What is Rocket-Nginx? Rocket-Nginx is a configuration add-on to Nginx for the WordPress cache plugin, WP-Rocket. The developer claims that by injecting the Rocket-Nginx configuration, the


The World's Cheapest Domain Hunt!

The cheapest domain, who doesn't love getting it? Yes, even the author of this blog loves to hunt for cheap domains :). Frequently questions are asked to the author,