博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
LAP + MySQL
阅读量:7207 次
发布时间:2019-06-29

本文共 2058 字,大约阅读时间需要 6 分钟。

LAP:

  yum 安装:

    yum  install -y httpd httpd-devel mysql php-devel php


  源码安装:

   1)安装 apache

    yum -y install apr-devel apr-util-devel

    cd /data ; wget 

     tar zxf   ;  cd 

    ./configure --prefix=/usr/local/apache --enable-so --enable-rewrite 

    make && make install 

   2)安装 mysql 客户端

    yum -y install mysql

   3)安装 php

    wget     ;   

    tar jxf php-5.3.28.tar.bz2 ; cd php-5.3.28

    ./configure  --prefix=/usr/local/php5  

        --with-mysql=mysqlnd  

        --with-mysqli=mysqlnd 

        --with-pdo-mysql=mysqlnd   

        --with-apxs2=/usr/local/apache/bin/apxs        

        make  -j8  &&   make install   -j8

     4)修改本地hosts文件

                vim /etc/hosts

                    mysql的IP    设置一个域名

  ********** 此处的做法有一个好处,就是如果要切换数据库,不需要去配置文件里面修改,直接修改本地的hosts 文件即可

    

    修改 apache 的配置文件:

    

            sed -i -e's/AddType application\/x-gzip .gz .tgz/AddType application\/x-gzip .gz .tgz \n   AddType application\/x-httpd-php .php/' $HTTP_D/conf/httpd.conf


sed -i 's/DirectoryIndex\ index.html/DirectoryIndex\ index.php\ index.html/' $HTTP_D/conf/httpd.conf


echo "<?php phpinfo();?>" >> /usr/local/apache/htdocs/index.php

    通过访问IP,即可访问 PHP 的信息页面

    

        

MySQL:      

        tar zxf  ;  cd  

        ./configure  --prefix=/usr/local/mysql    --enable-assembler    ;    make    -j8 &&  make    install    -j8


        cp    /usr/local/mysql/share/mysql/my-medium.cnf    /etc/my.cnf

        cp    /usr/local/mysql/share/mysql/mysql.server        /etc/rc.d/init.d/mysqld

        chkconfig    --add    mysqld

        chkconfig    --level    345    mysqld    on

        cd    /usr/local/mysql


        useradd    mysql


        chown    -R    mysql.mysql    /usr/local/mysql

        ./bin/mysql_install_db    --user=mysql

        chown    -R    mysql.mysql    var

        ./bin/mysqld_safe        --user=mysql    &


        登陆 mysql 给数据库授权:

        ./bin/mysql

        >create    database    Discuz    ;

        >grant    all on    *.*    to    root@'%'    identified    by    '123456';

        >quit



#################最后,如果要装论坛请继续,否则,可省略###############################

    

        登陆 mysql 给数据库授权:

        ./bin/mysql

        >create    database    Discuz    ;

        >grant    all  on   Discuz .*    to    root@'%'    identified    by    '123456';

        >quit


LAP:

        下载discuz源码包文件,然后解压:

                    cd  /data ;wget 

                    unzip    

  重命名程序文件:

                    mv    upload/*    /usr/local/apache/htdocs/

        赋予    discuz    目录完全访问权限:

                    cd    /usr/local/apache/htdocs/

                    chmod  -R  777    data/    uc_server/    config/    uc_clien


        

        然后访问IP安装discuz论坛,选择“我同意”,然后根据自己需要填写以下信息


安装完成!!!

新手,请多多指教,勿喷^^^^^^

本文转自 菜鸟的征程 51CTO博客,原文链接:http://blog.51cto.com/songqinglong/1685673

转载地址:http://kalum.baihongyu.com/

你可能感兴趣的文章
p4475 巧克力王国
查看>>
js中的Attribute
查看>>
Mysql的一些常用命令
查看>>
蓝桥杯:基础练习 闰年判断
查看>>
LeetCode-82-Remove Duplicates from Sorted List II
查看>>
ASP.NET XML读取、增加、修改和删除操作
查看>>
struts2将servlet对象注入到Action中
查看>>
快速排序
查看>>
const变量存储位置及const指针
查看>>
MFC 加载链接库(DLL)错误
查看>>
线性代数的视角理解LSR(least square regression)的参数评估算法本质
查看>>
HDU-2897 邂逅明下
查看>>
牛客暑假多校第二场 F trade
查看>>
Java 8 中的 Streams API 详解
查看>>
一道看似简单的sql需求(转)
查看>>
Eclipse+Maven命令创建webapp项目<三>
查看>>
Fiddler 教程(转)
查看>>
[十二省联考2019] 异或粽子
查看>>
CF360B Levko and Array (二分查找+DP)
查看>>
RQNOJ659 计算系数
查看>>