How to Install TYPO3 on Debian Latest

In this tutorial, we will guide you through the installation process of TYPO3, an open-source content management system (CMS), on Debian latest version.

Prerequisites

Step 1: Installing the Required Packages

Before installing TYPO3, we need to install some required packages on our Debian system. Open the terminal and execute the following command:

sudo apt-get update

Next, install Apache web server, PHP, and some essential PHP extensions by running the following command:

sudo apt-get install apache2 php7.4 php7.4-mysql php7.4-curl php7.4-gd php7.4-intl php7.4-json php7.4-mbstring php7.4-xml php7.4-zip curl unzip -y

Once the installation is complete, verify that PHP version 7.4 or later has been installed by running the following command:

php -v

Step 2: Installing the TYPO3

In this step, we will download and install the TYPO3 CMS.

Downloading TYPO3

Go to the TYPO3 website and click on the 'Download' button to get the latest version of TYPO3 CMS.

Alternatively, you can use the following command to download the latest version of TYPO3 directly from the terminal:

curl -L -O https://get.typo3.org/ | tar -xzf -

Setting Up the Document Root

Create a directory for the TYPO3 installation inside the Apache document root directory:

sudo mkdir /var/www/html/typo3

Extract the TYPO3 package to the newly created directory:

sudo tar -xzf typo3_src-*.tar.gz -C /var/www/html/typo3 --strip-components=1

Set the ownership and permissions of the TYPO3 directory:

sudo chown -R www-data:www-data /var/www/html/typo3
sudo chmod -R 755 /var/www/html/typo3

Setting Up the Database

Create a new database and user for TYPO3 by running the following command:

sudo mysql -u root -p
CREATE DATABASE typo3db;
CREATE USER 'typo3user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON typo3db.* TO 'typo3user'@'localhost';
FLUSH PRIVILEGES;
exit;

Configuring TYPO3

Create a new configuration file for TYPO3:

sudo cp /var/www/html/typo3/typo3conf/LocalConfiguration.php{.example,}

Open the LocalConfiguration.php file with your preferred text editor and modify the database settings as follows:

'database' => [
        'host' => 'localhost',
        'dbname' => 'typo3db',
        'user' => 'typo3user',
        'password' => 'password',
        'tables_prefix' => '',
    ],

Save and close the file.

Finalizing the Installation

Open your web browser and navigate to http://your_server_ip/typo3/install.php, and the TYPO3 installation wizard will appear. Follow the on-screen instructions to complete the installation, providing the necessary information such as database details and administrator credentials.

Once the installation is complete, delete the install.php file for security reasons:

sudo rm /var/www/html/typo3/install.php

Step 3: Configuring the Virtual Host

To manage TYPO3, we need to configure a virtual host in either Apache or Nginx. Here, we will configure a virtual host for Apache.

Create a new virtual host configuration file for TYPO3:

sudo nano /etc/apache2/sites-available/typo3.conf

Add the following lines to the file:

<VirtualHost *:80>
    ServerName your_domain.com
    DocumentRoot /var/www/html/typo3/

    <Directory /var/www/html/typo3/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/typo3_error.log
    CustomLog ${APACHE_LOG_DIR}/typo3_access.log combined
</VirtualHost>

Replace your_domain.com with your own domain name. Save and close the file.

Activate the virtual host:

sudo a2ensite typo3.conf

Restart Apache web server for the changes to take effect:

sudo systemctl restart apache2

Now you can access TYPO3 by visiting your domain name in the web browser.

Conclusion

In this tutorial, we have shown you how to install TYPO3 CMS on Debian latest version. You can now start creating your website or application on TYPO3. If you encounter any problems during the installation process, please refer to the official TYPO3 documentation for more information.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!