Advertisement
load-net

WordPress

Oct 28th, 2022
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1.  
  2. hostnamectl set-hostname uptime
  3. ip a
  4. reboot
  5. apt update && apt upgrade -y
  6. apt install sudo mc -y
  7.  
  8. sudo apt install php php-common php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-cli php-zip -y
  9. sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
  10. echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
  11. wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
  12. sudo apt update
  13.  
  14. reboot
  15. sudo apt update
  16. sudo apt install php8.0 php8.0-common php8.0-mysql php8.0-gmp php8.0-curl php8.0-intl php8.0-mbstring php8.0-xmlrpc php8.0-gd php8.0-xml php8.0-cli php8.0-zip -y
  17. mcedit /etc/php/7.4/apache2/php.ini
  18. mcedit /etc/php/8.0/apache2/php.ini
  19.  
  20. ******************************
  21. max_execution_time = 300
  22. upload_max_filesize = 100M
  23. post_max_size = 128M
  24. ******************************
  25.  
  26. apt install -y mariadb-server mariadb-client -y
  27. systemctl start mariadb
  28. systemctl enable mariadb
  29. mysql_secure_installation
  30.  
  31. ********************************
  32. .....
  33. Enter current password for root (enter for none): Just press Enter
  34. Switch to unix_socket authentication [Y/n] y
  35. Change the root password? [Y/n]
  36. New password: xxx << Enter Password
  37. Re-enter new password: xxx << Re-Enter Password
  38. .....
  39. Remove anonymous users? [Y/n] y
  40. ....
  41. Disallow root login remotely? [Y/n] y
  42. .....
  43. Remove test database and access to it? [Y/n] y
  44. .....
  45. Reload privilege tables now? [Y/n] y
  46. ....
  47. Thanks for using MariaDB!
  48. ********************************
  49.  
  50. mysql -u root -p
  51.  
  52. ******************************
  53. CREATE DATABASE wordpress;
  54. CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'Passw0rd';
  55. GRANT ALL ON wordpress.* TO 'wp_user'@'localhost' WITH GRANT OPTION;
  56. FLUSH PRIVILEGES;
  57. EXIT
  58. ******************************
  59. cd /usr/src/
  60. wget https://wordpress.org/latest.tar.gz
  61. tar -xvzf latest.tar.gz
  62. mv wordpress /var/www/html/wordpress
  63. chown -R www-data:www-data /var/www/html/wordpress/
  64. chmod -R 755 /var/www/html/wordpress/
  65. mcedit /etc/apache2/sites-available/wordpress.conf
  66.  
  67. **********************
  68. <VirtualHost *:80>
  69. ServerName wordpress.example.com
  70. ServerAlias www.wordpress.example.com
  71. ServerAdmin [email protected]
  72. DocumentRoot /var/www/html/wordpress
  73.  
  74. ErrorLog ${APACHE_LOG_DIR}/wordpress_error.log
  75. CustomLog ${APACHE_LOG_DIR}/wordpress_access.log combined
  76.  
  77.  
  78. <Directory /var/www/html/wordpress>
  79. Options FollowSymlinks
  80. AllowOverride All
  81. Require all granted
  82. </Directory>
  83.  
  84. </VirtualHost>
  85.  
  86. **********************
  87.  
  88. a2ensite wordpress
  89. a2enmod rewrite ssl
  90. systemctl restart apache2
  91. history
  92.  
  93. https://computingforgeeks.com/install-wordpress-on-debian-with-apache-and-letsencrypt/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement