• Centos7安装mysql和composer


    How install mysql with Centos 7

    Install MySQL with Yum Repository

        # address : https://dev.mysql.com/downloads/repo/yum/
        [root@localhost ~]# wget https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
        [root@localhost ~]# rpm -ivh mysql80-community-release-el7-7.noarch.rpm
        [root@localhost ~]# yum update -y
        [root@localhost ~]# yum install mysql-community-server -y
        [root@localhost ~]# systemctl start mysqld
        [root@localhost ~]# cat /var/log/mysqld.log          
        2022-11-25T01:18:08.930759Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31) initializing of se
        rver in progress as process 11350
        2022-11-25T01:18:08.943396Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
        2022-11-25T01:18:09.768621Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
        2022-11-25T01:18:12.205355Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost:
         2Z:LO*bq2JTl
        2022-11-25T01:18:19.522643Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as proces
        s 11400
        2022-11-25T01:18:19.542422Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
        2022-11-25T01:18:20.417341Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
        2022-11-25T01:18:21.005942Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
        2022-11-25T01:18:21.006042Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encry
        pted connections are now supported for this channel.
        2022-11-25T01:18:21.051832Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' 
        port: 33060, socket: /var/run/mysqld/mysqlx.sock
        2022-11-25T01:18:21.053998Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '
        8.0.31'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
        [root@localhost ~]# mysql -uroot -p2Z:LO*bq2JTl
        mysql> alter user root@localhost identified by 'root@39doo.com';
        mysql> quit
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    Install Composer

    # address https://getcomposer.org/download/
    [root@localhost ~]# yum install epel-release.noarch  -y
    [root@localhost ~]# yum install openssl openssl-devel crypto-utils.x86_64 -y
    [root@localhost ~]# yum install php -y
    [root@localhost ~]# php -v
    PHP 5.4.16 (cli) (built: Apr  1 2020 04:07:17) 
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    [root@localhost ~]# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    [root@localhost ~]# php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    [root@localhost ~]# php composer-setup.php
    [root@localhost ~]# php -r "unlink('composer-setup.php');"
    [root@localhost ~]# mv composer.phar /usr/local/bin/composer
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
  • 相关阅读:
    Realtek SDK缓冲区溢出和命令执行漏洞说明
    好心情:别在该躺平的时候动脑子,10种方法让大脑高效休息
    Android10 Settings系列(五)恢复出厂设置添加重启和关机按钮,增加恢复出厂设置电量限制
    一个简单的泛型类
    STM32的HAL库SPI操作(master 模式)-根据时序图配置SPI
    009 gtsam/examples/ImuFactorsExample.cpp
    大模型应用:Prompt-Engineering优化原则
    传统虚拟机和容器的对比
    idea 中配置 maven
    unity3D之UI
  • 原文地址:https://blog.csdn.net/rimke/article/details/128034197