Centos yum 命令 install Mysql Apache Php

来源:互联网 发布:网络歌曲大全2017视频 编辑:程序博客网 时间:2024/06/10 01:14
官方网站:chinaunix.net

 Mysql安装

1、linux代码
      yum install mysql mysql-server mysql-devel   安装mysql及服务驱动
2 、mysql相关操作
     /etc/init.d/mysqld start   启动mysql
     /etc/init.d/mysqld restart   mysql重启
     /etc/init.d/mysqld  stop  mysql停止    
3、设置MySQL初始密码
     mysqladmin -u root password 123456
4
设置远程登录权限
     mysql -u root -p 
     mysql> GRANT ALL PRIVILEGES ON *.* TO '用户名'@'地址' IDENTIFIED BY '密码' WITH GRANT OPTION;
     mysql> FLUSH PRIVILEGES;

Apache 安装:

1、linux代码
yum install httpd httpd-devel 
/etc/init.d/httpd start
2 、apache相关操作
    /etc/init.d/httpd start 启动apachel
    /etc/init.d/httpd restart   重启apache
   /etc/init.d/httpd  stop  停止apache

Php 安装及插件:

1、linux代码
 yum install php php-mysql php-common php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc 
0 0