In today’s digital age, privacy and security are paramount for internet users. The Tor Browser is a powerful tool that offers anonymity and privacy by routing your internet connection through a distributed network of relays. This guide provides a step-by-step approach to installing Tor Browser on CentOS and Fedora, two popular Linux distributions known for their robustness and stability.
Installing Tor Browser on CentOS and Fedora systems can greatly enhance your internet privacy and security. Tor, short for The Onion Router, encrypts and routes your internet traffic through a worldwide network of relays and tunnels, making it difficult to track your internet activity. This guide will walk you through the steps to install Tor Browser on CentOS and Fedora Linux distributions.
Prerequisites
Before proceeding with the installation, ensure you have:
- A computer running CentOS or Fedora.
- Sudo privileges or access to the root account.
- An internet connection to download the necessary files.
Step 1: Update Your System
Before installing any new software, it’s a good practice to update your system’s package repository. This ensures you have the latest security patches and dependencies. Open a terminal and run the following command:
sudo dnf update
Step 2 : Configure DNF Repository
The Tor development team provides an official yum repository for the Tor browser installation. You can find the latest available packages by visiting rpm.torproject.org.
First, configure the EPEL repository on your system.
sudo dnf install epel-release -y
Now, create a new file /etc/yum.repos.d/torbrowser.repo and edit in a text editor:
sudo nano /etc/yum.repos.d/torbrowser.repo
Add one of the below configurations as per your Linux distribution.
- On CentOS and RHEL systems:
[Tor] name=Tor for Enterprise Linux $releasever - $basearch baseurl=https://rpm.torproject.org/centos/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://rpm.torproject.org/centos/public_gpg.key cost=100
- On Fedora systems:
[Tor] name=Tor for Fedora $releasever - $basearch baseurl=https://rpm.torproject.org/fedora/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://rpm.torproject.org/fedora/public_gpg.key cost=100
Save the file and close it.
Step 3: Installing Tor Browser
You have successfully added the Tor browser repository to your system. Next use the DNF command to install Tor Browser on your CentOS, RHEL, or Fedora system:
sudo dnf install tor
Press ‘y’ for any confirmation prompted by the installer.
Step 4: First Run and Connection
Upon launching Tor Browser for the first time, you will encounter the connection window. Most users can select “Connect” directly to establish a connection with the Tor network. Users in countries with internet censorship or those requiring proxy settings can select “Configure” to customize their connection settings.
Conclusion
By following these steps, you have successfully installed Tor Browser on your CentOS or Fedora system, providing you with a secure and private browsing experience. Tor Browser is an essential tool for anyone looking to protect their online privacy and navigate the internet anonymously. Remember, no tool can provide 100% anonymity, but Tor Browser significantly enhances your internet privacy and security.
10 Comments
http://deb.torproject.org/torproject.org/rpm/ is a dead link, can you please update your article and let know what is alternative? I think that it may be: https://rpm.torproject.org/
@STEPHEN WESTMAN, @PURAB
[tor]
name=Tor repo
enabled=0
baseurl=https://deb.torproject.org/torproject.org/rpm/DISTRIBUTION/$basearch/
gpgcheck=1
gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc
Please change enabled from 1 to 0 as my above text. It will work
When i am start tor , it gives an error like below,
[john@localhost ~]$ tor
Jul 25 19:28:53.021 [notice] Tor 0.3.5.8 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1c, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.0.
Jul 25 19:28:53.021 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jul 25 19:28:53.022 [warn] Tor was compiled with zstd 1.3.8, but is running with zstd 1.4.0. For safety, we’ll avoid using advanced zstd functionality.
Jul 25 19:28:53.029 [notice] Read configuration file “/etc/tor/torrc”.
Jul 25 19:28:53.052 [notice] Opening Socks listener on 127.0.0.1:9050
Jul 25 19:28:53.052 [notice] Opened Socks listener on 127.0.0.1:9050
Jul 25 19:28:53.052 [warn] Directory /run/tor cannot be read: Permission denied
Jul 25 19:28:53.052 [warn] Before Tor can create a control socket in “/run/tor/control”, the directory “/run/tor” needs to exist, and to be accessible only by the user and group account that is running Tor. (On some Unix systems, anybody who can list a socket can connect to it, so Tor is being careful.)
Jul 25 19:28:53.052 [notice] Closing partially-constructed Socks listener on 127.0.0.1:9050
Jul 25 19:28:53.052 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Jul 25 19:28:53.052 [err] Reading config failed–see warnings above.
[john@localhost ~]$
Not working
This is not worked for me…
Loaded plugins: fastestmirror, langpacks
http://deb.torproject.org/torproject.org/rpm/el/6/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 – Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
I installed the repository script included at
https://tecadmin.net/install-tor-browser-in-centos-rhel-and-fedora/
When I ran it, I got the following error message from yum:
“http://deb.torproject.org/torproject.org/rpm/el/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404 Not Found”
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: Tor. Please verify its path and try again”
I went to http://deb.torproject.org/torproject.org and found no “xml” subdirectory there. I wasn’t sure what the subdirectory should be out of the many subfolders there on the site.
Is it possible to get the correct URL for the repo to put into the file?
Thanks
Hello, please guide me that what I have to do exactly in step one?
And please create a tutorial for how to install Tor Service (Not Tor browser) in Fedora. thanks.
NOTE: My English is not good. sorry.
I also encountered same issue as @PAUL MCPHOY
Thanks fot this tutorial Rahul. I followed all 3 steps with success but I dont see the tor browser opening, it just shows success in the terminal where I ran tor. I’m uing a 64 bit machine . i don’t if that’s the reason . here
here is the output when i type tor at the terminal:
[mac5@centos-test ~]$ if eth0
> ^C
[mac5@centos-test ~]$ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)
[mac5@centos-test ~]$ ifup eth0
Users cannot control this device.
[mac5@centos-test ~]$ sudo ifup eth0
[sudo] password for mac5:
mac5 is not in the sudoers file. This incident will be reported.
[mac5@centos-test ~]$ sudo -i
[sudo] password for mac5:
mac5 is not in the sudoers file. This incident will be reported.
You have new mail in /var/spool/mail/mac5
[mac5@centos-test ~]$ su
Password:
[root@centos-test mac5]# ifup eth0
Determining IP information for eth0… done.
[root@centos-test mac5]# ifconfig
eth0 Link encap:Ethernet HWaddr D0:27:88:06:6A:E4
inet addr:192.168.0.107 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::d227:88ff:fe06:6ae4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3830 (3.7 KiB) TX bytes:6673 (6.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1800 (1.7 KiB) TX bytes:1800 (1.7 KiB)
[root@centos-test mac5]# rpm -q vnc-server
package vnc-server is not installed
[root@centos-test mac5]# yum install vnc-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink | 26 kB 00:00
* base: centos.hyve.com
* epel: epel.check-update.co.uk
* extras: centos.hyve.com
* updates: centos.hyve.com
Tor | 2.9 kB 00:00
adobe-linux-x86_64 | 951 B 00:00
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package tigervnc-server-module.x86_64 0:1.1.0-8.el6_5 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
tigervnc-server-module x86_64 1.1.0-8.el6_5 updates 291 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 291 k
Installed size: 827 k
Is this ok [y/N]: y
Downloading Packages:
tigervnc-server-module-1.1.0-8.el6_5.x86_64.rpm | 291 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-server-module-1.1.0-8.el6_5.x86_64 1/1
Verifying : tigervnc-server-module-1.1.0-8.el6_5.x86_64 1/1
Installed:
tigervnc-server-module.x86_64 0:1.1.0-8.el6_5
Complete!
[root@centos-test mac5]# rpm -q vnc
package vnc is not installed
[root@centos-test mac5]# yum install vnc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.hyve.com
* epel: epel.check-update.co.uk
* extras: centos.hyve.com
* updates: centos.hyve.com
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package tigervnc.x86_64 0:1.1.0-8.el6_5 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
tigervnc x86_64 1.1.0-8.el6_5 updates 258 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 258 k
Installed size: 644 k
Is this ok [y/N]: y
Downloading Packages:
tigervnc-1.1.0-8.el6_5.x86_64.rpm | 258 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-1.1.0-8.el6_5.x86_64 1/1
Verifying : tigervnc-1.1.0-8.el6_5.x86_64 1/1
Installed:
tigervnc.x86_64 0:1.1.0-8.el6_5
Complete!
[root@centos-test mac5]# yum groupinstall Desktop
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.hyve.com
* epel: mirror.vorboss.net
* extras: centos.hyve.com
* updates: centos.hyve.com
Setting up Group Process
Checking for new repos for mirrors
epel/group_gz | 237 kB 00:00
Package nautilus-2.28.4-19.el6.x86_64 already installed and latest version
Package 1:control-center-2.28.1-39.el6.x86_64 already installed and latest version
Package gvfs-smb-1.4.3-16.el6_5.x86_64 already installed and latest version
Package xdg-user-dirs-gtk-0.8-7.el6.x86_64 already installed and latest version
Package gnome-power-manager-2.28.3-7.el6_4.x86_64 already installed and latest version
Package alsa-plugins-pulseaudio-1.0.21-3.el6.x86_64 already installed and latest version
Package at-spi-1.28.1-2.el6.centos.x86_64 already installed and latest version
Package 1:gdm-2.30.4-52.el6.x86_64 already installed and latest version
Package notification-daemon-0.5.0-1.el6.x86_64 already installed and latest version
Package 1:NetworkManager-0.8.1-66.el6.x86_64 already installed and latest version
Package 1:NetworkManager-gnome-0.8.1-66.el6.x86_64 already installed and latest version
Package polkit-gnome-0.96-3.el6.x86_64 already installed and latest version
Package gnome-session-2.28.0-18.el6.x86_64 already installed and latest version
Package gnome-terminal-2.31.3-8.el6.x86_64 already installed and latest version
Package gnome-panel-2.30.2-15.el6.x86_64 already installed and latest version
Package gvfs-fuse-1.4.3-16.el6_5.x86_64 already installed and latest version
Package metacity-2.28.0-23.el6.x86_64 already installed and latest version
Package gnome-screensaver-2.28.3-28.el6.x86_64 already installed and latest version
Package yelp-2.28.1-17.el6_3.x86_64 already installed and latest version
Package 1:dbus-1.2.24-7.el6_3.x86_64 already installed and latest version
Package gvfs-archive-1.4.3-16.el6_5.x86_64 already installed and latest version
Package 1:gdm-user-switch-applet-2.30.4-52.el6.x86_64 already installed and latest version
Package 1:control-center-extra-2.28.1-39.el6.x86_64 already installed and latest version
Package eog-2.28.2-4.el6.x86_64 already installed and latest version
Package gnome-packagekit-2.28.3-7.el6.x86_64 already installed and latest version
Package gok-2.28.1-5.el6.x86_64 already installed and latest version
Package gnome-media-2.29.91-6.el6.x86_64 already installed and latest version
Package gnome-vfs2-smb-2.24.2-6.el6.x86_64 already installed and latest version
Package openssh-askpass-5.3p1-94.el6.x86_64 already installed and latest version
Package pulseaudio-module-x11-0.9.21-14.el6_3.x86_64 already installed and latest version
Package pulseaudio-module-gconf-0.9.21-14.el6_3.x86_64 already installed and latest version
Package 1:gnome-applets-2.28.0-7.el6.centos.x86_64 already installed and latest version
Package orca-2.28.2-1.el6.x86_64 already installed and latest version
Package vino-2.28.1-9.el6_4.x86_64 already installed and latest version
Package 1:gdm-plugin-fingerprint-2.30.4-52.el6.x86_64 already installed and latest version
Warning: Group basic-desktop does not have any packages.
No packages in any requested group available to install or update
[root@centos-test mac5]# useradd Larry
[root@centos-test mac5]# useradd moe
[root@centos-test mac5]# useradd curly
[root@centos-test mac5]# passwd larry
passwd: Unknown user name ‘larry’.
[root@centos-test mac5]# useradd larry
[root@centos-test mac5]# passwd larry
Changing password for user larry.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
Sorry, passwords do not match.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@centos-test mac5]# passwd moe
Changing password for user moe.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@centos-test mac5]# passwd curly
Changing password for user curly.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@centos-test mac5]# nano /etc/sysconfig/vncservers,
[root@centos-test mac5]# nano /etc/sysconfig/vncservers
[root@centos-test mac5]# ls /etc/sysconfig/
atd init network rsyslog
auditd ip6tables networking samba
authconfig ip6tables-config network-scripts sandbox
autofs ip6tables.old nfs saslauthd
cbq iptables nspluginwrapper selinux
cgconfig iptables-config ntpd smartmontools
cgred.conf iptables.old ntpdate sshd
clock irqbalance openct sysstat
console kdump prelink sysstat.ioconf
cpuspeed kernel quota_nld system-config-firewall
crond keyboard raid-check system-config-firewall.old
firstboot mcelogd readahead system-config-users
grub modules readonly-root udev
i18n netconsole rngd wpa_supplicant
[root@centos-test mac5]# nano /etc/sysconfig/vncservers
[root@centos-test mac5]# su larry
[larry@centos-test mac5]$ vnc passwd
bash: vnc: command not found
[larry@centos-test mac5]$ vncpasswd
bash: vncpasswd: command not found
[larry@centos-test mac5]$ logout
bash: logout: not login shell: use `exit’
[larry@centos-test mac5]$ exit
exit
[root@centos-test mac5]#
[root@centos-test mac5]# su – larry
[larry@centos-test ~]$ vncpasswd
-bash: vncpasswd: command not found
[larry@centos-test ~]$ tor
Jul 15 16:39:24.732 [notice] Tor v0.2.4.22 (git-2ee56e4c2c841a45) running on Linux with Libevent 1.4.13-stable and OpenSSL 1.0.1e-fips.
Jul 15 16:39:24.734 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jul 15 16:39:24.752 [notice] Read configuration file “/etc/tor/torrc”.
Jul 15 16:39:24.756 [notice] Opening Socks listener on 127.0.0.1:9050
Jul 15 16:39:24.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Jul 15 16:39:24.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Jul 15 16:39:24.000 [notice] We were built to run on a 64-bit CPU, with OpenSSL 1.0.1 or later, but with a version of OpenSSL that apparently lacks accelerated support for the NIST P-224 and P-256 groups. Building openssl with such support (using the enable-ec_nistp_64_gcc_128 option when configuring it) would make ECDH much faster.
Jul 15 16:39:25.000 [notice] Bootstrapped 5%: Connecting to directory server.
Jul 15 16:39:25.000 [notice] Bootstrapped 10%: Finishing handshake with directory server.
Jul 15 16:39:26.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection.
Jul 15 16:39:26.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus.
Jul 15 16:39:26.000 [notice] Bootstrapped 25%: Loading networkstatus consensus.
Jul 15 16:39:27.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus.
Jul 15 16:39:27.000 [notice] Bootstrapped 40%: Loading authority key certs.
Jul 15 16:39:27.000 [notice] Bootstrapped 45%: Asking for relay descriptors.
Jul 15 16:39:27.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/5925, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of exit bw.)
Jul 15 16:39:27.000 [notice] Bootstrapped 50%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 51%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 53%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 55%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 57%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 58%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 60%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 62%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 64%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 66%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 67%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 69%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 70%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 72%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 73%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 75%: Loading relay descriptors.
Jul 15 16:39:28.000 [notice] Bootstrapped 77%: Loading relay descriptors.
Jul 15 16:39:30.000 [notice] We now have enough directory information to build circuits.
Jul 15 16:39:30.000 [notice] Bootstrapped 80%: Connecting to the Tor network.
Jul 15 16:39:30.000 [notice] Bootstrapped 90%: Establishing a Tor circuit.
Jul 15 16:39:31.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Jul 15 16:39:31.000 [notice] Bootstrapped 100%: Done.