<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://znil.net/index.php?action=history&amp;feed=atom&amp;title=CentOS_7_Gogs_Git-Server_installieren</id>
	<title>CentOS 7 Gogs Git-Server installieren - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://znil.net/index.php?action=history&amp;feed=atom&amp;title=CentOS_7_Gogs_Git-Server_installieren"/>
	<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=CentOS_7_Gogs_Git-Server_installieren&amp;action=history"/>
	<updated>2026-04-28T10:56:40Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in znilwiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://znil.net/index.php?title=CentOS_7_Gogs_Git-Server_installieren&amp;diff=10333&amp;oldid=prev</id>
		<title>BLinz am 8. Dezember 2017 um 11:41 Uhr</title>
		<link rel="alternate" type="text/html" href="https://znil.net/index.php?title=CentOS_7_Gogs_Git-Server_installieren&amp;diff=10333&amp;oldid=prev"/>
		<updated>2017-12-08T11:41:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Erst einmal nur die Befehlssammlung:&lt;br /&gt;
Repository: https://packager.io/gh/pkgr/gogs&lt;br /&gt;
 sudo -i&lt;br /&gt;
 yum install wget&lt;br /&gt;
 export EDITOR=/bin/nano&lt;br /&gt;
&lt;br /&gt;
 sudo wget -O /etc/yum.repos.d/gogs.repo https://dl.packager.io/srv/pkgr/gogs/pkgr/installer/el/7.repo&lt;br /&gt;
 yum update&lt;br /&gt;
 yum install mariadb-server&lt;br /&gt;
 systemctl enable mariadb.service&lt;br /&gt;
 nano /etc/my.cnf&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 ....&lt;br /&gt;
 bind-address = 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 systemctl start mariadb.service&lt;br /&gt;
 yum install gogs&lt;br /&gt;
 &lt;br /&gt;
 nano /etc/systemd/system/gogs-web-1.service &lt;br /&gt;
 Environment=PORT=443&lt;br /&gt;
 &lt;br /&gt;
 /sbin/setcap &amp;#039;cap_net_bind_service=+ep&amp;#039; /opt/gogs/gogs&lt;br /&gt;
 crontab -e&lt;br /&gt;
 @reboot /sbin/setcap &amp;#039;cap_net_bind_service=+ep&amp;#039; /opt/gogs/gogs&lt;br /&gt;
&lt;br /&gt;
  chown -R gogs:gogs /opt/gogs/log&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p -e &amp;quot;create database gogs character set utf8 collate utf8_bin&amp;quot;&lt;br /&gt;
 mysql -u root -p -e &amp;quot;grant all privileges on gogs.* to gogs@localhost identified by &amp;#039;hyU6N#6d&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/gogs-repositories&lt;br /&gt;
 chown -R gogs:gogs /opt/gogs-repositories&lt;br /&gt;
Alte Kernel löschen&lt;br /&gt;
 package-cleanup --oldkernels --count=1&lt;br /&gt;
Apache2&lt;br /&gt;
 yum -y install httpd&lt;br /&gt;
 systemctl enable httpd.service&lt;br /&gt;
 nano /etc/httpd/conf/httpd.conf&lt;br /&gt;
 &amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
    RewriteEngine On&lt;br /&gt;
    RewriteCond %{HTTPS} !=on&lt;br /&gt;
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]&lt;br /&gt;
&lt;br /&gt;
 systemctl start httpd&lt;br /&gt;
&lt;br /&gt;
Lets Encrypt&lt;br /&gt;
 yum -y install yum-utils&lt;br /&gt;
 yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional&lt;br /&gt;
 yum update&lt;br /&gt;
 yum install certbot&lt;br /&gt;
 systemctl stop httpd&lt;br /&gt;
 systemctl stop gogs&lt;br /&gt;
 certbot certonly&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Saving debug log to /var/log/letsencrypt/letsencrypt.log&lt;br /&gt;
&lt;br /&gt;
How would you like to authenticate with the ACME CA?&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
1: Spin up a temporary webserver (standalone)&lt;br /&gt;
2: Place files in webroot directory (webroot)&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
Select the appropriate number [1-2] then [enter] (press &amp;#039;c&amp;#039; to cancel): 1&lt;br /&gt;
Plugins selected: Authenticator standalone, Installer None&lt;br /&gt;
Enter email address (used for urgent renewal and security notices) (Enter &amp;#039;c&amp;#039; to&lt;br /&gt;
cancel): admin@zniltest.de&lt;br /&gt;
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
Please read the Terms of Service at&lt;br /&gt;
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must&lt;br /&gt;
agree in order to register with the ACME server at&lt;br /&gt;
https://acme-v01.api.letsencrypt.org/directory&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
(A)gree/(C)ancel: A&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
Would you be willing to share your email address with the Electronic Frontier&lt;br /&gt;
Foundation, a founding partner of the Let&amp;#039;s Encrypt project and the non-profit&lt;br /&gt;
organization that develops Certbot? We&amp;#039;d like to send you email about EFF and&lt;br /&gt;
our work to encrypt the web, protect its users and defend digital rights.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
(Y)es/(N)o: n&lt;br /&gt;
Please enter in your domain name(s) (comma and/or space separated)  (Enter &amp;#039;c&amp;#039;&lt;br /&gt;
to cancel): git.zniltest.de&lt;br /&gt;
Obtaining a new certificate&lt;br /&gt;
Performing the following challenges:&lt;br /&gt;
tls-sni-01 challenge for git.zniltest.de&lt;br /&gt;
Waiting for verification...&lt;br /&gt;
Cleaning up challenges&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTES:&lt;br /&gt;
 - Congratulations! Your certificate and chain have been saved at:&lt;br /&gt;
   /etc/letsencrypt/live/git.zniltest.de/fullchain.pem&lt;br /&gt;
   Your key file has been saved at:&lt;br /&gt;
   /etc/letsencrypt/live/git.zniltest.de/privkey.pem&lt;br /&gt;
   Your cert will expire on 2018-03-07. To obtain a new or tweaked&lt;br /&gt;
   version of this certificate in the future, simply run certbot&lt;br /&gt;
   again. To non-interactively renew *all* of your certificates, run&lt;br /&gt;
   &amp;quot;certbot renew&amp;quot;&lt;br /&gt;
 - Your account credentials have been saved in your Certbot&lt;br /&gt;
   configuration directory at /etc/letsencrypt. You should make a&lt;br /&gt;
   secure backup of this folder now. This configuration directory will&lt;br /&gt;
   also contain certificates and private keys obtained by Certbot so&lt;br /&gt;
   making regular backups of this folder is ideal.&lt;br /&gt;
 - If you like Certbot, please consider supporting our work by:&lt;br /&gt;
&lt;br /&gt;
   Donating to ISRG / Let&amp;#039;s Encrypt:   https://letsencrypt.org/donate&lt;br /&gt;
   Donating to EFF:                    https://eff.org/donate-le&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 chown -R gogs:gogs /etc/letsencrypt/&lt;br /&gt;
&lt;br /&gt;
 nano /etc/gogs/conf/app.ini&lt;br /&gt;
 [server]&lt;br /&gt;
 PROTOCOL = https&lt;br /&gt;
 HTTP_PORT = 443&lt;br /&gt;
 CERT_FILE = /etc/letsencrypt/live/git.zniltest.de/fullchain.pem&lt;br /&gt;
 KEY_FILE = /etc/letsencrypt/live/git.zniltest.de/privkey.pem&lt;br /&gt;
&lt;br /&gt;
 systemctl start gogs&lt;br /&gt;
 &lt;br /&gt;
 mkdir /opt/gogs-repositories&lt;br /&gt;
 chown -R gogs:gogs /opt/gogs-repositories&lt;/div&gt;</summary>
		<author><name>BLinz</name></author>
	</entry>
</feed>