By wangxian
Install the MySQL:
sudo pacman -S mysql
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mysqld.service
sudo systemctl enable mysqld.service
sudo mysql_secure_installation
mysql -u root -p
enter the empty pasword and set the new root password- enter fourth y and complete
Install Apache PHP PHP-Apache
sudo pacman -S apache
sudo systemctl start httpd
sudo systemctl enable httpd
curl 127.0.0.1
can get some data, that mean it works.In /etc/httpd/conf/httpd.conf, comment the line:
#LoadModule mpm_event_module modules/mod_mpm_event.so
and uncomment the line:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Place this in the LoadModule list anywhere after
LoadModule dir_module modules/mod_dir.so
LoadModule php7_module modules/libphp7.so
Place this at the end of the Include list:Include conf/extra/php7_module.conf
restart the http.service
sudo systemctl restart httpd
OK, It’s work to accss the http://localhostInstall phpmyadmin
sudo pacman -S phpmyadmin php-mcrypt
- editing /etc/php/php.ini, and uncomment the following line:
extension=mysqli.so
extension=mcrypt.so
- Create the Apache configuration file:
/etc/httpd/conf/extra/phpmyadmin.conf
Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"
<Directory "/usr/share/webapps/phpMyAdmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
And include it in /etc/httpd/conf/httpd.conf:
phpMyAdmin configuration
Include conf/extra/phpmyadmin.conf
- restart the http.service
sudo systemctl restart httpd
OK, It’s done to accss the http://localhost/phpmyadmin