Configuring LAMP

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

posted on 2015-05-12 02:45  victl  阅读(278)  评论(0)    收藏  举报

导航