查看系统版本
cat /etc/issue
cat /etc/redhat-release
lsb_release -a
centos6.x安装mysql
# 配置yum源
cat > /etc/yum.repos.d/aliyun.repo <<end
[aliyun]
name=fdf
baseurl=https://mirrors.aliyun.com/centos/6/os/x86_64/
gpgcheck=0
end
# 清除yum缓存
yum clean all
# 安装mysql
yum install mysql-server -y
# 启动服务端
service mysqld restart
# 进入mysqll
mysql -uroot -p
centos7.x安装mysql
# 配置yum源
cat > /etc/yum.repos.d/aliyun.repo <<end
[aliyun]
name=fdf
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
gpgcheck=0
end
# 清除yum缓存
yum clean all
# 安装mariadb服务端
yum install mariadb-server -y
# 启动mariadb
systemctl restart mariadb
# 初始化脚本 可选
mysql_secure_installation
6.x安装nginx
配置NGINXyum仓库
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx -y
service nginx restart
网友评论