parallax background

Install nginx web server & mysql & phpmyadmin on aws ubuntu 14

Human-Resources-767
Examples Log Queries & Find on Ubuntu
26/07/2016
Install wordpress
Restore web from aws S3 backup files
07/08/2016

Install nginx web server & mysql & phpmyadmin on aws ubuntu 14

sudo apt-get update
sudo apt-get -y install nginx
sudo apt-get -y install php5-fpm
sudo sed -i 's/# multi_accept on;/multi_accept on;/g' /etc/nginx/nginx.conf
sudo sed -i 's/# server_tokens off;/server_tokens off;/g' /etc/nginx/nginx.conf
sudo sed -i 's/# gzip/gzip/g' /etc/nginx/nginx.conf
sudo apt-get -y install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get -y install php5-gd libssh2-php snmp
sudo service php5-fpm restart
sudo service nginx reload
sudo service nginx restart
cd /var/tmp/
wget https://www.yanivp.net/wp-content/uploads/2016/08/default
sudo cp /var/tmp/default /etc/nginx/sites-enabled/default
sudo service php5-fpm restart && sudo service nginx reload && sudo service nginx restart
cd /usr/share/nginx/html/
sudo rm index.html
sudo mkdir /var/www
sudo mkdir /var/www/html
cd /var/www/html
sudo apt-get -y install mysql-server
mysqladmin -u root -p create dbname;
cd /var/tmp/
sudo wget http://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz
sudo rm /var/www/html/index.php
sudo cp -avr /var/tmp/wordpress/* /var/www/html/
sudo chown -R www-data /var/www/html
sudo apt-get -y install phpmyadmin ( don’t select apacheopen print screen and select No in dbconfig open print screen
sudo ln -s /usr/share/phpmyadmin/ /var/www/html   ( FIX phpmyadmin url )
go to www.yoursite.xxx and finish wordpress setup

download bash file
clear  cache:
sudo find /etc/nginx/cache/ -type f -delete

FIX Permalink /%postname%/ 404 not found in nginx web server:

sudo nano /etc/nginx/sites-enabled/default
add this line try_files $uri $uri/ /index.php?$args;   open print screen
add # in line try_files $uri $uri/ =404;  open print screen
sudo nginx -s reload
Go to admin login: http://ip-server/wp-admin
select setting and permalink choose Plain and Save Setting
select setting and permalink choose Post name and Save Setting

More Commands:

sudo nano /etc/nginx/sites-enabled/default
sudo service php5-fpm restart && sudo service nginx reload && sudo service nginx restart
sudo nginx -s reload FOR troubleshooting edit /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/nginx.conf

Reference:https://www.yanivp.net//www.youtube.com/watch?v=fcX7AMSGUZI

Leave a Reply

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