复制代码 代码如下:
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-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
复制代码 代码如下:
/sbin/chkconfig httpd on [设置apache为自启动]
/sbin/chkconfig –-add mysqld [mysql服务]
/sbin/chkconfig mysqld on [mysqld服务]
/sbin/service httpd start [自启动 httpd 服务]
/sbin/service mysqld start [自启动mysqld服务]
复制代码 代码如下:
mysql -u root -p [此时会要求你输入刚刚设置的密码,输入后回车即可
mysql> DROP DATABASE test; [删除test数据库]
mysql> DELETE FROM mysql.user WHERE user = ”; [删除匿名帐户]
mysql> FLUSH PRIVILEGES; [重载权限]
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root'@'192.168.1.13′ IDENTIFIED BY ‘密码' WITH GRANT OPTION; [增加远程链接用户]
新闻热点
疑难解答