1.1使用yum进行安装:
# yum install httpd
1.2配置Apache能够随系统启动而启动
#chkconfig --levels235 httpd on
1.3启动/关闭Apache服务:
#service httpd start
#service httpd stop
或者命令启动/关闭Apache:
#/etc/init.d/httpd start
#/etc/init.d/httpd stop
二、安装php服务器
2.1使用yum进行安装php:
#yum install httpd php php-common
2.2使用yum进行安装modules
# yum install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
2.2启动/关闭Apache服务:
#service httpd start
#service httpd stop
或者命令启动/关闭Apache:
#/etc/init.d/httpd start
#/etc/init.d/httpd stop
三、安装mysql
3.1使用yum进行安装mysql:
#yum install mysql mysql-server
3.2启动/关闭/查看状态:
#service mysqld start
#service mysqld stop
#service mysqld status
3.3设置root密码
#mysql -u root
mysql>set password for [email protected]=password('benfox');