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
  • 相关阅读:
    jquery取iframe中元素
    jquery 复选框全选/全不选切换 普通DOM元素点击选中/取消选中切换
    css横向 弹性盒子布局的一些属性
    css3 html5画心
    herf 和 src 的区别
    AngularJS bind
    I18n国际化
    jqgrid获取数据条数
    @ModelAttribute设置request、response、session对象
    js浏览器判断函数
  • 原文地址:https://www.cnblogs.com/c4isr/p/2697030.html
Copyright © 2011-2022 走看看