![]() Make sure you create new user, and delete this user # Check phpmyadmin is installed and working # Once script is completed, do the following steps # MySQL application password for phpmyadmin # Prompt asks: Configure database for phpmyadmin with dbconfig-common? N > enter pw > reenter pw > y > y > y > yĭont select any (apache2 or lighttpd), just press tab to go to ok and click enter # Prompt asks: for mysql_secure_installation command: ![]() # Prompt asks: Command may disrupt existing ssh connections. # Setup your server vps ubuntu 18.04 nginx # # Transferring wordpress from hosted server to your vps ubuntu 18.04 nginx Sudo ln -s /etc/nginx/sites-available/ $SERVERDOMAINNAME /etc/nginx/sites-enabled/ Sudo chown -R www-data:www-data /var/www/html Sudo chown -R $(whoami ): $(whoami ) /var/www/html Sudo apt install php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip -yĮcho -e "Set permission to folder /var/www for your websites " Sudo mv /var/www/html/phpmyadmin /var/www/html/ $PHPMYADMINNAMEĮcho -e "Fixing error screen in phpMyadmin import/export database, find if ( $options != null & count( $options) > 0) -e "GRANT ALL PRIVILEGES ON *.* TO ' WITH GRANT OPTION " Sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadminĮcho -e "Rename phpmyadmin url to pma_hidden, and move to /var/www " Sudo sed -i '/root \/var\/www\/html /c\root \/var\/www\/html\/$SERVERDOMAINNAME ' /etc/nginx/sites-available/ $SERVERDOMAINNAME Sudo sed -i '0,/#location ~ \\.php/ s/#location ~ \\.php/location ~ \\.php/ ' /etc/nginx/sites-available/ $SERVERDOMAINNAMEĮcho -e "Nginx default file, find root /var/www/html and change it to /var/www " Sudo sed -i '/fastcgi_pass unix:\/var\/run\/php\/ /c\fastcgi_pass unix:\/var\/run\/php\/ \nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name \nfastcgi_read_timeout 900 \ninclude /etc/nginx/fastcgi_params \n} ' /etc/nginx/sites-available/ $SERVERDOMAINNAME Sudo sed -i '/include snippets\/nf /c\include snippets\/nf ' /etc/nginx/sites-available/ $SERVERDOMAINNAMEĮcho -e "For timeout upload, Find line fastcgi_pass unix:/var/run/php/ and replace with uncommented fastcgi_pass unix:/var/run/php/ " $SERVERDOMAINNAME " /etc/nginx/sites-available/ $SERVERDOMAINNAMEĮcho -e "Find line, and replace entire line, removing the #, /include snippets/nf, use \ before/ to pipe it out " Sudo sed -i "/server_name _ /c\server_name $SERVERDOMAINNAME www. Sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/ $SERVERDOMAINNAME Sudo sed -i '0,/index.html/ s/index.html/index.php index.html/ ' /etc/nginx/sites-available/defaultĮcho -e "Changing server_name with your ip, find server_name _ and swap with server_name SERVERIP " Sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/defaultoriginalĮcho -e "etc nginx sites-available default add index.php before index.html " Sudo apt update & sudo apt install php-fpm php-mysql -yĮcho -e "Copy original nginx default file to /etc/nginx/sites-available/defaultoriginal " Sudo apt update & sudo apt install mysql-server -yĮcho -e "Setting up mysql_secure_installation " Sudo apt update & sudo apt install nginx -y # Put your ip, MySQL Username and password, and phpmyadmin url name below # Copy everything in this script and paste it in, save file and exit # run these commands below with root user, you can disable root user after you're done # This script is to setup server, install nginx and setup, install Lets Encrypt
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |