How to uninstall gitlab from local ubuntu 14.04 server - gitlab

Can you please help me to uninstall gitlab. i deleted the /home/gitlab but it still open up when i browse to my hostname.
Thank you.

This worked on ubuntu 16.04
sudo apt-get remove gitlab-ce
sudo rm -rf /var/opt/gitlab
--kill all process live
sudo pkill -f gitlab
-- Remove paths
sudo rm -rf /opt/gitlab
sudo rm -rf /etc/gitlab
rm -rf /var/opt/gitlab

Stop the gitlab service. Try doing.
sudo apt-get remove gitlab-ce
Then remove gitlab files from the system. Some files are in /etc directory.
Have a look at the official documentation.

uninstall Gitlab:
1- Stop the gitlab service
Command : sudo gitlab-ctl stop
2- Start commonde of service facility
command : sudo gitlab-ctl uninstall
3- Delete the package of gitlab
command : Locat gitlab
4- restart machine

Related

Completely remove Kubernetes on debian machine

I want to remove Kubernetes from a Debian machine (I didn't do the setup)
I followed the instructions from How to completely uninstall kubernetes
kubeadm reset
sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*
sudo apt-get autoremove
sudo rm -rf ~/.kube
But it seems to be still installed:
# which kubeadm
/usr/local/bin/kubeadm
# which kubectl
/usr/local/bin/kubectl
# which kubelet
/usr/local/bin/kubelet
Also, apt list --installed | grep kube* does not return anything, so it make me think it was not installed via apt
Do you know how to clean this machine ? Should I just rm /usr/local/bin/kubectl etc ? I don't really like this idea..
Thanks for help
The method suggested by Rib47 on the answer you indicated is correct to completely remove and clean Kubernetes installed with apt-get.
As mentioned by underscore_d, /usr/local/bin/ isn't the directory where the packages installed by apt-get are placed.
For example, when you install kubectl using apt-get, it's placed on /usr/bin/kubectl and that's what is going to be removed by apt-get purge.
I tested it on my kubeadm cluster lab and I don't have these files at /usr/local/bin/.
You have to revisit all the steps you followed during the install process to know how exactly these files got there.
If you run kubeadm reset, I would say it's safe to remove these files. I suggest you to check if they are being used before removing using the command fuser. This command might not be installed in your linux and you can install it by running sudo apt-get install psmisc. After installing you can run it as in this example:
$ sudo fuser /usr/bin/kubelet
/usr/bin/kubelet: 21167e
It means this file is being used by process number 21167.
Checking this process we can see what's using it:
$ ps -aux | grep 21167
root 21167 4.1 0.5 788164 88696 ? Ssl 08:50 0:07 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.2
If the files related to kubernetes you have under /usr/local/bin/ are not in use, I would remove them with no worries.

Failed to install gitlab-runner: Init already exists

I installed gitlab-runner via sudo apt install gitlab-runner, configured it according to the tutorial and it worked well.
Now I want to change the user of the gitlab-runner. So I stop the service with service gitlab-runner stop and try to change the user via
sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
I get following error message:
FATAL: Failed to install gitlab-runner: Init already exists: /etc/systemd/system/gitlab-runner.service
How to proceed?
Rename the init file with
sudo mv /etc/systemd/system/gitlab-runner.service /etc/systemd/system/gitlab-runner.service.bak
and execute again
sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
cleanup the backup file
sudo rm /etc/systemd/system/gitlab-runner.service.bak
Finally you can start the runner again with service gitlab-runner start.
You can simply remove this file:
rm /etc/systemd/system/gitlab-runner.service
Or:
gitlab-runner uninstall
And then install gitlab-runner again.

Setting wordpress in a VM with ubuntu

Some time ago a friend of mine configured me a VM Ubuntu built to allow me construct a Wordpress site through SSH... given some technical issues I had to delete the VM and Im trying to remake one, I already know how to set the wordpress through SSH but not how to configure the VM so It can LET me do it (I tried making one but it doesnt have the same folders like WWW inside /var)
I guess you're trying to deploy wordpress on a LAMP stack.
There are some prerequisites:
open your terminal and
run this commands to install the server:
sudo apt-get update && apt-get upgrade
​sudo apt-get install lamp-server^
run this commands to install php:
sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-cli php7.0-cgi php7.0-gd
Then you have to create a database like this:
CREATE DATABASE wpdb;
​GRANT ALL PRIVILEGES ON wpdb.* TO 'USERNAME'#'localhost' IDENTIFIED BY 'ADMIN_PASSWORD';
​FLUSH PRIVILEGES;
​EXIT;
and finally get and install wordpress:
wget -c http://wordpress.org/latest.tar.gz
​​tar -xzvf latest.tar.gz
sudo mv wordpress /var/www/html
sudo chown -R www-data:www-data /var/www/html/wordpress
​ sudo chmod -R 755 /var/www/html/wordpress
and rename the config file
cd /var/www/html/wordpress
​ sudo mv wp-config-sample.php wp-config.php
restart the server:
sudo systemctl restart apache2.service
​ sudo systemctl restart mysql.service
and voila', wordpress is ready to be served

Change gitlab repository location

I'm running Gitlab 8.9.4 CE Omnibus on Ubuntu server 14.04 a DigitalOcean droplet with a block storage volume formatted and mounted at /mnt/volume-fra1-01-part1 I have created a subdirectory git-data (0755 git:git) on the volume and I want Gitlab to use that as its git repository location.
I have followed the instructions here to update the Ruby variable, but changing it and running gitlab-ctl reconfigure has no effect. My /etc/gitlab/gitlab.rb file looks like this:
external_url "<my URL here>"
git_data_dirs({"default" => "/mnt/volume-fra1-01-part1/git-data"})
gitlab_rails['lfs_enabled'] = true
gitlab_rails['lfs_storage_path'] = "/mnt/volume-fra1-01-part1/gitlab-lfs-objects"
The git LFS settings work OK, so it definitely reads the config file.
Any ideas what I might have missed?
I had a similar case just recently. I am using Ubuntu server 16.04 LTS and my hard-driver is mounted under /mnt/sdb.
sudo gitlab-ctl reconfigure gave me permission error.
I used the following command and it fixed the issue:
sudo chmod 755 /mnt/sdb
Here are the complete steps:
sudo gedit /etc/gitlab/gitlab.rb -> git_data_dirs({"default" => "/mnt/sdb/gitlab/git-data"})
sudo chmod 755 /mnt/sdb
sudo gitlab-ctl reconfigure
sudo gitlab-ctl stop
sudo rsync -av /var/opt/gitlab/git-data/repositories /mnt/sdb/gitlab/git-data/
sudo gitlab-ctl upgrade
sudo ls -l /mnt/sdb/gitlab/git-data/
sudo gitlab-ctl start
Hope that helps.

How can I remove jenkins completely from linux

I have deleted jenkins all directories from different folders. But still when I access URL it is showing me jenkins login.
I want to uninstall jenkins completely. Have tried many commands from internet but still jenkins is there on server.
I have only command line access via putty so I tries whatever is possible via command to remove jenkins.
If your jenkins is running as service instead of process you should stop it first using
sudo service jenkins stop
After stopping it you can follow the normal flow of removing it using commands respective to your linux flavour
For centos it will be
sudo yum remove jenkins
For ubuntu it will
sudo apt-get remove --purge jenkins
I hope this will solve your issue.
if you are ubuntu user than try this:
sudo apt-get remove jenkins
sudo apt-get remove --auto-remove jenkins
'apt-get remove' command is use to remove package.
On Centos7,
It is important to note that while you remove jenkins using following command:
sudo yum remove jenkins
it will not remove your users and other information. For that you will have to do following:
sudo rm -r /var/lib/jenkins
First - stop Jenkins service:
sudo service jenkins stop
Next - delete:
sudo apt-get remove --purge jenkins
If you used separate server for Jenkins, some GCP or AWS - just delete this server.
Here is a video how to uninstall Jenkins from GCP Compute Engine https://youtu.be/D2HUFAc_Trw
For sentOs, it's works for me
At first stop service by sudo service jenkins stop
Than remove by sudo yum remove jenkins
I had installed Jenkins using snap and I completely forgot.
so if there is anyone out there who has tried all these steps and still gets Jenkins sign-in page try this thread.
https://stackoverflow.com/a/49695931/9854536

Resources