小编分享centos安装gitea(centos安装gcc)(centos如何安装git)。

在CentOS上安装Gitea,首先需要安装GCC。可以通过以下命令安装:sudo yum install gcc-c++。然后按照Gitea官方文档进行安装。

CentOS安装GCC

1、更新系统软件包:

sudo yum update

2、安装GCC:

小编分享centos安装gitea(centos安装gcc)(centos如何安装git)。

sudo yum install gcc

3、验证GCC是否安装成功:

gcc version

CentOS安装Gitea

1、下载Gitea的最新版本:

wget https://dl.gitea.io/gitea/1.14.0/gitea1.14.0linuxamd64.tar.gz

2、解压下载的文件:

tar zxvf gitea1.14.0linuxamd64.tar.gz

3、进入解压后的目录:

小编分享centos安装gitea(centos安装gcc)(centos如何安装git)。

cd gitea1.14.0linuxamd64

4、创建一个新的用户和组,用于运行Gitea:

sudo groupadd r gitea && sudo useradd r g gitea gitea

5、更改目录的所有者为新创建的用户和组:

sudo chown R gitea:gitea /path/to/your/directory/gitea1.14.0linuxamd64

6、修改目录权限:

sudo chmod R 777 /path/to/your/directory/gitea1.14.0linuxamd64

7、初始化Gitea数据库:

小编分享centos安装gitea(centos安装gcc)(centos如何安装git)。

sudo u gitea /path/to/your/directory/gitea1.14.0linuxamd64/bin/gitea init dbuser=gitea dbname=gitea dbhost=localhost port=3000

8、启动Gitea服务:

sudo u gitea /path/to/your/directory/gitea1.14.0linuxamd64/bin/gitea web listen=0.0.0.0:3000 cert="/path/to/your/certificate" key="/path/to/your/privatekey" baseurl="https://yourdomain.com" log_level=INFO custom_domains="yourdomain.com" auth_mode="database" db_user="gitea" db_password="yourpassword" db_name="gitea" db_host="localhost" enable_ldap=false enable_external_apps=true http_addr="[::]:3000" processes=4 port=3000 repository_storage=local repository_path="/path/to/your/repository" service=true skip_checks=true verbose=true with_sqlite3=false with_postgres=false with_mysql=false with_mssql=false with_orm=false with_casbin=false with_jwt=false with_prometheus=false with_session_memcached=false with_pprof=false with_debugger=false with_ratelimiter=false with_workflow=true with_activitypub=true with_gogs_importer=true with_hooks=true with_audit_log=true with_oauth2_application_password=true with_ldap=false with_openid=false with_oauth1a=false with_oauth1b=false with_github=true with_gitlab=true with_bitbucket=true with_customca="cafile /path/to/your/certificate" "certfile /path/to/your/certificate" "keyfile /path/to/your/privatekey" "hostname yourdomain.com" "rooturl https://yourdomain.com" "baseurl https://yourdomain.com" "internalurl https://yourdomain.com" "port 3000" "secret "" "sslmode disable" "forcessl false" "corsdomain \'*\'" "noconsole true" "httpport 3000" "pidfile /var/run/gitea/gitea.pid" "customheader \'UserAgent: Gogs; GogsServer: Gogs; GogsVersion: v0.9\'" "trustedproxies \'^$|127.0.0.1|::1$|localhost|[::1]\'" "disablesanitizers \'address\'" "httpaddr [::]:3000" "processes 4" "port 3000" "repositorystorage local" "repositorypath /path/to/your/repository" "service true" "skipchecks true" "verbose true" "withsqlite3 false" "withpostgres false" "withmysql false" "withmssql false" "withorm false" "withcasbin false" "withjwt false" "withprometheus false" "withsessionmemcached false" "withpprof false" "withdebugger false" "withratelimiter false" "withworkflow true" "withactivitypub true" "withgogsimporter true" "withhooks true" "withauditlog true" "withoauth2applicationpassword true" "withldap false" "withopenid false" "withoauth1a false" "withoauth1b false" "withgithub true" "withgitlab true" "withbitbucket true" "customca \'"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"
    [::]:3000\' "cat /etc/*release\' \'[::]:3002\' "cat /etc/*release\' \'[::]:80\' "cat /etc/*release\' \'[::]:443\' "cat /etc/*release\' \'[::]:22\' "cat /etc/*release\' \'[::]:2222\' "cat /etc/*release\' \'[::]:8888\' "cat /etc/*release\' \'[::]:3306\' "cat /etc/*release\' \'[::]:5432\' "cat /etc/*release\' \'[::]:5433\' "cat /etc/*release\' \'[::]:9200\' "cat /etc/*release\' \'[::]:9300\' "cat /etc/*release\' \'[::]:9400\' "cat /etc/*release\' \'[::]:9534\' "cat /etc/*release\' \'[::]:9696\' "cat /etc/*release\' \'[::]:9797\' "cat /etc/*release\' \'[::]:9898\' "cat /etc/*release\' \'[::]:9999\' "cat /etc/*release\' \'[::]:8787\' "cat /etc/*release\' \'[::]:8888\' "cat /root/*release\' \'[::]:8888\' "cat /usr/*release\' \'[::]:8888\' "cat /var/*release\' \'[::]:8888\' "cat /home/*release\' \'[::]:8888\' "cat /etc/*release\' \'[::]:8888\' "cat /opt/*release\' \'[::]:8888\' "cat /usr/local/*release\' \'[::]:8888\' "cat /usr/lib64/*release`\' \'[::]:8888\']") &> "/dev/null & disown & wait $!";

本文来自投稿,不代表科技代码立场,如若转载,请注明出处https://www.cwhello.com/447253.html

如有侵犯您的合法权益请发邮件951076433@qq.com联系删除

(0)
小甜小甜订阅用户
上一篇 38分钟前
下一篇 38分钟前

联系我们

QQ:951076433

在线咨询:点击这里给我发消息邮件:951076433@qq.com工作时间:周一至周五,9:30-18:30,节假日休息