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.

Share on facebook
Share on twitter
Share on whatsapp
Share on telegram
Share on email

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

29 Responses

  1. A little panic after installing Tuxlite, because it can't SSH with direct root login. Maybe it got disabled by tuxlite.

    The solution is to log in first with the newly created user, then enter with the su command.

    But what if you haven't had the chance to create a new user, then you can't SSH root? : D

    1. If the VPS control panel uses SolusVM, you can try logging in via the "Serial Console". But if you don't have this feature, you will have to reinstall VPS: D

  2. Bro, how do you install the script yourself, for example, install a classified ad script,
    then what if we migrate from another server, of course we will import the database, how do you ask for enlightenment

    1. It's easy, bro, if you install a PHP-based script. Usually in every script, there is a readme file that contains how to install it. Just follow mas. But remember, make sure your server meets the requirements of the script.

      Migration to another server is also easy, bro, there are 2 components to move, namely site files (such as php scripts, images, etc.) & database files.
      To change files, if between VPSs, just use the wget, scp or rsync command. If on a shared server, you can download it manually from the old server first, then upload it to the new server.
      For databases, the easy way is to use the export & import command via PHPMyAdmin.

    1. Easy bro, the same process as the main domain. To do this, create a subdomain on the DNS server, point to the server IP, then run the VPS command "./domain.sh add new subdomain.mysite123.com"

  3. My vps often gets a 502 error. so have to reboot often. what is the solution, bro?

    1. Did you check the error_log, bro? Does the VPS install & manage by yourself? Apache / Nginx? Is there a proxy in front of Apache / Nginx? Can I have the web url? So we can check together.

  4. bro, for example we want to fill our vps with multiple domains (multiple domains), now we need to edit the options.conf file again or not? because in that file there is a FQDN hostname.domain.com

    1. no need, to add a domain, we just need to execute the command "./domain.sh add user subdomain.domain.com".
      For FQDN that is in options.conf, just fill it out, bro, it doesn't really matter.

    1. Doesn't appear if the site becomes an error when using www? Or is it forwarded to not using www?

        1. there could be 2 causes, first is a subdomain http://www.situsku.com dns has not been directed to the server (www.situsku.com & my site.com must be directed to the same server IP).
          Second, it could be a setting on a server that has not entered a domain http://www.situsku.com.
          What is the domain? let me check from my laptop

          1. This is the result of a good-travels.com & domain query http://www.good-travels.com

            pakdoz @ pakdoz: ~ $ dig good-travels.com

            ; <> DiG 9.8.4-rpz2 + rl005.12-P1 <> good-travels.com

            ;; global options: + cmd

            ;; Got answer:

            ;; - >> HEADER << - opcode: QUERY, status: NOERROR, id: 40143

            ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

            ;; QUESTION SECTION:

            ; good-travels.com. IN A

            ;; ANSWER SECTION:

            good-travels.com. 1800 IN A 128,199,243,140

            ;; Query time: 215 msec

            ;; SERVER: (

            ;; WHEN: Mon Apr 7 08:55:26 2014

            ;; MSG SIZE rcvd: 50
            pakdoz @ pakdoz: ~ $ dig http://www.good-travels.com

            ; <> DiG 9.8.4-rpz2 + rl005.12-P1 <> http://www.good-travels.com

            ;; global options: + cmd

            ;; Got answer:

            ;; - >> HEADER << - opcode: QUERY, status: NXDOMAIN, id: 26426

            ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

            ;; QUESTION SECTION:

            ; www.good-travels.com. IN A

            ;; AUTHORITY SECTION:

            good-travels.com. 1733 IN SOA NS1.DIGITALOCEAN.com. hostmaster.good-travels.com. 1396522409 3600 900 1209600 1800

            ;; Query time: 0 msec

            ;; SERVER: (

            ;; WHEN: Mon Apr 7 08:55:33 2014

            ;; MSG SIZE rcvd: 102

            It looks like you have the wrong IP setting for www on the Digital Ocean DNS server.

            I usually fill in the TTL for 1 day, or in seconds 86400 seconds.

            If you follow the server settings tutorial in this article, you don't need to use 2 times, just once, only the domain is entered, no need to use www.

          2. thanks bro, you can already ...
            Can I ask again, bro?
            for multiple domains
            I have used the command "/domain.sh add user subdomain.domain.com"
            but this emergence

            “Welcome to Nginx!

            If you see this page, the nginx web server is successfully installed and
            working. Further configuration is required.

            For online documentation and support please refer to

            Commercial support is available at

            Thank you for using nginx. "
            that's why bro. thank you very much

  5. normal, the settings are correct. That's Nginx's default index.html file. Just delete the index.html file in the subdomain folder.

  6. Bro ... for this tuxlite, how come the php command isn't global?
    so it's out like this #php -v

    -bash: php: command not found

    how can it be global? thanks

  7. bro, if for the Debian Wordpres web, what are the first steps, it's a headache, it's 2 days for the web not to finish,

    school children

    1. if for beginners, it's better not to install wordpress in debian. just try renting cheap hosting that has cpanel. Usually they have a one click install WordPress feature, the wordpress site is ready to use.

      1. because it's already done, bro, we'll just take the free one first, the problem is we're still learning to use Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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,