zoukankan      html  css  js  c++  java
  • lamp----1

    yum install -y php.x86_64 php-fpm.x86_64 httpd.x86_64 mariadb.x86_64 mariadb-server.x86_64 memcached.x86_64
     yum install epel-release.noarch -y

    yum install phpmyadmin

    vi /etc/my.cnf   #改配置文件

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    innodb_file_per_table=1

    systemctl restart mariadb.service
    systemctl enable mariadb.service

    echo "<?php phpinfo();?>" > /var/www/html/info.php    #测试   http://ip/index.html

    mysqladmin -u root password 1234     #数据库密码

    mysql -u root -p   #登陆

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;   #允许远程登录

    flush privileges;   #刷新

    vim /etc/httpd/conf.d/phpMyAdmin.conf

    Alias /phpMyAdmin /usr/share/phpMyAdmin
    Alias /phpmyadmin /usr/share/phpMyAdmin

    # These directories do not require access over HTTP - taken from the original
    # phpMyAdmin upstream tarball
    <Directory /usr/share/phpMyAdmin/>
    options none
    AllowOverride Limit
    Require all granted
    </Directory>

    systemctl restart httpd

    wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip      #下载diszuz  网址可能不对

    unzip DX31_R20141225_SC_UTF8.zip   #解压

     cp -Rf upload/ /var/www/html/

    chown apache:apache /var/www/html/upload/ -Rf

    chcon -R -t httpd_sys_rw_content_t /var/www/html/upload/

    vi /etc/httpd/conf/httpd.conf

    DocumentRoot "/var/www/html/upload"

    DirectoryIndex index.html index.php

    systemctl restart httpd.service

    浏览器 192.168.1.142 查看

  • 相关阅读:
    仿函数(functor)
    七周七语言
    面向签名编程
    git checkout简介
    .gitkeep常用写法
    PhpStorm terminal无法输入命令的解决方法
    原 在windows上创建文件名以“.”开头的文件
    cmd 里面运行git提示“不是内部或外部命令,也不是可运行的程序”的解决办法
    .gitkeep
    git/github运用
  • 原文地址:https://www.cnblogs.com/han1094/p/6366149.html
Copyright © 2011-2022 走看看