epernay 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. sudo apt-get update && sudo apt-get upgrade -y
  2. sudo apt-get install apache2 php7.4 php7.4-zip php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-cli -y
  3. sudo apt-get install libarchive-dev unzip pbzip2 pixz xzip -y
  4. sudo apt-get install mariadb-server -y
  5. sudo mysql_secure_installation
  6. sudo mysql -uroot -p
  7. CREATE DATABASE forum;
  8. CREATE USER 'club'@'localhost' IDENTIFIED BY 'jokary51';
  9. GRANT ALL PRIVILEGES ON forum.* TO 'club'@'localhost';
  10. FLUSH PRIVILEGES;
  11. sudo apt-get install phpmyadmin php7.4-mysql -y
  12. sudo a2enmod rewrite
  13. sudo a2enmod php7.4
  14. modifier php.ini
  15. max_input_time = 160
  16. ---
  17. > max_input_time = 60
  18. 694c694
  19. < post_max_size = 25M
  20. ---
  21. > post_max_size = 8M
  22. 846c846
  23. < upload_max_filesize = 25M
  24. ---
  25. > upload_max_filesize = 2M
  26. sudo /etc/init.d/apache2 restart
  27. importer base
  28. sudo apt-get install vsftpd
  29. sudo nano /etc/vsftpd.conf
  30. anonymous_enable=NO
  31. local_enable=YES
  32. write_enable=YES
  33. local_umask=022
  34. chroot_local_user=YES
  35. user_sub_token=$USER
  36. local_root=/home/$USER/ftp
  37. importer forum
  38. importer database
  39. modifier apache2
  40. Etape 2 php5:
  41. sudo apt-get install software-properties-common -y
  42. wget https://packages.sury.org/php/apt.gpg
  43. sudo apt-key add apt.gpg
  44. echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
  45. sudo apt-get update
  46. sudo apt-get install php5.6 php5.6-fpm php5.6-mysql libapache2-mod-php5.6 libapache2-mod-fcgid -y
  47. sudo systemctl start php5.6-fpm
  48. sudo a2enmod actions fcgid alias proxy_fcgi
  49. sudo systemctl restart apache2
  50. modifier fichier apache
  51. <Directory /var/www/forum>
  52. Options Indexes FollowSymLinks MultiViews
  53. AllowOverride all
  54. Order allow,deny
  55. allow from all
  56. # Uncomment this directive is you want to see apache2's
  57. # default start wget https://packages.sury.org/php/apt.gpg
  58. #RedirectMatch ^/$ /apache2-default/
  59. </Directory>
  60. <FilesMatch \.php$>
  61. # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server
  62. SetHandler "proxy:unix:/run/php/php5.6-fpm.sock|fcgi://localhost"
  63. </FilesMatch>