aws centos stream9 整合原本两台centos7

1.创建实例

2.进行命令行

3.更新

sudo su
yum update -y
yum upgrade -y

4.从旧服务器下载旧版本minisite.hk

mkdir -p /var/www/html/backup
mkdir -p /var/www/html/dbbackup
mkdir -p /var/www/html/minisite.hk
yum install httpd -y
yum install httpd-tools -y
yum install -y mysql mysql-server -y
yum install -y php
yum install -y wget
yum install -y unzip
#修改MYSQL PASSWORD
use mysql;
alter user 'root'@'localhost' identified by '123456';
set password for root@localhost ='123456';
FLUSH PRIVILEGES;

安装composer


curl -sS | sudo php -- --install-dir=/usr/local/bin --filename=composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
/usr/local/bin/composer -V

修改环境变量PATH

vi /etc/environment
PAHT=”/usr/local/bin”

composer -V

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注