ArchLinux Apache, MySQL, PHPMyAdmin—-> How to install?

Yesterday May 2, 2011, I’m having a problem on installing Apache, MySQL and PHPMyAdmin in my KahelOS desktop. The problem was, http directory in /srv had gone that’s why my installed apache failed to work. I’m here to share some steps in case you encounter this kind of problem.
 
Step 1: Install Apache,MySQL,and PHP

# pacman -Sy  mysql php-mcrypt php-apache php apache php-suhosin libmcrypt

Step 2: Edit php.ini

# vim /etc/php/php.ini

Uncomment the following:

error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
log_errors = On
error_log = /var/log/php.log
max_execution_time = 300
memory_limit = 128M
register_globals = Off
extension=mcrypt.so
extension=mysql.so

STEP 3: Edit httpd.conf

# vim /etc/httpd/conf/httpd.conf

In order for the Apache to recognize PHP file, we need to configure http.conf file and enable or add PHP Module.

Locate first the following lines:

#
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_forensic_module modules/mod_log_forensic.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
# PHP
Then add these lines:

LoadModule php5_module modules/libphp5.so
Include conf/extra/php5_module.conf

Also locate lines:
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

Then add the following lines at the bottom:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

STEP 4: Install phpMyAdmin

Download it from here: http://www.phpmyadmin.net/home_page/downloads.php

Select phpMyAdmin-3.3.10-english.tar.gz

Then extract your phpmyadmin after installation

You have to move your phpmyadmin to /srv/http

# cd /srv/http
# mv /home/user/path/phpMyAdmin-3.3-10-english
# ls

Now, edit phpmyadmin config.inc.php and set the following:

# cd /srv/http/phpMyAdmin
# cp config.sample.inc.php config.inc.php
# vi config.inc.php

$cfg[‘blowfish_secret’]

$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ”;
$cfg[‘Servers’][$i][‘AllowNoPasswordRoot’] = True;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = True;

STEP 5: Start HTTP server and MySQL

 # /etc/rc.d/httpd start
 # /etc/rc.d/mysqld start

To check if phpmyadmin is working, just browse
http://localhost/phpMyAdmin/ or just http://localhost/

NOTE: In case, you encounter my problem above, (missing http directory inside /srv, just make http directory by typing

#mkdir /srv/http

Then follow the steps for Apache, MySQL, PHPMyAdmin installation and configuration.

“If you are Ubuntu user and wants configuration or How To’s for Apache. MySQL and PHPMyAdmin, check this blog:”

http://anakngalak.wordpress.com/2008/09/30/ubuntu-804-install-apache-php-mysql-phpmyadmin/

Also check his ready  made PDF file below :

apache-mysql-php-vhost:

Have a good day! ENJOY! =)

REFERENCES:

http://forum.kahelos.org/topic/how-to-setup-lamp-on-kahelos#post-61

Sir  meric (r3d3ye)

Book ( Beginning PHP5, Apache, MySQL Web Development)

https://wiki.archlinux.org/index.php/LAMP
 

Original Post by ginalyn apostol
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: