You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 依赖
apt update
apt install -y net-tools
apt install -y libaio*# 下载mysql
wget https://obs.cn-north-4.myhuaweicloud.com/obs-mirror-ftp4/database/mysql-5.7.27-aarch64.tar.gz
# 解压
tar -xvf mysql-5.7.27-aarch64.tar.gz -C /usr/local/
# 添加组、用户
groupadd mysql
useradd -r -g mysql -s /sbin/nologin -M mysql
# 配置mysql
mv /usr/local/mysql-5.7.27-aarch64 /usr/local/mysql
mkdir -p /usr/local/mysql/logs
mkdir -p /usr/local/mysql/Logs/mysql-error.log
chown -R mysql:mysql /usr/local/mysql
ln -sf /usr/local/mysql/my.cnf /etc/my.cnf
cp -rf /usr/local/mysql/extra/lib* /usr/lib/
mv /usr/lib/libstdc++.so.6.0.24 /usr/lib/libstdc++.so.6.0.24.old
ln -s /usr/lib/libstdc++.so.6.0.24 /usr/lib/libstdc++.so.6
chmod +x /etc/init.d/mysqld
# 环境变量echo'export PATH="/usr/local/mysql/bin:$PATH"'| tee -a /etc/profile
# 初始化
mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
# 配置mysql密码
mysql -u root -e "use mysql; update user set authentication_string=password('toor') where user='root'; grant all privileges on *.* to root@'%' identified by 'root'; flush privileges;"
可能遇到的问题
....2024-04-02T13:38:35.691237Z mysqld_safe error: log-error set to '/usr/local/mysql/logs/mysql-error.log', however file don't exists. Create writable for user 'mysql'..... * The server quit without updating PID file (/usr/local/mysql/data/mysql.pid).mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directorymysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
拾光坞N3 在Dcoker部署i茅台案例
OS:Ubuntu 22.04.1 LTS aarch64
cpu:RK3566
ram:2G
https://oddfar.github.io/campus-doc/campus-imaotai/
部署流程——》mysql——》java8——》redis——》nginx
mysql
可能遇到的问题
尝试重新下载lib库和配置log日志文件权限
apt install libncurses5 apt install libaio1 apt install -y libaio* chmod 777 /usr/local/mysql/logs/mysql-error.log
Java
到甲骨文上去下arm版的java8
https://www.oracle.com/cn/java/technologies/downloads/#java8-linux
解压,配置环境变量即可
redis+nginx
其它准备
application-prod.yml
application-prod.yml 文件,需要修改mysql密码,修改为你设置的mysql密码
mysql
数据库文件 campus_imaotai-1.0.5.sql
创建数据库 campus_imaotai 并导入.sql文件
mysql -u root -p -e "create database campus_imaotai; use campus_imaotai; source /root/imt/campus_imaotai-1.0.5.sql;"
后端
上传打包成jar的后端项目文件
https://github.com/wpsec/campus-imaotai/releases/download/v1.0.12/campus-modular_1.0.12.jar
将mysql与redis跑起来
因为拾光坞做了端口映像限制,找到你对应的端口,Web能够访问你设置的后端端口,说明环境没有问题。
将运行后端的命令挂到命令行后运行
然后直接关掉这个ssh窗口就行
前端
上床前端源码文件至/var/www/html/目录下,并解压
https://github.com/wpsec/campus-imaotai/releases/download/v1.0.12/dist_1.0.12.tar.gz
nginx
nginx.conf 文件,直接复制作者写好的块文件,修改目录为/var/www/html/dist,修改listen端口为8000以上,修改proxy_pass端口为后端启动的端口8000以上。
最后将nginx启动
最后配置一下pushplus就能愉快的使用了
Beta Was this translation helpful? Give feedback.
All reactions