Centos中安装LAMP

From Yefu's notes
Jump to: navigation, search
To get everything that page is talking about under CentOS:
vi /etc/yum.repos.d/CentOS-Base.repo
hit "i"
find the line under [CentOSPlus] that reads:


enabled = 0

change it to
Line number On/Off
Code: Select all
enabled = 1


Then do:


yum install php php-mysql mysql-server php-gd postgres ImageMagick ImageMagick-devel

php-gd and Imagemagick are used for creating dynamic images which you'll want later on if not now. Postgres is a more powerful database than MySQL which you'll probably also want later on if not now.

That's it, those two steps will give you a fully functional, ssl enabled, web server with PHP support. Your DocumentRoot is in /var/www/html and your logs are in /var/log/httpd/. What's more, you running "yum -y update" won't totally screw over your system.

If you've already installed any of these packages following those "instructions", I strongly suggest you uninstall them and do it right.

<comments/>