CenterOS下 安装apache,php,mysql

1. 安装Apahce, PHP, Mysql, 以及php连接mysql库组件

yum -y install httpd php mysql mysql-server php-mysql

//安装mysql扩展
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
//安装php的扩展
yum -y install php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
//安装apache扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

一次性安装:
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql

2. 启动服务配置

chkconfig httpd on [设置apache为自启动]
chkconfig mysqld on [mysqld服务]

service httpd start [自启动 httpd 服务]
service mysqld start [自启动mysqld服务]

3.设置mysql数据库root帐号密码。
mysqladmin -u root password ‘新密码' [引号内填密码]

你可能感兴趣的:(apache,xml,PHP,mysql,perl)