zoukankan      html  css  js  c++  java
  • 配置LAMP环境

    下载配置文件

    # yum install httpd mariadb-server mariadb php php-mysql  -y 

    启动apache和数据库

    # systemctl start mariadb
    # systemctl start httpd 

    安装PHP运行环境

    # yum info php-mysql
    已加载插件:fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: mirror.lzu.edu.cn
     * epel: ftp.riken.jp
     * extras: mirrors.163.com
     * updates: mirrors.163.com
    已安装的软件包
    名称    :php-mysql
    架构    :x86_64
    版本    :5.4.16
    发布    :46.el7
    大小    :232 k
    源    :installed
    来自源:base 

    启动MySQL

    # mysql
    Welcome to the MariaDB monitor.  Commands end with ; or g.
    Your MariaDB connection id is 2
    Server version: 5.5.60-MariaDB MariaDB Server
     
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
     
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
     
    MariaDB [(none)]> exit
    Bye 

    修改MySQL密码

    # /usr/bin/mysqladmin -u root password "*************" 

    重新登陆MySQL

    # mysql -uroot -p
    (只用# mysql 会报错)
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    进入apache文件夹

    # cd /var/www/html/ 

    新建一个PHP文件

    # vim index.php
      1 <?php
      2      phpinfo();
      3 ?>
     
    浏览器访问试验
    e.g.  192.168.*.*

  • 相关阅读:
    性能优化方法
    JSM的topic和queue的区别
    关于分布式事务、两阶段提交协议、三阶提交协议
    大型网站系统与Java中间件实践读书笔记
    Kafka设计解析:Kafka High Availability
    kafka安装和部署
    String和intern()浅析
    JAVA中native方法调用
    Java的native方法
    happens-before俗解
  • 原文地址:https://www.cnblogs.com/aslijitong/p/12622637.html
Copyright © 2011-2022 走看看