You are not logged in.
Pages: 1
#Symptom: It just exits without any error message right after enter your password.
#Execute to verify the issue:
exo-open /usr/share/applications/synaptic.desktop
#Result should be:
Authorization required, but no authorization protocol specified
Failed to initialize GTK.
Probably you're running Synaptic on Wayland with root permission.
Please restart your session without Wayland, or run Synaptic without root permission
#Then Solution is:
rm .Xauthority
touch .Xauthority
chmod 600 .Xauthority
xauth generate $DISPLAY . trusted
K3S v1.32.5+k3s1 tested on Devuan 5 arm64 and amd64
It works the same as the original script, performs the installation (server/controller or worker/agent node) creates the service and creates uninstall script.
This script should work with Systemd systems or any other SysVinit Debian based distro as well, but I never tried, I kept the Systemd parts in order to make it easier for me to mod it focusing only on what I need change to make it work with SysVinit, if someone else wants to improve this script then please do so.
All the K3S_* environment variables are accepted. you can use them if applicable, the script will run in local mode so the environment variables must be indicated before the install script file as the examples below.
Main server/controller install:
K3S_TOKEN="MySecr3tT0k3n" K3S_ROLE=server FINAL_EXEC_OPTIONS="--cluster-init --bind-address 192.168.1.xxx --write-kubeconfig-mode 644" ./k3s-sysvinit-install.sh
#This will install K3S as server/controller, listen to the address 192.168.1.xxx only (useful when you have more than one IP addresses), will write the config in mode 644 and will use the specified token to create a cluster.
Second server/controller install:
K3S_TOKEN="MySecr3tT0k3n" K3S_ROLE=server FINAL_EXEC_OPTIONS="--server https://192.168.1.xxx:6443 --write-kubeconfig-mode 644" ./k3s-sysvinit-install.sh
#This will install a second (third, etc.) server/controller, will write the config in mode 644 and will use the specified token to join an existing cluster on 192.168.1.xxx
#Server Service:
sudo service k3s status/start/stop/restart
Worker node install:
K3S_TOKEN="MySecr3tT0k3n" K3S_ROLE=agent K3S_URL=https://192.168.1.xxx:6443 ./k3s-sysvinit-install.sh
#This will install K3S in worker mode and will connect to the cluster controller on 192.168.1.xxx:6443 using the specified token.
#Worker Service:
sudo service k3s-agent status/start/stop/restart
Download link:
https://drive.proton.me/urls/4GKT3SBAQC#syB0ofJ2LlSF
Troubleshooting:
If when you execute:
$ k3s kubectl get nodes
You get an error with last text line that says:
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority
Or when when you execute:
$ kubectl get nodes
You get this error that says:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
And when you try to install helm/charts you get this error:
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
This happens because they are trying to communicate with the k3s server/controller without the proper settings/certificate.
Do this to fix it:
mkdir ~/.kube
sudo k3s kubectl config view --raw | tee ~/.kube/config
chmod 600 ~/.kube/config
echo "export KUBECONFIG=~/.kube/config" >> .bashrc
source ~/.bashrc
rev01:
- Added the K3S version tested.
- Added K3S_ROLE=server env. variable, this is not required by the original script but I have notice that having different nodes working as controllers or workers but with the command "sudo service k3s/-agent status" printing just "k3s is running/not running..." on any of them this is prone to errors/mistakes, so now if I specify the role as server or agent for the install then for example the command "sudo service k3s/-agent status" will print "k3s-server is running/not running..." for servers/controller or "k3s-agent is running/not running..." for worker nodes.
Also please notice/remember that the service command remains just "k3s" for server/controller but still "k3s-agent" for workers, that's how k3s works.
- Added the specific example how to install and join a second or third, etc, controller to an existing cluster controller. (yeah, I don't like when other people gives non-clear instructions"
- Added Troubleshooting, fix for "k3s kubectl get nodes" error, "kubectl get nodes" error and "helm connection refused" error.
Kernel version: 6.1.0-18-amd64
Binary file: gitea-1.21.11-linux-amd64
Partition scheme: / 12%, swap 12%, /home -1
Does these matters? I don't know but I have tried this steps only on systems having exactly the same specs like above, so if you get any error message related for example to swap memory and you have only 1GB for swap then I won't know what to tell you but, increase the size for your swap partition and try again.
Update repository
sudo apt -y update
Install git, curl, bash-completion and nano(optional) editor
sudo apt -y install git curl bash-completion nano
Create user for git
sudo adduser \--system \-shell /bin/bash \--gecos 'Git Version Control' \--group \--disabled-password \--home /home/git \git
Install mariadb-server
sudo apt -y install mariadb-server
To secure database execute the command below and (1. skip the root password
but 2. remove anonymous users=Y, and 3. disallow root login remotely=Y,
4. remove test databases=Y and 5. reload privilege tables=Y, done.
sudo mysql_secure_installation
Create database for gitea, change the StrOngPassw0rd value and please
save/write down/remember this password since you will need it to
configure the Gitea server via web.
sudo mysql -u root -p
CREATE DATABASE gitea;
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY "StrOngPassw0rd";
FLUSH PRIVILEGES;
QUIT;
Download gitea linux binary
curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest |grep browser_download_url | cut -d '"' -f 4 | grep '\linux-amd64$' | wget -i -
Change mode to executable and move to destination folder
chmod +x gitea-*-linux-amd64
sudo mv gitea-*-linux-amd64 /usr/local/bin/gitea
Confirm gitea it's installed properly execute
gitea --version
Create directories for gitea setup, yes, I use -R to create new folders also
sudo mkdir -p /etc/gitea /var/lib/gitea/{custom,data,indexers,public,log}
sudo chown -R git:git /var/lib/gitea/{custom,data,indexers,log}
sudo chmod -R 750 /var/lib/gitea/{custom,data,indexers,log}
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea
Download gitea service file and nginx config file
https://drive.proton.me/urls/WPHKAVNY6C#bojwayYgFzWF
Extract gitea service file and nginx conf file
tar -xf gitea-install-devuan5-files.tar.gz
At this point you can and always should inspect the extracted files before to use them
cat gitea.service
cat gitea.conf
You can change the domain name and port for your gitea server on gitea.conf
change listen and server_name values to whatever you want.
Create service for gitea
sudo mv gitea.service /etc/init.d/gitea
Make it executable
sudo chmod +x /etc/init.d/gitea
Update inid.d services
sudo update-rc.d gitea defaults
Start gitea service
sudo service gitea start
Verify that gitea service is running,
valid options: start, stop, status, restart
sudo service gitea status
Install nginx web server
sudo apt -y install nginx
If and only if ufw it's enabled, then:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Create nginx config file for gitea
sudo mv gitea.conf /etc/nginx/conf.d/
Restart nginx service
sudo service nginx restart
Final steps:
1. Open http(s)://localhost on your web browser
2. Type the same password as when you changed it from StrOngPassw0rd to whateveryou changed it to.
3. Change the "Site Title" to whatever you want to name your repository server.
4. Set the email server if you have one, or leave it empty if not.
5. Set the options for Server and Third-Party Service Settings.
6. Set your Administrator Account Settings.
7. Click "Install Gitea".
8. The tea cup animation with the text "Loading..." is displayed, wait.
9. Viola, all done, Gitea Server ready.
Credits to https://computingforgeeks.com/install-g … on-debian/
Adapted to work on Devuan 5 by joser for dev1galaxy.org
Pages: 1