Last active
October 2, 2019 05:59
-
-
Save AbrarJahin/66554c468709665c6c11389390237c42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Update your CentOS system- | |
| ========================== | |
| sudo yum install epel-release -y && sudo yum update kernel -y && sudo yum update -y && sudo yum upgrade -y && sudo yum install nano net-tools git wget -y && sudo reboot -h now | |
| Ading a User with sudo access- | |
| ============================== | |
| adduser [username] && usermod -aG wheel [username] && passwd [username] && exit | |
| ------------------------------- | |
| ##################################################################################################################### | |
| Details can be found in here- https://www.howtoforge.com/tutorial/how-to-install-and-configure-gitlab-ce-on-centos-7/ | |
| ##################################################################################################################### | |
| Install- | |
| ======== | |
| Required Packages- | |
| ------------------ | |
| sudo yum -y install curl policycoreutils openssh-server openssh-clients postfix && sudo systemctl start sshd && sudo systemctl start postfix && sudo systemctl enable sshd && sudo systemctl enable postfix | |
| Install GitLab- | |
| --------------- | |
| curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash && sudo yum -y install gitlab-ce | |
| ======= (Optional) ======= | |
| Install SSL- | |
| ------------ | |
| sudo yum -y install letsencrypt && sudo letsencrypt certonly --standalone -d <your_website_like_doc.bcc.gov.bd> && sudo mkdir -p /etc/letsencrypt/live/<doc.bcc.gov.bd> && sudo mkdir -p /etc/gitlab/ssl/ && sudo openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048 && sudo chmod 600 /etc/gitlab/ssl/* | |
| ========================== | |
| Configure GitLab URL- | |
| --------------------- | |
| sudo nano /etc/gitlab/gitlab.rb && sudo gitlab-ctl reconfigure | |
| And update `external_url 'http://......'` with this- | |
| =================================================================================== | |
| external_url 'https://doc.bcc.gov.bd' | |
| nginx['redirect_http_to_https'] = true | |
| nginx['ssl_certificate'] = "/etc/letsencrypt/live/doc.bcc.gov.bd/fullchain.pem" | |
| nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/doc.bcc.gov.bd/privkey.pem" | |
| nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams.pem" | |
| =================================================================================== | |
| ##Configure Firewalld- | |
| ---------------------- | |
| sudo yum -y install firewalld && sudo systemctl start firewalld && sudo systemctl enable firewalld && sudo firewall-cmd --permanent --add-service ssh && sudo firewall-cmd --permanent --add-service http && sudo firewall-cmd --permanent --add-service https && sudo firewall-cmd --reload && sudo firewall-cmd --list-all && curl localhost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment