环境准备
- 保持网络畅通
- 手动关闭并禁用selinux,firewall
setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/selinux/config
systemctl disable firewalld.service
systemctl stop firewalld.service
下载文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y mariadb* redis nginx
mkdir -p /home/n9e
cd /home/n9e
wget http://116.85.64.82/n9e-4.0.1.tar.gz
tar zxvf n9e-4.0.1.tar.gz
配置数据库
配置mysql
systemctl enable mariadb
systemctl start mariadb
mysql
mysql> grant all privileges on *.* to root@'localhost' identified by '1234';
mysql> flush privileges;
mysql> quit
方法1:
[root@localhost ~]
MariaDB[(none)]> SET password=PASSWORD('newpassward');
方法2:
[root@localhost ~]
如果root已经设置过密码,采用如下方法
[root@localhost ~]
cd /home/n9e/sql
mysql -uroot -p1234 < n9e_ams.sql
mysql -uroot -p1234 < n9e_hbs.sql
mysql -uroot -p1234 < n9e_job.sql
mysql -uroot -p1234 < n9e_mon.sql
mysql -uroot -p1234 < n9e_rdb.sql
配置nginx
systemctl start nginx
cp etc/nginx.conf /etc/nginx/nginx.conf
systemctl restart nginx