云服务器部署网站(一)

浪潮云服务器部署(一)1. 准备一台浪潮云服务器配置如下:2. 创建文件夹存储文件# cd /home# mkdir java# mkdir jenkins# mkdir maven# mkdir mysql# mkdir nginx# mkdir nodejs# mkdir zip3. 上传文件到相应的目录里面[[email protected] home]# lsjava jenkins maven mysql nginx nodejs zip4. 修改时区和同步时间1.yum安装ntpdate工具。# yum -y install ntp ntpdate2.设置系统时间与网络时间同步。# ntpdate cn.pool.ntp.org3.将系统时间写入硬件时间# hwclock –systohc5. 强制系统时间写入CMOS中。# hwclock -w6. 设置时区echo "Asia/shanghai" > /etc/timezone查看时间cat /etc/localtime查看时区cat /etc/timezone5. 安装工具 yum -y install lrzszyum -y install vim6. 配置jdk1.81.下载压缩包jdk-8u191-linux-x64.tar.gz2.上传压缩包到Centos7服务器/home3.解压压缩包文件tar -zxvf jdk-8u191-linux-x64.tar.gz4.配置环境变量vim /etc/profile#在文件末尾插入如下内容export JAVA_HOME=/home/java/jdk1.8.0_191export JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:$PATH#执行profile#source /etc/profile5.检查jdk是否生效java -versionjavac -version7. 安装mysql5.71. wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm2. rpm -Uvh platform-and-version-specific-package-name.rpm3. yum install -y mysql-community-server4. service mysqld start5. service mysqld status6. grep 'temporary password' /var/log/mysqld.log7. mysql -h 127.0.0.1 -u root -p 1234568. mysql> use mysql;9. mysql> update user set password=password('123') where user='root' and host='localhost';10. mysql> flush privileges;mysql> set global validate_password_policy=0;再修改密码的长度set global validate_password_length=6;再次执行修改密码就可以了8、授权其他机器登陆ALTER USER 'root'@'localhost' IDENTIFIED BY '123';GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;FLUSH PRIVILEGES;mysql> exit1. vim /etc/my.cnf# skip-grant-tableslower_case_table_names=12. 设置开机启动[[email protected] local]# systemctl enable mysqld[[email protected] local]# systemctl daemon-reload3. 启动mysql 服务[[email protected] local]# systemctl start mysqld4. mysql 在centos7.8 中开放3306端口firewall-cmd –zone=public –add-port=3306/tcp –permanentfirewall-cmd –reloadfirewall-cmd –list-ports

本文出自快速备案,转载时请注明出处及相应链接。

本文永久链接: https://www.175ku.com/39998.html