5 minutes per day in Cent OS - 3 - Installing XAMPP

1. The first thing needs to be done for installation httpd service and mysql, the server needs to be updated 

yum update

2. Install mysql server service:

yum install mysql mysql-server

After finish, start mysql service and ensure that it will be started at the booting.

chkconfig --levels 235 mysqld on
service mysqld restart 
or
service mysqld start 

Test by trying to log in to mysql server

mysql -u root
(enter password for root user)

Show databases 
+---------------+
|Database      |
+---------------+
:info_schema|
:mysql           |
:test               |
+--------------+

The password of root user in mysql need to be different with root user in centos. To change the password please refer to this:

Method 1: From SQL mode, change pwd of root user

mysql -u root

use mysql;
update user set password=PASSWORD("New Pwd") where user='root';
flush privileges;

Method 2: change from cli mode

$ mysqladmin -u root -p'New Pwd' password 'Other Pwd'


check: from cli mode

mysql -u root -p'New Pwd' -e 'show databases;'

***Note: you can secure your mysql installation for more secured by 

mysql_secure_installation

Please refer the linkhttp://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp

2. Install Apache 2

yum install httpd

Enable httpd service running at the booting time

chkconfig --levels 235 httpd on
service httpd start 

or 
service httpd restart 

Refer link: http://www.server-world.info/en/note?os=CentOS_6&p=httpd

***To configuring the httpd.conf file, you should install vsftpd service for ftp remote to

yum install vsftpd
chkconfig --levels 235 vsftpd on
service vsftpd start 

Refer linkhttp://www.server-world.info/en/note?os=CentOS_6&p=ftp

Check running service : http://localhost

Note: Sometimes it does not work because of firewall service, try telnet to the host via port 80, an error comes with this message "(113) No route to host", it could be turn off or adjust to meet the requirement of the host, for more detail just refer to the link:
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-fw.html#s1-fireall-ipt-act

Anyway, for quick access just turn the iptables service then test the localhost

service iptables stop

3. Install PHP

Just yum install php

The repository could not be reachable sometimes so it may cause of the limitation of the DNS so you could change the ifcfg-eth0 to add the Google's DNS 8.8.8.8 and the name servers


nameserver 8.8.8.8
nameserver 8.8.4.4

To check the repository files go to /etc/yum.repos.d 

When php finishes installation just try to upload the info.php to test

<?php
phpinfo();
?>

Then run: http://localhost/info.php

Firewall reference link: http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-fw.html#s1-fireall-ipt-act

Install XAMPP reference link: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp

























Comments

Popular Posts