Difference between revisions of "Redhat8 - Install Nginx, Apache, Redis, php7.4-fpm, MySQL, PostgreSQL"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
+ | sudo dnf update | ||
== nginx == | == nginx == | ||
sudo dnf install nginx | sudo dnf install nginx | ||
Line 4: | Line 5: | ||
curl -4 ec2-3-123-2-191.eu-central-1.compute.amazonaws.com | curl -4 ec2-3-123-2-191.eu-central-1.compute.amazonaws.com | ||
+ | == Or Apache == | ||
+ | sudo dnf install httpd httpd-tools mod_ssl | ||
+ | sudo systemctl enable httpd | ||
+ | sudo systemctl start httpd | ||
== firewalld == | == firewalld == | ||
sudo yum install firewalld | sudo yum install firewalld |
Revision as of 20:54, 29 January 2021
sudo dnf update
nginx
sudo dnf install nginx sudo systemctl start nginx
curl -4 ec2-3-123-2-191.eu-central-1.compute.amazonaws.com
Or Apache
sudo dnf install httpd httpd-tools mod_ssl sudo systemctl enable httpd sudo systemctl start httpd
firewalld
sudo yum install firewalld sudo systemctl start firewalld sudo systemctl enable firewalld sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --permanent --list-all sudo firewall-cmd --reload
nano /etc/firewalld/firewalld.conf # AllowZoneDrifting=no
SELinux
setsebool -P httpd_can_network_connect 1 setsebool -P httpd_execmem 1 setsebool -P httpd_setrlimit 1 setsebool -P httpd_can_sendmail 1 setsebool -P allow_httpd_mod_auth_pam 1 setsebool -P httpd_mod_auth_pam 1 setsebool -P httpd_read_user_content 1 setsebool -P httpd_run_stickshift 1 setsebool -P httpd_enable_cgi 1 setsebool -P httpd_unified 1 setsebool -P httpd_enable_homedirs 1
MariaDB
sudo dnf install mariadb-server sudo systemctl start mariadb sudo systemctl enable mariadb
sudo mysql_secure_installation #(Set Root Password and disable test and insecure features)
sudo mysql -p #(Use \q to quit) CREATE DATABASE rho_database; GRANT ALL ON rho_database.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES;
PHP
sudo dnf module list php sudo dnf module install php:7.4 #(use dnf module reset php to reset if necessary before running command) sudo dnf install php-fpm php-opcache php-openssl php-curl php-cli php-common php-zip php-gd php-xml php-pear php-bcmath php-json php-pdo php-mysqlnd php-pgsql php-mbstring php-soap php-sockets php-pecl-apcu php-json php-ctype php-dom php-exif php-mysqli php-iconv php-fileinfo
sudo nano /etc/php-fpm.d/www.conf #(Change user and group to nginx) sudo systemctl start php-fpm systemctl status php-fpm.service sudo systemctl restart nginx