码迷,mamicode.com
首页 > 其他好文 > 详细

Configuring LAMP

时间:2015-05-12 08:01:19      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:

First, install necessory packages:

yaourt -S apache php mariadb phpmyadmin php-apache 

 Note: libphp5.so included with php-apache does not work with mod_mpm_event (FS#39218). You will have to use mod_mpm_prefork instead. Otherwise you will get the following error:

Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
AH00013: Pre-configuration failed
httpd.service: control process exited, code=exited status=1


As the configuration of /etc/httpd/conf/httpd.conf has for standard the mod_mpm_event you‘ll have to use mod_mpm_prefork in order to libphp5.so work properly, so open /etc/httpd/conf/httpd.conf and replace:

LoadModule mpm_event_module modules/mod_mpm_event.so

with

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

After mariadb package installation, you must run the command:
# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Start/enable mysqld.service using systemd, and then run the setup script:

# mysql_secure_installation

MariaDB should now be up and running and secured!

$ mysql -u root -p

MariaDB> CREATE USER monty@localhost IDENTIFIED BY some_pass;
MariaDB> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
   ->     WITH GRANT OPTION;
MariaDB> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘192.168.1.%‘ IDENTIFIED BY ‘my_optional_remote_password‘ WITH GRANT OPTION;

 



Ref: PHP, Apache HTTP Server

Configuring LAMP

标签:

原文地址:http://www.cnblogs.com/victl/p/4496230.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!