使用华为云搭建个人网站
使用华为云搭建个人网站1.购买服务器, 重置密码2.注册域名3.实名认证, 域名解析4.安装MySQLyum -y install mysql-serverservice mysqld restartmysql -u root -p回车回车use mysql;alter user 'root'@'localhost' identified by "123456";create user 'root
·
使用华为云搭建个人网站
2.注册域名
4.安装MySQL
yum -y install mysql-server
service mysqld restart
mysql -u root -p
回车回车
use mysql;
alter user 'root'@'localhost' identified by "123456";
create user 'root'@'%' identified with mysql_native_password by '123456';
grant all privileges on *.* to 'root'@'%';
flush privileges;
exit
5.安装Redis
wget http://download.redis.io/releases/redis-4.0.10.tar.gz
tar -zxvf redis-4.0.10.tar.gz
cd redis-4.0.10
make
cd src/
nohup ./redis-server &
6.安装Nginx
yum -y install nginx
vim /etc/nginx/nginx.conf
systemctl start nginx
systemctl stop nginx
7.安装jdk (版本: jdk-8u301-linux-x64.tar.gz)
tar -zxvf jdk-8u301-linux-x64.tar.gz
mv jdk1.8.0_301 jdk
vim /etc/profile
# 在文件末尾添加
export JAVA_HOME=/usr/local/java/jdk
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
# 使文件生效
source /etc/profile
java -version
8.开放服务器3306端口
1.安全组
9.保证redis,MySQL,Nginx启动后,nohup java -jar xxx.jar &
更多推荐
已为社区贡献2条内容
所有评论(0)