fedora18系统中安装Apache+PHP+MySQL环境

时间:2020-12-05 06:58:45
一、安装apache服务器
1.1使用yum进行安装:
# yum install httpd
1.2配置Apache能够随系统启动而启动
#chkconfig --levels  235 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-mysqlphp-pgsql php-pecl-mongo php-sqlite php-pecl-memcachephp-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 root@localhost=password('benfox');