ubantu 22 服务器 记录
chl master@1234
sudo wget -O gitea https://dl.gitea.io/gitea/1.19.3/gitea-1.19.3-linux-amd64
useradd chl
usermod -a -G sudo chl
usermod -s /bin/bash chl
cd /opt
mkdir gitea
sudo passwd chl
sudo chmod +x gitea
下载mysql
// https://repo.mysql.com/
// suto wget https://repo.mysql.com/mysql-apt-config_0.8.22-1_all.deb
1.使用apt安装
sudo apt update
sudo apt install -y mysql-server
sudo mysql -uroot
alter user 'root'@'localhost' identified with mysql_native_password by 'master$1234';
use mysql;
update user set host = '%' where user='root';
flush privileges;
ubuntu下安装mysql出现10061的错误
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
找到bind_address 这行注释掉
ubuntu 连接mysql1045
service mysql stop
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
修改my.cnf文件,在文件新增 skip-grant-tables
service mysql restart
use mysql;
update user set authentication_string='' where user='root';
service mysql restart
use mysql;
update user set plugin='mysql_native_password' where user='root'; #更改加密方式
alter user 'root'@'%' identified with mysql_native_password by 'master$1234';
FLUSH PRIVILEGES;
————————————————
select user,plugin from user where user='root';
FLUSH PRIVILEGES;
mysql - 错误代码:1292。日期列的日期值不正确:'0000-00-00'
SET GLOBAL sql_mode = '';
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
FLUSH PRIVILEGES;
创建gitea 用户
CREATE USER 'gitea' IDENTIFIED by 'gitea666@';
创建gitea 数据库
CREATE DATABASE giteadb character set 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
--授权
grant all privileges on giteadb.* to 'gitea';
--测试
mysql -u gitea -p giteadb
--启动
cd /opt/gitea
./gitea
仓库根目录
/opt/gitea/data/gitea-repositories
授权目录
sudo chmod 777 /home/chl/
ubantu 用户
chl
master@1234
gitea
chl
master@1234
nohup ./gitea web &
chl@iZ4jbz0xj0nx72Z:/opt/gitea$ nohup ./gitea web &
[1] 42729
chl@iZ4jbz0xj0nx72Z:/opt/gitea$ nohup: ignoring input and appending output to 'nohup.out'
posted on 2023-05-21 21:16 zyp_java_net 阅读(18) 评论(0) 编辑 收藏 举报
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?