您的位置:首页 > 运维架构 > Apache

Archlinux MySQL PHP phpmyadmin Apache PHP-Apache Install

2016-05-31 00:47 573 查看

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://localhost

Install 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql