博客系统搭建
博客系统搭建
本用户准备了sentos7.4与sentos6.5
先用sentos7.4
资料准备
[root@hadoop100 home]# ll
总用量 353664
-rw-r--r--. 1 root root 172661118 11月 16 14:55 jdk-8u131-linux-i586.rpm
-rw-r--r--. 1 root root 184483840 11月 16 14:52 MySQL-5.5.53-1.linux2.6.i386.rpm-bundle.tar
-rw-r--r--. 1 root root 1959445 11月 16 14:52 redis-5.0.3.tar.gz
drwxr-xr-x. 23 root root 4096 11月 16 14:54 ruoyi-plus
-rw-r--r--. 1 root root 3036652 11月 16 14:53 ry.sql
安装jdk
[root@hadoop100 home]# rpm -ivh jdk-8u131-linux-i586.rpm --nodeps --force
报错
/var/tmp/rpm-tmp.2VPIFT: /usr/java/jdk1.8.0_131/bin/unpack200: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
Error: unpack could not create JAR file:
/usr/java/jdk1.8.0_131/lib/tools.jar
答案
因为64位系统中安装了32位程序(系统是64位的,下载的jdk包是32位的)
安装一些软件后还是不行,所以放弃使用7.4
yum install glibc.i686 -y
yum install libgcc_s.so.1 -y
centos7.4查看系统
看见x86_64既可以认定为64位
[root@hadoop100 yum]# uname -r
3.10.0-1160.el7.x86_64
[root@hadoop100 yum]# uname -a
Linux hadoop100 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
centos6.5查看系统
i686 只是i386的一个子集,都属于32位架构
[root@bogon yum]# uname -r
2.6.32-431.el6.i686
上面发现软件不适合用sentos7.4
改用sentos6.5
[root@bogon home]# rpm -ivh jdk-8u131-linux-i586.rpm --nodeps --force
Preparing... ########################################### [100%]
1:jdk1.8.0_131 ########################################### [100%]
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...
安装 mysql 数据库和 redis 缓存系统
mysql安装
[root@bogon home]# tar -xvf MySQL-5.5.53-1.linux2.6.i386.rpm-bundle.tar
MySQL-devel-5.5.53-1.linux2.6.i386.rpm
MySQL-client-5.5.53-1.linux2.6.i386.rpm
MySQL-test-5.5.53-1.linux2.6.i386.rpm
MySQL-shared-compat-5.5.53-1.linux2.6.i386.rpm
MySQL-shared-5.5.53-1.linux2.6.i386.rpm
MySQL-embedded-5.5.53-1.linux2.6.i386.rpm
MySQL-server-5.5.53-1.linux2.6.i386.rpm
[root@bogon home]# rpm -ivh MySQL-*.rpm --nodeps --force
warning: MySQL-client-5.5.53-1.linux2.6.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [ 14%]
2:MySQL-client ########################################### [ 29%]
3:MySQL-test ########################################### [ 43%]
4:MySQL-embedded ########################################### [ 57%]
5:MySQL-shared-compat ########################################### [ 71%]
6:MySQL-shared ########################################### [ 86%]
7:MySQL-server ########################################### [100%]
[root@bogon home]# service mysql start
Starting MySQL.. [ OK ]
#第一次进入mysql不需要密码
[root@bogon home]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.53 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
#修改密码以及刷新权限
mysql> set password for root@localhost=password("123456");
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
#导入数据库
Mysql -uroot -p123456 < ry.sql
如果行不通,进入mysql,source /home/ry.sql
也可以
set global max_allowed_packet=1024*1024*16;
redis安装
tar -xvf redis-5.0.3.tar.gz
cd redis-5.0.3
make
cd src
make install
cd ../
vim redis.conf
redis-server redis.conf
安装前端和后端系统
[root@bogon home]# ll
总用量 8
drwxr-xr-x. 8 root root 4096 11月 17 05:55 profile
drwxr-xr-x. 23 root root 4096 11月 17 05:57 ruoyi-plus
#启动博客
java -jar ruoyi-plus/ruoyi-admin/target/ruoyi-admin.jar
#关闭防火墙
[root@bogon ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: nat mangle filte[ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
#访问
http://ip:8080

浙公网安备 33010602011771号