zoukankan      html  css  js  c++  java
  • Fedora 17 上安装 AMP 服务(Apache MySQL PHP)

    1)安装Mysql

    1. yum install mysql mysql-server  
    2. systemctl start mysqld.service  
    3. systemctl enable mysqld.service  
    4. mysqladmin -u root password XXXXXXX  
    5. mysql -h localhost -u root –p
    
    

    (2)安装apache

      1. #yum -y install httpd  
      2. 修改配置文件  
      3. #vi /etc/httpd/conf/httpd.conf  
      4. # line 43: change  
      5. ServerTokens Prod  
      6. # line 75: change to ON  
      7. KeepAlive On  
      8. # line 330: change (enable CGI and disable Indexes)  
      9. Options FollowSymLinks ExecCGI  
      10. # line 337: change  
      11. AllowOverride All  
      12. # line 401: add file name that it can access only with directory's name  
      13. DirectoryIndex index.html index.cgi index.php  
      14. # line 535: change  
      15. ServerSignature Off  
      16. # line 758: make it comment  
      17. #AddDefaultCharset UTF-8 
      18. # line 795: uncomment and add file-type that apache looks them CGI  
    
    
      1. AddHandler cgi-script .cgi .pl
    (3)安装php
        1. #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. 启动服务  
        3. #systemctl start httpd.service  
        4. #systemctl enable httpd.service  
        5. # chkconfig --levels 235 httpd on  
        6. 编写一个文件测试一下  
        7. #vi /var/www/html/info.php 
    
    
        <?php
        phpinfo();
      ?>

    (4)安装mysql管理工具phpmyadmin
    #yum -y install phpMyAdmin php-mysql php-mcrypt
    修改配置文件

      1. #vi /etc/httpd/conf.d/phpMyAdmin.conf  
      2. # line 14: add IP address you allow  
      3. Allow from 127.0.0.1 192.168.1.0/24  
      4. # systemctl restart httpd.service
  • 相关阅读:
    pip的认识
    java动态代理
    hadoop集群环境配置成功与否查看方法
    input输入框只能输入数字、字母相关组合
    ASP.NET Core MVC上传、导入、导出知多少
    MQTT
    高德地图
    油猴脚本
    excel中001如何输入
    WebPageBase.IsSectionDefined(String) 方法
  • 原文地址:https://www.cnblogs.com/c4isr/p/2697030.html
Copyright © 2011-2022 走看看