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 阅读(12) 评论(0) 编辑 收藏 举报