Last active
September 15, 2021 16:09
-
-
Save parallaxhub/c12c9e16031a35322b37f6da23cefa9e to your computer and use it in GitHub Desktop.
Drupal Installation Service Using LAMP Stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Apache to check from web browser using 0.0.0.0 or localhost, check version, start,stop & restart Apache into Ubuntu | |
| apt update | |
| apt upgrade | |
| apt install apache2 | |
| ufw allow in "Apache Full" | |
| apache2 -v | |
| service apache2 restart | |
| systemctl enable apache2 | |
| service apache2 stop | |
| nano /etc/apache2/apache2.conf | |
| # Add | |
| ServerName 127.0.1.1 | |
| # Find and update AllowOverride All | |
| <Directory /var/www/> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All | |
| Require all granted | |
| </Directory> | |
| # save and exit ctrl+s and sctr+x | |
| service apache2 start | |
| service apache2 restart | |
| service apache2 reload | |
| # Visit: http://localhost/ | |
| # Install MySQL & check version, start,stop & restart Apache | |
| apt install mysql-server mysql-client | |
| mysql_secure_installation | |
| mysql --version | |
| nano /etc/mysql/mysql.conf.d/mysqld.cnf | |
| # update | |
| bind-address = 0.0.0.0 | |
| ctrl+s and sctr+x | |
| service mysql start | |
| service mysql restart | |
| service mysql status | |
| ufw allow from any to any port 3306 proto tcp | |
| systemctl restart mysql | |
| mysql | |
| CREATE DATABASE drupal; | |
| CREATE USER 'netadmin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NEt@dmin2121'; | |
| ALTER USER 'netadmin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NEt@dmin2121'; | |
| GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT on *.* TO 'netadmin'@'localhost' WITH GRANT OPTION; | |
| use drupal; | |
| FLUSH PRIVILEGES; | |
| exit | |
| service mysql restart | |
| # Install PHP & check version | |
| apt install software-properties-common | |
| add-apt-repository ppa:ondrej/php | |
| apt install php | |
| apt install libapache2-mod-php8.0 | |
| apt install apache2 libapache2-mod-php | |
| a2enmod proxy_fcgi setenvif | |
| systemctl restart apache2 | |
| a2enconf php8.0-fpm | |
| systemctl reload apache2 | |
| # Install PHPmyAdmin | |
| apt update -y | |
| apt upgrade -y | |
| apt update -y | |
| apt install phpmyadmin | |
| apt install -y php-mbstring | |
| apt install gettext | |
| nano /etc/phpmyadmin/apache.conf | |
| # update | |
| Alias /phpmyadmin "/usr/share/phpmyadmin/" | |
| # save ctrl+x then y and hit enter. Then restart apache: | |
| apt-get install php8.0-mysqli | |
| service apache2 restart | |
| service apache2 reload | |
| # visit: http://localhost/phpmyadmin/ and login netadmin and pass: NEt@dmin2121 | |
| nano /etc/php/8.0/cli/php.ini | |
| file_uploads = On | |
| allow_url_fopen = On | |
| short_open_tag = On | |
| memory_limit = 1024M | |
| upload_max_filesize = 1024M | |
| max_input_time = 668 | |
| max_execution_time = 3600 | |
| date.timezone = UTC+6 | |
| # save & exit ctrl+s and ctrl+x | |
| service apache2 restart | |
| service apache2 reload | |
| cd /var/www/html/ | |
| mv drupal-9.2.5 drupal | |
| chown -R www-data:www-data /var/www/html/drupal | |
| chmod -R 755 /var/www/html/drupal | |
| cd drupal | |
| nano /etc/apache2/sites-available/000-default.conf | |
| # remove all text or comment all text and paste below | |
| <VirtualHost *:80> | |
| ServerName localhost | |
| ServerAlias www.domain.com | |
| ServerAdmin [email protected] | |
| DocumentRoot /var/www/html/drupal/ | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| <Directory /var/www/html/drupal> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All | |
| Require all granted | |
| </Directory> | |
| </VirtualHost> | |
| # save and exit ctrl+s and ctrl+x | |
| apachectl -t | |
| a2dismod mpm_event | |
| systemctl restart apache2 | |
| a2enmod mpm_prefork | |
| a2enmod php8.0 | |
| a2enmod rewrite | |
| systemctl reload apache2 | |
| systemctl restart apache2 | |
| Visit: | |
| http://64.227.15.41/drupal/core/install.php | |
| OR | |
| http://0.0.0.0/drupal/core/install.php | |
| OR | |
| http://localhost/drupal/core/install.php | |
| #lamp #lamp_linux #lamp_stack |
Author
parallaxhub
commented
Sep 14, 2021





Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment