Skip to content

Instantly share code, notes, and snippets.



Last active Jan 11, 2018
What would you like to do?
# Install Nginx
sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
# Install MySQL (MariaDB)
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
# Install PHP 7.x
sudo rpm -Uvh
sudo rpm -Uvh
sudo yum install php70w php70w-fpm php70w-opcache php70w-bcmath php70w-cli php70w-common php70w-devel php70w-gd php70w-intl php70w-mbstring php70w-mcrypt php70w-mysqlnd php70w-pdo php70w-pecl-imagick php70w-xml php70w-json
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
sudo vi /etc/php-fpm.d/www.conf
# Find and change listen = to below
listen = /run/php-fpm/www.sock
# Find and uncomment for listen.owner & It should look like after update
listen.owner = nginx = nginx
# Lastly, find the lines that set the user and group and change their values from "apache" to "nginx":
user = nginx
group = nginx
# Save it
# Configure Nginx Server Block
sudo vi /etc/nginx/nginx.conf
# Add these lines to the end of the http {} block:
include /etc/nginx/sites-enabled/*.conf;
# Save it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.