LoginSignup
0
0

More than 5 years have passed since last update.

Log of preparation for Setup GitLab...

Posted at

A memorandum for installation GitLab :-D

Server Setup

Apache and ssl

# yum install httpd
# yum install openssl mod_ssl

# cd /etc/httpd/conf
# openssl genrsa -aes128 1024 > server.key
# openssl req -new -key server.key > server.csr

# vim ../conf.d/ssl.conf

- SSLCertificateFile /etc/pki/...
+ SSLCertificateFile /etc/httpd/conf/server.crt

- SSLCertificateKeyFile /etc/pki/...
+ SSLCertificateKeyFile /etc/httpd/conf/server.key 

referenced at http://dotnsf.blog.jp/archives/3181024.html

Setup iptables

Add 80 and 443 port to /etc/sysconfig/iptables

-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT

referenced at http://www.karakaram.com/onamae-com-vps2-iptables

Setup ssh

First, create ssh key pair.

On local machine,
$ ssh-keygen
$ scp ~/.ssh/id_rsa.pub USERNAME@IP_ADDR:/home/USERNAME/pub.key
$ ssh USERNAME@IP_ADDR

On remote machine,
$ mv pub.key .ssh/authorized_keys
$ sudo vim /etc/ssh/sshd_config

-#PubkeyAuthentication yes
+PubkeyAuthentication yes

-PasswordAuthentication yes
+PasswordAuthentication no

referenced at http://ubuntu.u-aizu.ac.jp/004/index.html

Run httpd

$ sudo /etc/init.d/httpd start

Setup GitLab

Install GitLab

Execute the commands that these are descripted as below:
referenced https://about.gitlab.com/downloads/, and http://blog.ybbo.net/2015/03/15/how-to-install-gitlab-to-centos6/

In order to visit GitLab, stop Apache.
We use nginx instead of Apache.
$ sudo /etc/init.d/httpd stop
And then, visit
http://HOSTNAME/

Configuration for SSL

based on http://qiita.com/usutani/items/004328ccffe6a3ee8667

Configuration for Mail

But I changed general user password by Administorator...

First Commit to GitLab

Before proceed this section, I should create project to GitLab.

$ git clone git@FQDN:USERNAME/PROJECTNAME.git
$ cd PROJECTNAME
$ touch README.md
$ git add README.md
$ git commit -m "first commit"
$ git push origin master

Good job!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0