Archlinux MySQL PHP phpmyadmin Apache PHP-Apache Install

By wangxian

  1. Install the MySQL:

    参考官方

    1. sudo pacman -S mysql
    2. sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    3. sudo systemctl start mysqld.service
    4. sudo systemctl enable mysqld.service
    5. sudo mysql_secure_installation
    6. mysql -u root -p enter the empty pasword and set the new root password
    7. enter fourth y and complete
  2. Install Apache PHP PHP-Apache

    参考官方

    1. sudo pacman -S apache
    2. sudo systemctl start httpd
    3. sudo systemctl enable httpd
    4. curl 127.0.0.1 can get some data, that mean it works.
    5. 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

  3. Install phpmyadmin

    参考官方

    1. sudo pacman -S phpmyadmin php-mcrypt
    2. editing /etc/php/php.ini, and uncomment the following line:

      extension=mysqli.so
      extension=mcrypt.so
    3. 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>
    4. And include it in /etc/httpd/conf/httpd.conf:

      phpMyAdmin configuration

      Include conf/extra/phpmyadmin.conf

    5. restart the http.service
      sudo systemctl restart httpd

OK, It’s done to accss the http://localhost/phpmyadmin

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值