![]() Since I finally spent a little time getting the official version of PHP for native Windows installed, I figured I'd document the process here. However, on Windows there seem to crop up little issues here and there. For macOS and Linux, getting PHP and Composer installed is fairly quick and easy. In next part we will go though the special attributes and gotchas of the Linux subsystem.I am working a lot on Composer-based Drupal projects lately (especially gearing up for DrupalCon Nashville and my joint workshop on Drupal and Composer with Matthew Grasmick), and have been trying to come up with the simplest solutions that work across macOS, Linux, and Windows. ![]() You now have PHP, Apache, MySQL working, and phpMyAdmin under Īll ports listened by applications inside WSL are accessible in Windows. It doesn’t harm anything, we will remove that later, however. You may also encounter “ Invalid argument: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT” when starting Apache2. Service under WSL do not start automatically, after installation or after reboot. Yes, something unusual start appear from here. Php installer -filename=composer -install-dir=/usr/bin 8. Sed -e "s|cfg\ = ''|cfg = '$randomBlowfishSecret'|" /var/> /var/cd /var/Install composer (From official installer) wget RandomBlowfishSecret=`openssl rand -base64 32` Install and enable phpMyAdmin (From git) git clone -depth=1 -branch=STABLE git:///phpmyadmin/phpmyadmin.git /var/www/phpMyAdmin mysql ALTER USER IDENTIFIED WITH mysql_native_password BY 'some_strong_password' Įxit 6. MySQL 5.7 under Ubuntu 18.04 do not allow password login for security reason,īut it doesn’t matter much in our development machine, so we change it in order to use phpMyAdmin. ![]() (Press ENTER multiple time until finish if you don’t care) It will make several changes to MySQL login crediitcal Remove test user and databases mysql_secure_installation htaccess in all directories sed -i ':a N $!ba s/AllowOverride None/AllowOverride All/3' /etc/apache2/nf 5. Sed -i 's|pm.max_spare_servers = \+|pm.max_spare_servers = 10|g' /etc/php/7.2/fpm/pool.d/Configure Apache2Įnable. Sed -i 's|pm.min_spare_servers = \+|pm.min_spare_servers = 5|g' /etc/php/7.2/fpm/pool.d/www.conf Sed -i 's|pm.start_servers = \+|pm.start_servers = 5|g' /etc/php/7.2/fpm/pool.d/www.conf Sed -i 's|pm.max_children = \+|pm.max_children = 25|g' /etc/php/7.2/fpm/pool.d/www.conf Sed -i 's|max_execution_time = \+|max_execution_time = 300|g' /etc/php/7.2/fpm/php.ini Sed -i 's|upload_max_filesize = \+M|upload_max_filesize = 128M|g' /etc/php/7.2/fpm/php.ini Increase PHP resources limits for development sed -i 's|post_max_size = \+M|post_max_size = 128M|g' /etc/php/7.2/fpm/php.ini Install Apache, PHP, MySQL, git apt install -y php7.2-cli php7.2-fpm php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-xml php7.2-zip php7.2-bz2 php7.2-curl php7.2-gdĮnable PHP FPM for Apache a2enconf php7.2-fpm ![]() Let’s do a apt dist-upgrade first sudo -iĪpt dist-upgrade 2. If you are familiar with Ubuntu 18.04, you may skip this part and use your own method for installation. Part B works exactly the same way as Ubuntu 18.04. Install and launch it first time, it takes some time to initialize.Įnter desired username and password for the Linux subsystem. Start > Search”Microsoft Store”, open it and search for “Ubuntu 18.04” The result should show up after typing first two wordsĬheck “Windows Subsystem for Linux”, Click “OK”, Reboot 2. Start > Search “Turn Windows features on or off” ![]() With those tools under Windows 10 (In Part 2)Ī. In this tutorial we will setup this development environment in WSL (In Part 1) This article requires Windows 10 (Build Version 1709 ) or above to work.Īlthough WSL exists since Version 1607, it’s harder to setup and more buggy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |