Last active
November 9, 2025 20:45
-
-
Save adnan360/045d1e4c7619a1e1a9e779d6d35cca92 to your computer and use it in GitHub Desktop.
Revisions
-
adnan360 revised this gist
Mar 20, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -113,7 +113,7 @@ Install `php-mysql` package to make it work smoothly and also restart apache ser ``` sudo xbps-install php-mysql sudo sv restart apache mysqld ``` -
adnan360 revised this gist
Jun 2, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -228,7 +228,10 @@ sudo sv restart apache ``` **Ref:** [https://serverfault.com/questions/400158/runit-created-first-service-directory-sv-start-testrun-does-not-work](https://serverfault.com/questions/400158/runit-created-first-service-directory-sv-start-testrun-does-not-work) [https://wiki.archlinux.org/index.php/PhpMyAdmin](https://wiki.archlinux.org/index.php/PhpMyAdmin) [https://book.cakephp.org/3.0/en/installation.html](https://book.cakephp.org/3.0/en/installation.html) -
adnan360 revised this gist
Jun 2, 2019 . 1 changed file with 14 additions and 15 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,8 +11,7 @@ Install the things we need: sudo xbps-install apache php-apache php-intl mariadb phpMyAdmin ``` To start Apache run these once to enable the services: ``` sudo ln -s /etc/sv/apache /var/service/apache sudo ln -s /etc/sv/mysqld /var/service/mysqld @@ -22,30 +21,27 @@ then: sudo sv start apache ``` Your Apache www directory is `/srv/www/apache` To have the `www` directory on your home: ``` ln -s /srv/www/apache ~/www ``` You will then have a `www` item on your home directory. You can then save files there without going too deep into the filesystem everytime. Allow writes in the `www` directory: ``` sudo usermod -a -G _apache `whoami` sudo chmod -R g+w /srv/www/apache ``` then do a Reboot to update the group assignments. ## Make PHP7 work: PHP7 does not work out of the box. Apache just prints out PHP code in plain text. It needs some changes for it to work: @@ -84,7 +80,7 @@ sudo sv restart apache ``` ## MariaDB fix + phpmyadmin: `sudo nano /etc/php/php.ini` @@ -192,12 +188,15 @@ source: https://wordpress.org/support/topic/update-failed-download-failed-no-wor ``` extension=intl ; uncomment extension=pdo_mysql ; uncomment extension=sockets ; for websockets - uncomment ``` Then under `[intl]` add: ``` intl.default_locale = en_utf8 intl.error_level = E_WARNING ``` https://stackoverflow.com/a/29405081 -
adnan360 created this gist
Jun 2, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,235 @@ # How to install LAMP in Void Linux To install LAMP (Linux, Apache, MySQL/MariaDB, PHP) on Void Linux, follow these steps below. <blockquote> NOTE: This has been prepared for ease of use in mind, not security. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead. </blockquote> Install the things we need: ``` sudo xbps-install apache php-apache php-intl mariadb phpMyAdmin ``` To start Apache: Run it once to enable the services: ``` sudo ln -s /etc/sv/apache /var/service/apache sudo ln -s /etc/sv/mysqld /var/service/mysqld ``` then: ``` sudo sv start apache ``` Apache www directory: ``` /srv/www/apache ``` To have the www directory on your home: ``` ln -s /srv/www/apache ~/www ``` You will then have a `www` item on your home directory. You can then save files there without too deep into the filesystem everytime. Allow writes in the www directory: ``` sudo usermod -a -G _apache `whoami` sudo chmod -R g+w /srv/www/apache ``` then do a Reboot to update the group assignments. ## Make PHP7 work: PHP7 does not work out of the box. Apache just prints out PHP code in plain text. It needs some changes for it to work: ``` sudo nano /etc/apache/httpd.conf ``` then comment: ``` #LoadModule mpm_event_module modules/mod_mpm_event.so ``` then, uncomment: ``` LoadModule mpm_prefork_module modules/mod_mpm_prefork.so ``` To enable PHP, add these changes below to `/etc/httpd/conf/httpd.conf`: Place this at the end of the LoadModule list: ``` LoadModule php7_module /usr/libexec/httpd/modules/libphp7.so AddHandler php7-script .php ``` Place this at the end of the Include list: ``` Include /etc/apache/extra/php7_module.conf ``` To apply the new changes, run: ``` sudo sv restart apache ``` ## MySQL enable + phpmyadmin: `sudo nano /etc/php/php.ini` then uncomment: ``` extension=mysqli ``` Run `sudo nano /etc/apache/extra/phpmyadmin.conf` then put this text in the file: ``` Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin" <Directory "/usr/share/webapps/phpMyAdmin"> DirectoryIndex index.php AllowOverride All Options FollowSymlinks Require all granted </Directory> ``` Add the lines to `/etc/apache/httpd.conf`: ``` #... phpMyAdmin configuration Include /etc/apache/extra/phpmyadmin.conf ``` Install `php-mysql` package to make it work smoothly and also restart apache service to apply changes ``` sudo xbps-install php-mysql sudo sv restart apache ``` ### phpMyAdmin username password problem: https://stackoverflow.com/a/5908864 Run `sudo nano /etc/webapps/phpMyAdmin/config.inc.php` and add at the end: ``` $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; $cfg['Servers'][$i]['AllowNoPassword'] = true; ``` You can also add this so that it does not logout so often: ``` $cfg['ExecTimeLimit'] = 0; ``` To apply the changes, run: ``` sudo sv restart apache mysqld ``` ## WordPress issues ### WordPress plugins not updating, wants FTP creds Run `sudo nano /etc/apache/httpd.conf` then change `User ...` and `Group ...` lines to your username: ``` User yourusername Group yourusername ``` * Void always has a group named the username, so we are replacing both of them with the username Or even easier, run this command: ``` sudo sed -i "s/^User\s\(.*\)/User $USER/g" /etc/apache/httpd.conf ; sudo sed -i "s/^Group\s\(.*\)/Group $USER/g" /etc/apache/httpd.conf ``` Then: ``` sudo sv restart apache mysqld ``` ### An error occurred while updating Akismet Anti-Spam: Download failed. No working transports found `sudo nano /etc/php/php.ini` uncomment (remove ";" before the lines): ``` extension=curl extension=openssl ``` source: https://wordpress.org/support/topic/update-failed-download-failed-no-working-transports-found/ ## Prepartions for CakePHP 3 ### CakePHP is NOT able to connect to the database. `sudo nano /etc/php/php.ini` ``` extension=intl ; uncomment extension=pdo_mysql ; uncomment ; under [intl] ; add... intl.default_locale = en_utf8 intl.error_level = E_WARNING extension=sockets // for websockets ; uncomment https://stackoverflow.com/a/29405081 `sudo nano /etc/apache/httpd.conf` uncomment: ``` LoadModule rewrite_module modules/mod_rewrite.so ``` find: ``` <Directory "/srv/www/apache"> ``` make the line: ``` AllowOverride None ``` to: ``` AllowOverride All ``` then: ``` sudo sv restart apache ``` *Ref:* [https://serverfault.com/questions/400158/runit-created-first-service-directory-sv-start-testrun-does-not-work](https://serverfault.com/questions/400158/runit-created-first-service-directory-sv-start-testrun-does-not-work) [https://wiki.archlinux.org/index.php/PhpMyAdmin](https://wiki.archlinux.org/index.php/PhpMyAdmin) [https://book.cakephp.org/3.0/en/installation.html](https://book.cakephp.org/3.0/en/installation.html)