Предложение от 8host.com
Установка Git на FreeBSD 11.0
Система контроля версий – незаменимый инструмент в современной разработке программного обеспечения. Такие системы позволяют управлять программным обеспечением на уровне исходного кода: отслеживать изменения, вернуться к предыдущим этапам разработки, создавать ветки – альтернативные версии файлов и каталогов, и многое другое.
Одной из наиболее популярных систем контроля версий является распределённая система git. Многие проекты хранят файлы в репозиториях git, а сайты GitHub и Bitbucket сделали процесс совместного использования и разработки кода простым и производительным.
Данное руководство поможет установить и настроить git на сервере FreeBSD 11.0. В руководстве описано два метода установки программы, каждый из которых имеет свои преимущества.
Требования
- Сервер FreeBSD 11.
- Пользователь root.
- SSH-ключ для удалённого доступа к серверу; необходимые инструкции можно найти в руководстве Настройка беспарольной аутентификации по SSH на сервере FreeBSD.
Читайте также:
Установка Git из пакетов
Git можно установить с помощью индекса пакетов FreeBSD. Это самый простой способ установки системы.
Обновите индекс репозитория pkg.
Загрузите и установите пакет git:
Чтобы подтвердить установку, нажмите y.
Система контроля версий Git успешно установлена на сервер. После этого можете переходить к настройке Git.
Установка Git из портов
FreeBSD имеет систему портов, с помощью которой также можно управлять пакетами. Для этого используется иерархия файловой системы, так называемое дерево портов, которое категорирует всё программное обеспечение, которое можно собрать с помощью FreeBSD. Оно находится в /usr/ports. Для работы с деревом портов FreeBSD предоставляет инструмент portsnap.
Установка Git из портов займёт больше времени, поскольку этот процесс включает в себя сборку Git и зависимостей из исходного кода. Однако при этом вы получите более гибкую в настройке версию системы.
Сначала загрузите и распакуйте файлы дерева портов в /usr/ports.
sudo portsnap fetch extract
Если вы загрузили файлы дерева портов ранее, обновите их:
sudo portsnap fetch update
Откройте каталог devel/git:
Теперь соберите Git. Если добавить в команду BATCH=»yes», установка Git пройдёт в неинтерактивном режиме. Если вы отите установить программу в интерактивном режиме, просто пропустите BATCH=»yes».
sudo make install clean BATCH=»yes»
Система контроля версий Git успешно установлена на сервер. Теперь можно приступать к настройке.
Настройка Git
Для начала просмотрите текущие настройки Git. Они находятся в файле
Теперь можно обновить настройки. К примеру, вы можете указать имя пользователя с помощью команды:
git config —global user.name «8host»
Также рекомендуется обновить адрес электронной почты:
git config —global user.email «8host@example.com»
Примечание: Вместо 8host и 8host@example.com укажите свои данные.
Настройте текстовый редактор по умолчанию:
git config —global core.editor «vim»
Чтобы убедиться, что новые настройки были добавлены в файл, введите:
git config —list
user.name=8host
user.email=8host@example.com
core.editor=vim
Заключение
Система контроля версий Git успешно установлена на сервер FreeBSD 11.0 и готова к работе.
WillSquire / install_apache_freebsd.md
First navigate to Apache in the ports collection, then install the port at the given location and clean (note Apache version here is 24, this may change in future). For the configuration, selecting the mpm_event_module (async) configuration to compile down with. This handels concurrency better then mpm_worker_module by using a single listener thread, but is also multithreaded (where as mpm_prefork_module is not multithread and instead uses processes). Note that mpm_event_module will change the PHP module used:
To add Apache to startup, edit the rc.conf file with:
Now add the following to the file, save and exit (alternatively, use sudo sysrc apache24_enable=yes command to add this line to the end of the file):
Startup Apache next with the following command, then input the server’s IP address in the web browser to see «It Works» if Apache is successfully working:
Once known it’s working, open up Apache’s configuration file httpd.conf (note again the version in this path may change depending on the Apache version being used):
Change ServerAdmin to an appropriate email address (one that can be sent error messages if anything were to go wrong):
Prevent Apache from outputting the structure of a folder by removing Indexes from Options Indexes FollowSymLinks to look like this:
Optionally change the default DocumentRoot and Directory (which might be located on the next line pending on the version) to the directory in which Apache should serve files from if required (i.e. you might have another layer of files in the directory layer before the public one, in which case /usr/local/www/apache24/data/web might be appropriate):
Note: Future edit will include removal of default apache mods that may not be needed (i.e. Ruby). See «Optimisation setup» and «Planning and configuring a complete server architecture» references in the footer for more.
Save, exit, and restart Apache again for the changes to take effect:
#! /bin/sh | |||||||||||||||||||||||||||||||||||||||||||||
email= » you@example.com » ; | |||||||||||||||||||||||||||||||||||||||||||||
web_root_dir= » /usr/local/www/apache24/data » ; | |||||||||||||||||||||||||||||||||||||||||||||
APACHE_PORT_DIR= » /usr/ports/www/apache24 » ; | |||||||||||||||||||||||||||||||||||||||||||||
APACHE_CNF_DIR= » /usr/local/etc/apache24/httpd.conf » ; | |||||||||||||||||||||||||||||||||||||||||||||
APACHE_DEFAULT_WEB_DIR= » /usr/local/www/apache24/data » ; | |||||||||||||||||||||||||||||||||||||||||||||
RC_CNF_DIR= » /etc/rc.conf » ; | |||||||||||||||||||||||||||||||||||||||||||||
# set_line() | |||||||||||||||||||||||||||||||||||||||||||||
# | |||||||||||||||||||||||||||||||||||||||||||||
# Searches a file for an old string in each line of the file. If the | |||||||||||||||||||||||||||||||||||||||||||||
# old string is found within a line, the entire contents of the line | |||||||||||||||||||||||||||||||||||||||||||||
# gets replaced with a new string. Else (if the old string is not | |||||||||||||||||||||||||||||||||||||||||||||
# found) the new string gets added to the last line of the file. | |||||||||||||||||||||||||||||||||||||||||||||
# | |||||||||||||||||||||||||||||||||||||||||||||
# Uses sed command (BSD version, not GNU) | |||||||||||||||||||||||||||||||||||||||||||||
# @author Will Squire | |||||||||||||||||||||||||||||||||||||||||||||
# | |||||||||||||||||||||||||||||||||||||||||||||
# @example set_line «max_connections =» «max_connections = 501» /var/db/mysql/my.cnf | |||||||||||||||||||||||||||||||||||||||||||||
# | |||||||||||||||||||||||||||||||||||||||||||||
# @param $old_string | |||||||||||||||||||||||||||||||||||||||||||||
# @param $new_string | |||||||||||||||||||||||||||||||||||||||||||||
# @param $file | |||||||||||||||||||||||||||||||||||||||||||||
set_line () < | |||||||||||||||||||||||||||||||||||||||||||||
sed -i ‘ ‘ ‘ /.* ‘ » $1 » ‘ .*/ < | |||||||||||||||||||||||||||||||||||||||||||||
h | |||||||||||||||||||||||||||||||||||||||||||||
s/.*/ ‘ » $2 » ‘ / | |||||||||||||||||||||||||||||||||||||||||||||
> | |||||||||||||||||||||||||||||||||||||||||||||
$ < | |||||||||||||||||||||||||||||||||||||||||||||
x | |||||||||||||||||||||||||||||||||||||||||||||
/^$/ < | |||||||||||||||||||||||||||||||||||||||||||||
s// ‘ » $2 » ‘ / | |||||||||||||||||||||||||||||||||||||||||||||
H | |||||||||||||||||||||||||||||||||||||||||||||
> | |||||||||||||||||||||||||||||||||||||||||||||
x | |||||||||||||||||||||||||||||||||||||||||||||
> ‘ $3 | |||||||||||||||||||||||||||||||||||||||||||||
> | |||||||||||||||||||||||||||||||||||||||||||||
# #################################### | |||||||||||||||||||||||||||||||||||||||||||||
# Installation | |||||||||||||||||||||||||||||||||||||||||||||
# #################################### | |||||||||||||||||||||||||||||||||||||||||||||
# Install Apache if not already installed | |||||||||||||||||||||||||||||||||||||||||||||
if ! pkg info apache24 ; then | |||||||||||||||||||||||||||||||||||||||||||||
# Port’s config file has already been run through. This is the result | |||||||||||||||||||||||||||||||||||||||||||||
# of running the config command (to avoid choosing compile options | |||||||||||||||||||||||||||||||||||||||||||||
# interactively) | |||||||||||||||||||||||||||||||||||||||||||||
cat » MAKEFILE » > «$APACHE_PORT_DIR/Makefile» | |||||||||||||||||||||||||||||||||||||||||||||
# $FreeBSD: head/www/apache24/Makefile 413476 2016-04-16 19:02:48Z ohauer $ | |||||||||||||||||||||||||||||||||||||||||||||
PORTNAME= apache24 | |||||||||||||||||||||||||||||||||||||||||||||
PORTVERSION= 2.4.20 | |||||||||||||||||||||||||||||||||||||||||||||
PORTREVISION= 1 | |||||||||||||||||||||||||||||||||||||||||||||
CATEGORIES= www ipv6 | |||||||||||||||||||||||||||||||||||||||||||||
MASTER_SITES= APACHE_HTTPD | |||||||||||||||||||||||||||||||||||||||||||||
DISTNAME= httpd-$ | |||||||||||||||||||||||||||||||||||||||||||||
DIST_SUBDIR= apache24 | |||||||||||||||||||||||||||||||||||||||||||||
MAINTAINER= apache@FreeBSD.org | |||||||||||||||||||||||||||||||||||||||||||||
COMMENT= Version 2.4.x of Apache web server | |||||||||||||||||||||||||||||||||||||||||||||
LIB_DEPENDS= libexpat.so:textproc/expat2 \ | |||||||||||||||||||||||||||||||||||||||||||||
libapr-1.so:devel/apr1 \ | |||||||||||||||||||||||||||||||||||||||||||||
libpcre.so:devel/pcre | |||||||||||||||||||||||||||||||||||||||||||||
CONFLICTS_INSTALL= caudium14-1.* \ | |||||||||||||||||||||||||||||||||||||||||||||
apache-*-2.2.* apache22-* | |||||||||||||||||||||||||||||||||||||||||||||
USE_APACHE= common24 | |||||||||||||||||||||||||||||||||||||||||||||
USES= autoreconf cpe iconv libtool perl5 tar:bzip2 | |||||||||||||||||||||||||||||||||||||||||||||
USE_PERL5= run | |||||||||||||||||||||||||||||||||||||||||||||
USE_RC_SUBR= apache24 htcacheclean | |||||||||||||||||||||||||||||||||||||||||||||
GNU_CONFIGURE= yes | |||||||||||||||||||||||||||||||||||||||||||||
CPE_VENDOR= apache | |||||||||||||||||||||||||||||||||||||||||||||
CPE_PRODUCT= http_server | |||||||||||||||||||||||||||||||||||||||||||||
PORTDOCS= * | |||||||||||||||||||||||||||||||||||||||||||||
SUB_FILES= pkg-install pkg-deinstall | |||||||||||||||||||||||||||||||||||||||||||||
# XXX: before running makepatch please run the command | |||||||||||||||||||||||||||||||||||||||||||||
# `$SED -e ‘s/PATCH_PATH_SEPARATOR=/PATCH_PATH_SEPARATOR?=/’ Mk/bsd.port.mk | |||||||||||||||||||||||||||||||||||||||||||||
PATCH_PATH_SEPARATOR= __ | |||||||||||||||||||||||||||||||||||||||||||||
# Fallback MPM after switching from static to modular MPM | |||||||||||||||||||||||||||||||||||||||||||||
SUB_LIST+= MPMF=»000_mpm_prefork_fallback.conf» | |||||||||||||||||||||||||||||||||||||||||||||
USERS= www | |||||||||||||||||||||||||||||||||||||||||||||
GROUPS= www | |||||||||||||||||||||||||||||||||||||||||||||
# for slave ports | |||||||||||||||||||||||||||||||||||||||||||||
.if !defined(MASTERDIR) | |||||||||||||||||||||||||||||||||||||||||||||
APACHEDIR= $ | |||||||||||||||||||||||||||||||||||||||||||||
.else | |||||||||||||||||||||||||||||||||||||||||||||
APACHEDIR= $ | |||||||||||||||||||||||||||||||||||||||||||||
.endif | |||||||||||||||||||||||||||||||||||||||||||||
WITH_HTTP_PORT?= 80 | |||||||||||||||||||||||||||||||||||||||||||||
WITH_SSL_PORT?= 443 | |||||||||||||||||||||||||||||||||||||||||||||
.include «$ | |||||||||||||||||||||||||||||||||||||||||||||
.include «$ | |||||||||||||||||||||||||||||||||||||||||||||
# IMPLIES | |||||||||||||||||||||||||||||||||||||||||||||
AUTHN_DBD_IMPLIES= DBD | |||||||||||||||||||||||||||||||||||||||||||||
HEARTBEAT_IMPLIES= WATCHDOG STATUS | |||||||||||||||||||||||||||||||||||||||||||||
HEARTMONITOR_IMPLIES= WATCHDOG STATUS | |||||||||||||||||||||||||||||||||||||||||||||
LBMETHOD_HEARTBEAT_IMPLIES= WATCHDOG STATUS HEARTMONITOR | |||||||||||||||||||||||||||||||||||||||||||||
# MPM | |||||||||||||||||||||||||||||||||||||||||||||
MPM_PREFORK_CONFIGURE_ON= —with-mpm=prefork | |||||||||||||||||||||||||||||||||||||||||||||
MPM_WORKER_CONFIGURE_ON= —with-mpm=worker | |||||||||||||||||||||||||||||||||||||||||||||
MPM_EVENT_CONFIGURE_ON= —with-mpm=event | |||||||||||||||||||||||||||||||||||||||||||||
AUTHNZ_LDAP_CONFIGURE_ON= —enable-authnz-ldap | |||||||||||||||||||||||||||||||||||||||||||||
# http://httpd.apache.org/docs/2.4/bind.html | |||||||||||||||||||||||||||||||||||||||||||||
IPV4_MAPPED_CONFIGURE_ENABLE= v4-mapped | |||||||||||||||||||||||||||||||||||||||||||||
LDAP_CONFIGURE_ON= —enable-ldap=shared | |||||||||||||||||||||||||||||||||||||||||||||
HTTP2_CONFIGURE_ON= —with-nghttp2=$ | |||||||||||||||||||||||||||||||||||||||||||||
HTTP2_LIB_DEPENDS= libnghttp2.so:www/nghttp2 | |||||||||||||||||||||||||||||||||||||||||||||
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit | |||||||||||||||||||||||||||||||||||||||||||||
LUA_CONFIGURE_WITH= lua | |||||||||||||||||||||||||||||||||||||||||||||
LUA_USES= lua | |||||||||||||||||||||||||||||||||||||||||||||
SOCACHE_DC_CONFIGURE_ON= —with-distcache=$ | |||||||||||||||||||||||||||||||||||||||||||||
SOCACHE_DC_LIB_DEPENDS= libdistcache.so:security/distcache | |||||||||||||||||||||||||||||||||||||||||||||
# Note: | |||||||||||||||||||||||||||||||||||||||||||||
# OpenSSL version (base/ports) depends how devel/apr1 was build | |||||||||||||||||||||||||||||||||||||||||||||
# apu-1-config —(includes|ldflags) and apr_rules.mk | |||||||||||||||||||||||||||||||||||||||||||||
SSL_CFLAGS= -I$ | |||||||||||||||||||||||||||||||||||||||||||||
SSL_CONFIGURE_ON= —with-ssl=$ | |||||||||||||||||||||||||||||||||||||||||||||
SSL_LDFLAGS= -L$ | |||||||||||||||||||||||||||||||||||||||||||||
SSL_USE= OPENSSL=yes | |||||||||||||||||||||||||||||||||||||||||||||
.include | |||||||||||||||||||||||||||||||||||||||||||||
ETC_SUBDIRS= Includes envvars.d extra modules.d | |||||||||||||||||||||||||||||||||||||||||||||
APR_CONFIG?= $ | |||||||||||||||||||||||||||||||||||||||||||||
APU_CONFIG?= $ | |||||||||||||||||||||||||||||||||||||||||||||
# APU modules used by AUTHN_DBD DBD | |||||||||||||||||||||||||||||||||||||||||||||
APU_DBD_MYSQL?= $ | |||||||||||||||||||||||||||||||||||||||||||||
APU_DBD_PGSQL?= $ | |||||||||||||||||||||||||||||||||||||||||||||
APU_DBD_SQLITE3?= $ | |||||||||||||||||||||||||||||||||||||||||||||
# APU module used by AUTHNZ_LDAP LDAP | |||||||||||||||||||||||||||||||||||||||||||||
APU_LDAP?= $ | |||||||||||||||||||||||||||||||||||||||||||||
# APU module used by SESSION_CRYPTO | |||||||||||||||||||||||||||||||||||||||||||||
APU_CRYPTO_OPENSSL?= $ | |||||||||||||||||||||||||||||||||||||||||||||
APU_CRYPTO_NSS?= $ | |||||||||||||||||||||||||||||||||||||||||||||
PREFIX_RELDEST= $ | |||||||||||||||||||||||||||||||||||||||||||||
CONFIGURE_ARGS+=—prefix=$ | |||||||||||||||||||||||||||||||||||||||||||||
—enable-layout=FreeBSD \ | |||||||||||||||||||||||||||||||||||||||||||||
—with-port=$ | |||||||||||||||||||||||||||||||||||||||||||||
—with-sslport=$ | |||||||||||||||||||||||||||||||||||||||||||||
—with-expat=$ | |||||||||||||||||||||||||||||||||||||||||||||
—with-iconv=$ | |||||||||||||||||||||||||||||||||||||||||||||
—enable-http \ | |||||||||||||||||||||||||||||||||||||||||||||
—with-pcre=$ | |||||||||||||||||||||||||||||||||||||||||||||
—with-apr=$ | |||||||||||||||||||||||||||||||||||||||||||||
—with-apr-util=$ | |||||||||||||||||||||||||||||||||||||||||||||
CONFIGURE_ENV= LOCALBASE=»$ | |||||||||||||||||||||||||||||||||||||||||||||
CONFIG_SHELL=»$ | |||||||||||||||||||||||||||||||||||||||||||||
MAKE_ENV+= EXPR_COMPAT=yes \ | |||||||||||||||||||||||||||||||||||||||||||||
INSTALL_MAN=»$ | |||||||||||||||||||||||||||||||||||||||||||||
DATADIR=$ | |||||||||||||||||||||||||||||||||||||||||||||
#===================================================== | |||||||||||||||||||||||||||||||||||||||||||||
# CONFIGURE_ARGS will be handled in Makefile.modules, | |||||||||||||||||||||||||||||||||||||||||||||
# here we do only OPTIONS fixups | |||||||||||||||||||||||||||||||||||||||||||||
.if $ | |||||||||||||||||||||||||||||||||||||||||||||
CONFIGURE_ENV+= LUA_CFLAGS=»-I$ | |||||||||||||||||||||||||||||||||||||||||||||
LUA_LIBS=»-L$ | |||||||||||||||||||||||||||||||||||||||||||||
.endif | |||||||||||||||||||||||||||||||||||||||||||||
.if $ | |||||||||||||||||||||||||||||||||||||||||||||
USE_GNOME= libxml2 | |||||||||||||||||||||||||||||||||||||||||||||
.endif | |||||||||||||||||||||||||||||||||||||||||||||
.include | |||||||||||||||||||||||||||||||||||||||||||||
.include «$ | |||||||||||||||||||||||||||||||||||||||||||||
post-extract: | |||||||||||||||||||||||||||||||||||||||||||||
# remove possible leftover .svn directories in the sources | |||||||||||||||||||||||||||||||||||||||||||||
@$ | |||||||||||||||||||||||||||||||||||||||||||||
# limit grep results . | |||||||||||||||||||||||||||||||||||||||||||||
@$ | |||||||||||||||||||||||||||||||||||||||||||||
# make sure the configure script contains our patches, preserve the original script for comparsion | |||||||||||||||||||||||||||||||||||||||||||||
-$ | |||||||||||||||||||||||||||||||||||||||||||||
# make stage-qa script happy, it complains on empty dirs even ‘PORTDOCS=*’ is set | |||||||||||||||||||||||||||||||||||||||||||||
# use RMDIR in case upstream ever place some files into this directories | |||||||||||||||||||||||||||||||||||||||||||||
.for d in xsl/util xsl lang | |||||||||||||||||||||||||||||||||||||||||||||
-$ | |||||||||||||||||||||||||||||||||||||||||||||
.endfor | |||||||||||||||||||||||||||||||||||||||||||||
post-patch: | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
$ | |||||||||||||||||||||||||||||||||||||||||||||
pre-configure:: | |||||||||||||||||||||||||||||||||||||||||||||
@$ | |||||||||||||||||||||||||||||||||||||||||||||
@$ | |||||||||||||||||||||||||||||||||||||||||||||
@$ | |||||||||||||||||||||||||||||||||||||||||||||
# silence autotools | |||||||||||||||||||||||||||||||||||||||||||||
-$ | |||||||||||||||||||||||||||||||||||||||||||||
post-configure: | |||||||||||||||||||||||||||||||||||||||||||||
@FTPUSERS=`$ $ | $ | $ | $ | $ | post-install: | @$ | $ | # place for 3rd party module configuration | $ | # strip returns an error for non binary files, but we have a big mix | -$ | -$ | -$ | post-install-LOG_FORENSIC-on: | $ | # maintainer only, check for new modules | modlist: extract | @$ | | toupper($$8), $$8>’ $ | | $ | | $ | | $ | .include | MAKEFILE | # Download and install | make install distclean -DBATCH -C $APACHE_PORT_DIR ; | fi | # #################################### | # Configuration | # #################################### | # # Set environment variables in rc.conf | set_line » apache24_enable= » ‘ apache24_enable=»YES» ‘ $RC_CNF_DIR ; | # Start Apache if not already running | if ! service apache24 status ; then | service apache24 start ; | fi | # Set Apache variables in httpd.conf | set_line » ServerAdmin » » ServerAdmin $email » $APACHE_CNF_DIR ; # Set admin’s email | sed -i -e ‘ s/Options Indexes FollowSymLinks/Options FollowSymLinks/ ‘ $APACHE_CNF_DIR ; # Remove Indexes directive | sed -i -e ‘ s|DocumentRoot » ‘ $APACHE_DEFAULT_WEB_DIR ‘ «|DocumentRoot » ‘ $web_root_dir ‘ «| ‘ $APACHE_CNF_DIR ; # Set web root directory | sed -i -e ‘ s| ‘ $APACHE_DEFAULT_WEB_DIR ‘ «>| ‘ $web_root_dir ‘ «>| ‘ $APACHE_CNF_DIR ; # Set web root directory | # Restart Apache | sudo apachectl graceful ; | |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Установка github apache freebsd
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Clone with HTTPS
Use Git or checkout with SVN using the web URL.
Downloading
Want to be notified of new releases in chadliu23/Installation-guide-for-GitLab6-on-Freebsd ?
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio
Latest commit
Files
This installation guide was create for and tested on Freebsd 8.3. his is NOT the official installation guide to set up a production server since upstream doesnt support FreeBSD. To set up a development installation or for many other installation options please consult the installation section in the readme.
The GitLab installation consists of setting up the following components:
- Packages / Dependencies
- System Users
- GitLab shell
- Database
- GitLab
- Apache Setup
- Check Installation
install using ports
Create a git user and group for Gitlab:
GitLab Shell is a ssh access and repository management software developed specially for GitLab.
Edit config and replace gitlab_url
edit and make sure that is pointing to /usr/local/bin/redis-cli
Make sure that repos_path is not pointing to a symlink. This could be a case if gitlab is running in a jail. Do setup
Set a password on the anonymous accounts use. (change $password to a real password)
Set a password for the root account. (change $password to a real password)
Create a new user for our gitlab setup ‘gitlab’
Grant the GitLab user necessary permissions on the table.
Quit the database session
Try connecting to the new database with the new user
if you see ‘mysql>’ you are success database setting, quit with \q
edit gitlab.yml carefully and make sure all the setting to match your setup.
change /usr/bin/git => /usr/local/bin/git
change localhost => domain.com
Make sure that repos_path is not pointing to a symlink. This could be a case if gitlab is running in a jail. Make sure GitLab can write to the log/ and tmp/ directories
Create directories for repositories make sure GitLab can write to them
Create directory for satellites
Create directories for sockets/pids and make sure GitLab can write to them
Create public/uploads directory otherwise backup will fail
Copy the example Unicorn config
Uncomment listen «/home/git/gitlab/tmp/sockets/gitlab.socket», :backlog => 64 in unicorn.rb .
Change Listen port (127.0.0.1:8080) to non-use port in unicorn.rb .
Configure Git global settings for git user, useful when editing via web
Copy rack attack middleware config
Uncomment config.middleware.use Rack::Attack in /home/git/gitlab/config/application.rb
Edit «secure password» to real password in config/database.yml
You need to edit Gemfile.lock ( sudo -u git vim Gemfile.lock ) and change the versions
change libv8 to 3.16.14.3 (in two places),
change therubyracer to 0.12.0
change underscore-rails to 1.5.2 (in two places).
You also need to edit Gemfile ( sudo -u git vim Gemfile )
change underscore-rails to 1.5.2.
Initialize Database and Activate Advanced Features
Here is your admin login credentials:
Make GitLab start on boot:
Edit apache httpd.conf in usr/local/etc/apache22/httpd.conf
make sure the files are in the right place
for gitlab apache setting
Double-check environment configuration
Do a thorough check. Make sure everything is green.
The script complained about the init script not being up-to-date don’t worry.
it is your sidkit didn’t start up
if you committed but project page 500, gitlab cannot read your commit log, undefined method `split’ for nil:NilClass
sudo -u git -H git config —global color.ui false
I have ^[[33m before commit and ^[[m at the end of commit, and it cannot parse this.
just remove those tag before process commits
- Getting error while pusing to remote remote: GitLab: You are not allowed to access master! remote: error: hook declined to update refs/heads/master This can be a case if repos_path points to a symlink. (in gitlab and gitlab-shell config files)