zoukankan      html  css  js  c++  java
  • CentOS7上搭建WEB服务器

    mysql
    安装 直接yum install mysql-server是不可以的
    1 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    2 rpm -ivh mysql-community-release-el7-5.noarch.rpm
    3 yum install mysql-server

    修改密码
    update user set password=password(‘123456‘) where user=‘root‘;
    update user set authentication=password(‘123456‘) where user=‘root‘;

    修改远程连接权限
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
    flush privileges;

    exit
    service mysqld restart

    防火墙
    开放端口
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    --zone #作用域
    --add-port=80/tcp #添加端口,格式为:端口/通讯协议
    --permanent #永久生效,没有此参数重启后失效
    --list-all

    关闭及禁止开机启动
    systemctl stop firewalld.service #停止firewall
    systemctl disable firewalld.service #禁止firewall开机启动

    apache
    yum install httpd

    php
    yum install php
    yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash

  • 相关阅读:
    17.CSS 文本属性和字体属性
    15.CSS 浮动
    D. Same GCDs
    B. Infinite Prefixes
    D. 0-1 MST
    lambda表达式复习
    D. New Year and Conference
    C. New Year and Permutation
    D. Dr. Evil Underscores
    D. Minimax Problem
  • 原文地址:https://www.cnblogs.com/bloodofhero/p/5794548.html
Copyright © 2011-2022 走看看