阿里云主机Centos7配置

系统为centos 7.3

#查看 88 端口占用
netstat -lnp|grep 88

访问Tomcat相关问题

访问Tomcat特别慢
解决问题链接
解决问题链接

#原因是云主机的熵源不够大
yum install rngd-tools
#或者yum install rng-tools
systemctl start rngd

防火墙原因无法访问

##Add
firewall-cmd --permanent --zone=public --add-port=8080/tcp
##Reload
firewall-cmd --reload
##检查是否生效
firewall-cmd --zone=public --query-port=8080/tcp

1、ssh互信

1、修改配置文件

sudo vim /etc/ssh/sshd_config
#将以下内容前的#号去掉
RSAAuthentication yes
PubkeyAuthentication yes
#重启ssh服务
systemctl restart sshd
AuthorizedKeysFile      .ssh/authorized_keys

2、通过密码传输公钥(云主机默认没设置密码,需要去网页设置)

scp /root/.ssh/id_rsa.pub root@worker1:/root/.ssh/id_rsa.pub.master

3、追加到对应认证秘钥中

cat /root/.ssh/id_rsa.pub.master >>/root/.ssh/authorized_keys

2、mysql安装

#before installation,we need to uninstall mariadb
rpm -qa | grep -i mariadb
# the edition might be different
rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64
#download the mysql
 wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.23-1.el7.x86_64.rpm-bundle.tar
#mysql need the support by perl
yum install perl -y
# installation
rpm -ivh mysql-community-common-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.23-1.el7.x86_64.rpm
rpm install libaio
rpm -ivh mysql-community-server-5.7.23-1.el7.x86_64.rpm
#init
systemctl start mysqld.service
# query the temporary password
cat /var/log/mysqld.log |grep temporary
# log in 
mysql -u root -p 
# change the password
set password = passsord('××××××××××××');
# allow the remote access 
grant all privileges on *.* to 'root' @'%' identified by '×××××××××××';
flush privileges;
#开启3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent  
#刷新防火墙
firewall-cmd --reload  
#设置开机自启动
chkconfig mysqld on
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值