MySQL server<\/a>, execute the following command:<\/p>\n\n\n\n# dnf install mysql-server mysql<\/pre>\n\n\n\nStart and enable the mysqld.service with the following commands:<\/p>\n\n\n\n
# systemctl start mysqld && systemctl enable mysqld<\/pre>\n\n\n\nCheck the status of the mysqld.service<\/p>\n\n\n\n
# systemctl status mysqld<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
\u25cf mysqld.service - MySQL 8.0 database server\n Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; vendor preset: disabled)\n Active: active (running)\n Main PID: 16863 (mysqld)\n Status: \"Server is operational\"\n Tasks: 39 (limit: 10907)\n Memory: 456.1M\n CPU: 5.476s\n CGroup: \/system.slice\/mysqld.service\n \u2514\u250016863 \/usr\/libexec\/mysqld --basedir=\/usr<\/pre>\n\n\n\nTo create the MySQL database, database user and grant permissions to that user, log in to the MySQL console and execute the commands below:<\/p>\n\n\n\n
mysql> CREATE DATABASE typo3;\nmysql> CREATE USER 'typo3'@'localhost' IDENTIFIED BY 'StrOngPassw0rdHere';\nmysql> GRANT ALL PRIVILEGES ON typo3.* TO 'typo3'@'localhost';\nmysql> FLUSH PRIVILEGES;\nmysql> EXIT;<\/pre>\n\n\n\n<\/span>Step 6: Install TYPO3 CMS<\/span><\/h2>\n\n\n\nRun the Composer command below to download the TYPO3 CMS source code.<\/p>\n\n\n\n
# cd \/var\/www\n# composer create-project typo3\/cms-base-distribution:^12 typo3<\/pre>\n\n\n\nFor a fresh TYPO3 CMS server install, create a file named FIRST_INSTALL<\/code> inside the web root directory.<\/p>\n\n\n\n# touch \/var\/www\/typo3\/public\/FIRST_INSTALL<\/pre>\n\n\n\nSet the Nginx user to be the owner of all TYPO3 files:<\/p>\n\n\n\n
# chown -R nginx:nginx \/var\/www\/typo3\/\n# chmod u+rw \/var\/www\/typo3<\/pre>\n\n\n\n<\/span>Step 7. Configure the Nginx site for TYPO3<\/span><\/h2>\n\n\n\nCreate a new server block with the following content by creating a file in the directory \/etc\/nginx\/conf.d<\/code>:<\/p>\n\n\n\n# nano \/etc\/nginx\/conf.d\/typo3.conf<\/pre>\n\n\n\nserver {\n listen 80;\n server_name yourdomain.com;\n\n root \/var\/www\/typo3\/public;\n index index.php;\n\nlocation ~ \\.js\\.gzip$ {\n add_header Content-Encoding gzip;\n gzip off;\n types { text\/javascript gzip; }\n}\nlocation ~ \\.css\\.gzip$ {\n add_header Content-Encoding gzip;\n gzip off;\n types { text\/css gzip; }\n}\n\nif (!-e $request_filename) {\n rewrite ^\/(.+)\\.(\\d+)\\.(php|js|css|png|jpg|gif|gzip)$ \/$1.$3 last;\n}\n\nlocation ~* composer\\.(?:json|lock) {\n deny all;\n}\n\nlocation ~* flexform[^.]*\\.xml {\n deny all;\n}\n\nlocation ~* locallang[^.]*\\.(?:xml|xlf)$ {\n deny all;\n}\n\nlocation ~* ext_conf_template\\.txt|ext_typoscript_constants\\.txt|ext_typoscript_setup\\.txt {\n deny all;\n}\n\nlocation ~* \/.*\\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql|sqlite)$ {\n deny all;\n}\n\nlocation ~ _(?:recycler|temp)_\/ {\n deny all;\n}\n\nlocation ~ fileadmin\/(?:templates)\/.*\\.(?:txt|ts|typoscript)$ {\n deny all;\n}\n\nlocation ~ ^(?:vendor|typo3_src|typo3temp\/var) {\n deny all;\n}\n\nlocation ~ (?:typo3conf\/ext|typo3\/sysext|typo3\/ext)\/[^\/]+\/(?:Configuration|Resources\/Private|Tests?|Documentation|docs?)\/ {\n deny all;\n}\n\nlocation \/ {\n try_files $uri $uri\/ \/index.php$is_args$args;\n}\n\nlocation = \/typo3 {\n rewrite ^ \/typo3\/;\n}\n\nlocation \/typo3\/ {\n absolute_redirect off;\n try_files $uri \/typo3\/index.php$is_args$args;\n}\n\nlocation ~ [^\/]\\.php(\/|$) {\n fastcgi_split_path_info ^(.+?\\.php)(\/.*)$;\n if (!-f $document_root$fastcgi_script_name) {\n return 404;\n }\n fastcgi_buffer_size 32k;\n fastcgi_buffers 8 16k;\n fastcgi_connect_timeout 240s;\n fastcgi_read_timeout 240s;\n fastcgi_send_timeout 240s;\n\n fastcgi_pass unix:\/var\/run\/php-fpm\/www.sock;\n fastcgi_index index.php;\n include fastcgi.conf;\n}\n}\n<\/pre>\n\n\n\nMake sure to replace yourdomain.com<\/strong> with your actual domain name.<\/p>\n\n\n\nSave and close the file then verify the Nginx configuration using the command below:<\/p>\n\n\n\n
# nginx -t<\/pre>\n\n\n\nIf everything is fine, you will get the following output:<\/p>\n\n\n\n
nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n\n\n\nFinally, restart the Nginx service to apply the changes:<\/p>\n\n\n\n
# systemctl restart nginx<\/pre>\n\n\n\n