GITLAB installation Challenge on CentOS - gitlab

I installed GITLAB in CentOS 7.4 in cloud environment, I enabled http, hhtps, ssh ports
When I Open the system, I am getting “Apache HTTP server” welcome page not the GIT LAB page, how to fix this?

Your environment maybe came with httpd installed, GitLab by default uses nginx.
You can stop and disable httpd, then restart GitLab
$ sudo systemctl status httpd
$ sudo systemctl stop httpd
$ sudo systemctl disable httpd
$ sudo gitlab-ctl restart

Related

Setting up Apache on Arch Linux

I can't get apache to run on Arch Linux.
I tried ‍‍‍pacman -S apache => systemctl start httpd => systemctl enable httpd but it didn't work.
help me.
update the system db : sudo pacman -Syu
install apache web server : sudo pacman -S apache
enable apache service : sudo systemctl enable httpd and sudo systemctl restart httpd
get the status of Apache service : sudo systemctl status httpd
Archlinux Wiki has a good material about how to set up Apache on Archlinux, you could check it first:
https://wiki.archlinux.org/title/Apache_HTTP_Server

Upgrade to php 7 and apache 2.4 from php 5.3 and apache 2.2 in Amazon EC2

I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).
I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.
I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I'm new to Linux so I'm a bit confused when applying the same on Amazon EC2 instance.
That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.
After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:
Login to your Linux instance and perform the regular system updates first
$ sudo yum update
Stop the running web server
$ sudo service httpd stop
Create backup of the existing httpd by using command:
$ sudo cp -a /etc/httpd /etc/httpd.bak
Remove any existing PHP packages
$ sudo yum remove php*
Remove old web server installs
$ sudo yum remove httpd*
Update yum package repository
$ sudo yum clean all
$ sudo yum upgrade -y
Install Apache 2.4
$ sudo yum install httpd24
Install PHP 7 packages
$ sudo yum install php70 php70-mysqlnd php70-imap php70-pecl-memcache php70-pecl-apcu php70-gd
Install a new version of mod_ssl
$ sudo yum install mod24_ssl
I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.
Finally all I needed to do is start my web server
$ service httpd start
That's it.
Do retain that the solution by MrGoogle will reset any configuration in existence in the hpptd service.
You will probably need to reconfigure some settings...
I had to reconfigure mod_rewrite and .htaccess File for apache:
https://devops.ionos.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/

Why both Jenkins and GitLab are not opening in browser when they are in the same server?

On my Linux server, Jenkins was already installed, and I tried to install GitLab on same server, with following commands:
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.fabcd.com" yum -y install gitlab-ee
It says that GitLab is now installed, but when i open the URL in browser, its not opening and also my Jenkins URL isn't working.
Please help me rollback this GitLab installation as I don't want to mess with my Jenkins.
Both servers exposed in port 8080.
You should change one of it to be different port.
To set the GitLab port, edit the file /etc/gitlab/gitlab.rb
external_port "8888"
Then run reconfigure:
gitlab-ctl reconfigure

Jenkins Amazon Linux Setup

I have setup jenkins on my ec2 instance using the below steps from a tutorial online. I am novice in linux environment and deployments. My problem is that the jenkins dashboard is not showing up in browser at <myIp>:8080/jenkins. Can someone help me out for this.
sudo yum install -y docker nginx git
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
sudo vim /etc/nginx/nginx.conf
Change as below
server {
listen 80;
server_name _;
location /jenkins {
proxy_pass http://127.0.0.1:8080;
}
}
sudo usermod -a -G docker jenkins
sudo service docker start
sudo service jenkins start
sudo service nginx start
sudo chkconfig docker on
sudo chkconfig jenkins on
sudo chkconfig nginx on
I had faced similar problem before, you can check following:
Check security groups of the instance for specific ports
Check IP tables on the instance
Hope that helps

How to auto start elasticsearch in Centos 6.5?

I have installed elasticsearh on a server based on Cent OS 6.5. To start it:
# cd /usr/share/elasticsearch/elasticsearch-1.5.2]
# ./bin/elasticsearch &
But when I close the terminal, the process is killed. How can I set it to automatically start as a service?
Try using the "nohup" command with elastic search.
$ nohup ./bin/elasticsearch
Now what the nohup does? In the following example, it starts the program abcd in the background in such a way that the subsequent logout does not stop it.
$ nohup abcd &
$ exit
Hope that helped.
As #DerStoffel said, you have to start elasticsearch as a service (sudo service elasticsearch start). This is highly recommended in production settings. Also add the service to start in case of reboot (sudo /sbin/chkconfig --add elasticsearch)
It depends the distribution of linux you use:
Debian/Ubuntu
sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start
https://www.elastic.co/guide/en/elasticsearch/reference/1.6/setup-service.html#_debian_ubuntu
RPM based distributions like Centos
sudo /sbin/chkconfig --add elasticsearch
sudo service elasticsearch start
https://www.elastic.co/guide/en/elasticsearch/reference/1.6/setup-service.html#_rpm_based_distributions
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service

Resources