Happy children’s day !! I want go back to 90’s if i can
blow the picture is about git gogs server
next i will intorduce how to use git commod
of course it’s sort of base commod such as you can download code or file from your server
for example github 码云 gogs you also can upload files to the server
ok the first thing you should do is down git/git bash etc as you can input git commod
you also need to study git commod plz go here →
before you start building gogs server plz make sure you have already installed mysql(mariadb) server
plz see my another blog about how to install mariadb server on linux os
ok let’s get to the right point and start installing gogs server
The installation process is as follows
1.add a new user for gogs server unless you want to use root as your first gogs’s user is not safe!!!
2.Download Source Code Compile / Download Precompiled Binary Package
3.Run the installation
4.Configuration adjustment
5.Configure the nginx reverse proxy
6.Keep the service running
Note that by default you have already installed MySQL server (or MariaDB) and nginx. If not,
find out how to install and configure these dependencies. Of course, you can also use the SQLite db.
next we use centos7 as project envirment
【add user】 : useradd git ——-> sudo su git
【Download Source Code Compile】:
cd /home/git/path you mkdir -p dir name/ ——>
yum install wget -y (make sure you have installed wget) ——>
wget https://github.com/gogs/gogs/releases/download/v0.11.43/linux_amd64.tar.gz —–>
tar zxvf linux_amd64.tar.gz —–> cd linux_amd64 —–> ls /home/git/path you mkdir -p dir name/ and you will see blow
custom data gogs LICENSE log public README.md README_ZH.md scripts templates
【Run the installation】
in scripts/mysql.sql ——> mysql -u root -p < scripts/mysql.sql (Requires a password) to initialize the database
Then log in to MySQL to create a new user, gogs, and give the user all rights to the database gogs. commond as blow
$ mysql -u root -p ——->
(输入密码)——->
create user ‘gogs’@’localhost’ identified by ‘密码’; ——->
grant all privileges on gogs.* to ‘gogs’@’localhost’; ——->
flush privileges;——->
exit;
Run 【./gogs web】 to get Gogs up and go to http://server IP:3000/ to install it. Fill in the form and submit it.
It should be noted that the 0.6.9.0903 Beta release has a bug that allows administrators not to be added when the
registration is closed so that no users can log in after the installation is complete. So be sure to specify an
administrator account on the installation screen.
【Configuration adjustment】
The configuration file is located in the custom/conf/app.ini of the Gogs directory and is a text file in INI format.
For detailed configuration explanations and default values, refer to the official documentation. The key configuration
is probably the following.
RUN_USER is git by default, specifying which user Gogs runs
ROOT store root path for all repositories
PROTOCOL Please use http if you use nginx reverse, if you run directly to the outside world
DOMAIN domain name. Affects SSH clone address
ROOT_URL The full root path, which affects the pointing of the links on the page when accessed, and the address of the HTTP clone
HTTP_ADDR listener address. Use nginx to suggest 127.0.0.1, otherwise 0.0.0.0 can also
HTTP_PORT listening port, default 3000
INSTALL_LOCK locks the installation page
Mailer related options
Among them, Mailer can use Mailgun’s free e-mail service to fill Mailgun’s SMTP configuration into configuration.
【Configure the nginx reverse proxy】
plz see my another blog about how to setting nginx server
【Keep the service running】
nohup ./gogs web &
ok These are the things I want to talk about R U Got it ? have any problems plz contract licslan@sina.com