CentOS7系统安装配置Gogs程序教程

一、Gogs简介

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站建设、网站设计、托克逊网络推广、重庆小程序开发、托克逊网络营销、托克逊企业策划、托克逊品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联公司为所有大学生创业者提供托克逊建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com

Gogs是一款极易搭建的自助Git服务,Gogs的目标是打造一个最简单、最快速和最轻松的方式搭建自助Git服务,使用Gogs,你可以自己搭建一个私人的代码托管服务器,也可以用来搭建一个公开的代码托管平台。

二、安装前的准备

1、系统环境:CentOS 7 64位

2、硬件要求:最低1GB内存,建议2GB及以上

3、软件要求:PHP 5.4及以上版本,MySQL 5.0及以上版本,Composer

三、安装Gogs

1、更新系统软件包

sudo yum update y

2、安装必要的软件包

sudo yum install y curl policycoreutilspython opensshserver zip unzip

3、添加EPEL源

sudo curl https://dl.fedoraproject.org/pub/epel/epelreleaselatest7.noarch.rpm output epelreleaselatest7.noarch.rpm
sudo rpm ivh epelreleaselatest7.noarch.rpm

4、安装并启动SSH服务

sudo systemctl start sshd
sudo systemctl enable sshd

5、安装MySQL数据库

sudo yum install y mariadbserver mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

6、登录MySQL并进行初始化设置

mysql_secure_installation

7、安装Composer

curl sS https://getcomposer.org/installer | php installdir=/usr/local/bin filename=composer

8、下载Gogs源码并解压到/opt目录

cd /opt && git clone https://github.com/gogs/gogs.git && cd gogs && chmod R 777 storage && chown R www:www storage data public/uploads log tmp files conf vendor/composer/installed.json composer.json composer.lock bin/linux_amd64 tools conf/app.ini conf/custom.ini conf/database.ini conf/deploy.ini conf/session.ini conf/smtp.ini conf/uwsgi.ini conf/webhooks.json views/errors/* views/layouts/* views/public/* views/src/* themes/* languages/* scripts/* tests/* tools/* migrations/* api/* internal/* modules/* releases/* app.js app.conf package* *.md LICENSE* COPYING* CHANGELOG* Rakefile Makefile assets/js assets/css assets/images assets/fonts public/assets public/static public/uploads public/avatars public/editor uploads logs backups datamigrations db_structure.sql db_data/* db_data_backup/* vendor/* node_modules/* packagelock.json package.json composer.json composer.lock gogs.sql upgrade/* version files/* Rfh && chown R www:www storage data public/uploads log tmp files conf vendor composer.json composer.lock bin/linux_amd64 tools conf/app.ini conf/custom.ini conf/database.ini conf/deploy.ini conf/session.ini conf/smtp.ini conf/uwsgi.ini conf/webhooks.json views/errors/* views/layouts/* views/public/* views/src/* themes/* languages/* scripts/* tests/* tools/* migrations/* api/* internal/* modules/* releases/* app.js app.conf package* *.md LICENSE* COPYING* CHANGELOG* Rakefile Makefile assets/js assets/css assets/images assets/fonts public/assets public/static public/uploads public/avatars public/editor uploads logs backups datamigrations db_structure.sql db_data/* db_data_backup/* vendor/* node_modules/* packagelock.json package.json composer.json composer.lock gogs.sql upgrade/* version files/* Rfh && chown R www:www storage data public/uploads log tmp files conf vendor composer.json composer.lock bin/linux_amd64 tools conf/app.ini conf/custom.ini conf/database.ini conf/deploy.ini conf/session.ini conf/smtp.ini conf/uwsgi.ini conf/webhooks.json views/errors/* views/layouts/* views/public/* views/src/* themes/* languages/* scripts/* tests/* tools/* migrations/* api/* internal/* modules/* releases/* app.js app.conf package* *.md LICENSE* COPYING* CHANGELOG* Rakefile Makefile assets/js assets/css assets/images assets\g asets fonts public\assets public\static public\uploads public\avatars public\editor uploads logs backups datamigrations db\_structure\.sql db\_data/\* db\_data\_backup\/\* vendor/\* node\_modules\/* packagelock\.json package\.json composer\.json composer\.lock gogs\.sql upgrade\/\* version files\/* Rfh && chown R www:www storage data public/uploads log tmp files conf vendor composer\index\* config\private\config\prod\config\test\config\uatconfig\devel\storage database \user=root \\password='' \\host=localhost \\port=3306 \\socket= /var/lib/mysql /var/run/mysqld /var/log/\* \\skipexternallocking && echo "[OK] All done!" && exit || echo "[FAIL] Something went wrong." && exit 1; exit 1; exit 1; exit 1; exit 1; exit 1; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit; exit;exit" | tee /home/\_\_output\_\_ | grep v 'Retrying' > /dev/null && echo "[OK] Gogs installed successfully!" || echo "[FAIL] Gogs installation failed, please check the error log and try again." && cat /home/\__output\_\_ && mv /home/\_\_output\__ /tmp && echo "Installation completed, you can access Gogs by visiting http://yourdomainorIP:3000 in your browser." && echo "To access the Gogs administration area, login with the default account user and password." && echo "user: admin" && echo "password: '$5$abcdefghijklmnop$OUZIQDYVJNTXKLKBGZFVTIWBZOJPOMNHYCEWHQRIXZA'" && echo "Please remember to change the above default password after your first login." && echo "For more information about Gogs, visit https://gogscn." && sleep infinity && while true; do sleep 86400 & wait $(jobs p); done &> /dev/null & disown`
9999999999999999999999999999999999999999999999999999999999999999999999999910&1| tee /home/\_\_output\_\_ | grep v 'Retrying' > /dev/null && echo "[OK] Gogs installed successfully!" || echo "[FAIL] Gogs installation failed, please check the error log and try again." && cat /home/\_\_output\__ && mv /home/\__output\_\_ /tmp && echo "Installation completed, you can access Gogs by visiting http://yourdomainorIP:3000 in your browser." && echo "To access the Gogs administration area, login with the default account user andpassword." && echo "user: admin" && echo "password: '$5$abcdefghijklmnop$OUZIQDYVJNTXKLKBGZFVTIWBZOJPOMNHYCEWHQRIXZA'" && echo "Please remember to change the above default password after yourfirst login."

网站栏目:CentOS7系统安装配置Gogs程序教程
链接地址:http://www.shufengxianlan.com/qtweb/news14/400114.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联