Comments on Installing Apache2 With PHP5 And MySQL Support On CentOS 6.2 (LAMP)
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a CentOS 6.2 server with PHP5 support (mod_php) and MySQL support.
18 Comment(s)
Comments
HELLO, SO THANKS ! 100% PERFECT ! CONGRATULATIONS !
thank you very much. worked like a charm..
WONDERFULL
Good & Perfect Installation for beginner like me. Thanx A lot...
THANK YOU- as they said, flawless. mcm
Thanks a mil for clear and concise instructions.
Keep up the good work sir.
Not sure that phpmyadmin should have root user logging in over internet which is what results from these instructions.
I agree that it probably isn't a good idea to have this open publicly but this isn't necessarily open. This config is ok if you aren't running a public ip or NAT'ing 80 to this server. I'm sure you know that, just want to throw that out there, so not to not alarm any newbies.Probably a better idea to restrict it to your local subnet though.
Great, clear, concise tutorial... many thanks.
My CentOS installation however blocked port 80 by default. Maybe add a warning.
To resolve,
vi /etc/sysconfig/iptables
Append the port 80 and 443 (if you'll be using https) BELOW the port 22 access.
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
THANKS!!
It helped me a lot.
To feedback on other comments, here's the best page I have found for IPTABLES configuration:
http://wiki.centos.org/HowTos/Network/IPTables
Following the instructions below is the script I called "myfirewall".
The Centos installation was in a client's office (Local LAN), also you can VPN from my office (Office LAN) and directly from my office to the client's without the VPN (Office External).
It allows SSH, HTTP and HTTPS, just for the IP addresses stated, and blocks any others.
Obviously I have changed my office IP address in the script.
#!/bin/bash
#
# iptables example configuration script
#
# Flush all current rules from iptables
#
iptables -F
#
#
# SSH Access
#
# Local LAN
iptables -A INPUT -p tcp -s 192.168.14.0/24 --dport 22 -j ACCEPT
# Office LAN
iptables -A INPUT -p tcp -s 192.168.22.0/24 --dport 22 -j ACCEPT
# Office External
iptables -A INPUT -p tcp -s 123.234.234.132 --dport 22 -j ACCEPT
#
#
# Webserver Access
#
# Local LAN
iptables -A INPUT -p tcp -s 192.168.14.0/24 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 192.168.14.0/24 --dport 443 -j ACCEPT
# Office LAN
iptables -A INPUT -p tcp -s 192.168.22.0/24 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 192.168.22.0/24 --dport 443 -j ACCEPT
#Office External
iptables -A INPUT -p tcp -s 123.234.234.132 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 123.234.234.132 --dport 443 -j ACCEPT
#
#
#
# Set default policies for INPUT, FORWARD and OUTPUT chains
#
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
#
# Set access for localhost
#
iptables -A INPUT -i lo -j ACCEPT
#
# Accept packets belonging to established and related connections
#
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#
# Save settings
#
/sbin/service iptables save
#
# List rules
#
iptables -L -v
Thanks for sharing this step by step guide. Keep it up.
thank you
Hi Admin and Other Members,
I am new user of Centos 6, I follow your first Yum SQL step and i am fail please find my putty image and let me know why i am facing this problem and second thing please tell me which group list i have to install in my Centos 6 which support nano and some useful commands i am tried of finding on Google but i cannot find the proper command,
Here is the link of image http://i41.tinypic.com/2z404e8.png
http://tinypic.com/view.php?pic=2z404e8&s=5#.UjlH6NJHLfA
Thanks in Advance,
Best Regards,
Anas Ashraf
Thanks a lot
how to install phpmyadmin using NGINX on Redhat/CentOS/Fedora?
please sharing to me if you have this tutorial.
thank you