2. 添加 yum 仓库
vim /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
3. 安装
yum install nginx
2.4. 启动
nginx
vim /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
3. 安装
yum install nginx
2.4. 启动
nginx
2019-11-02
参考:http://nginx.org/en/linux_packages.html
1. 准备
yum install yum-utils
1. 准备
yum install yum-utils
2019-11-02
参考:https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html
2019-11-02
1. 下载 yum 仓库
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
下载地址来自 https://dev.mysql.com/downloads/repo/yum/
2. 添加 yum 仓库
yum localinstall mysql80-community-release-el7-3.noarch.rpm
3. 安装
yum install mysql-community-server
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
下载地址来自 https://dev.mysql.com/downloads/repo/yum/
2. 添加 yum 仓库
yum localinstall mysql80-community-release-el7-3.noarch.rpm
3. 安装
yum install mysql-community-server
2019-11-02
4. 启动
systemctl start mysqld.service
5. 查看临时密码
grep ‘temporary password’ /var/log/mysqld.log
6. 连接
mysql -uroot -p
临时密码
7. 设置密码
mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘密码’;
systemctl start mysqld.service
5. 查看临时密码
grep ‘temporary password’ /var/log/mysqld.log
6. 连接
mysql -uroot -p
临时密码
7. 设置密码
mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘密码’;
2019-11-02
使用线上的 yum 仓库
1. 备份仓库
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下载仓库
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3. 清除缓存
yum clean all
4. 生成缓存
yum makecache
1. 备份仓库
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下载仓库
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3. 清除缓存
yum clean all
4. 生成缓存
yum makecache
2019-11-02
如果因为无法打开 /var/run/nginx.pid 而操作 nginx 失败,则执行 kill 进程号 后再尝试
2019-11-01
CentOS 7 的防火墙操作:
显示状态
systemctl status firewalld.service
关闭
systemctl stop firewalld.service
开机禁用
systemctl disable firewalld.service
显示状态
systemctl status firewalld.service
关闭
systemctl stop firewalld.service
开机禁用
systemctl disable firewalld.service
2019-11-01
./scripts/mysql_install_db --user=mysql
这一步提示
-bash: ./scripts/mysql_install_db: 没有那个文件或目录
该如何解决,摆脱老师或者哪位大神解决下
这一步提示
-bash: ./scripts/mysql_install_db: 没有那个文件或目录
该如何解决,摆脱老师或者哪位大神解决下
2019-10-23
./scripts/mysql_install_db --user=mysql
这一步提示
-bash: ./scripts/mysql_install_db: 没有那个文件或目录
该如何解决,摆脱老师或者哪位大神解决下
这一步提示
-bash: ./scripts/mysql_install_db: 没有那个文件或目录
该如何解决,摆脱老师或者哪位大神解决下
2019-10-23