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

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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值