Installing Tor on CentOS

You ask “why?”.


If you have to dig for information parsite any data sources that bear protection from multiple access proxies you collect are very lazy. The Tor-the best option for sloths.

By installing it on your server opens the port 9050 to whom, as to the local proxy, we get the perfect proxy. that changes its output ip every 10 minutes.

Add the repository in yum:

# touch/torproject.repo yum.repos.d/etc/


#/etc/yum.repos.d mcedit/torproject.repo

Insert the following text:
[Tor] name = Tor Project Repo baseurl = $basearch/ = 1 enabled = 1 gpgkey =

name = Tor Project Repo
baseurl = $basearch/
gpgcheck = 1
enabled = 1
gpgkey =


# yum-y install tor

We will check through curl.

Create the file tortest.php with the contents:

Open this page in your browser. Displays the contents of the address should be the line of my IP: see the ip of our server, then rejoice because we have successfully installed the Tor:)

The executable file is/etc/init.d/tor {start | stop | restart}
Or you can work with the service: # service tor start
You can add the autoload: # chkconfig tor on

You can check the Tor and from konsli command:
# curl-socks5 9050
However, many sites will give an error:
curl: (6) Failed to resolve “” for SOCKS5 connect.
For this you need to use a proxy to hide that.
To do this in php scripts to use CURLOPT_FOLLOWLOCATION option or its emulation
Or sometimes it helps to use curl_setopt ($ch, CURLOPT_PROXYTYPE, 7); instead curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);

To improve speed, in more recent versions of Tor became an available option, allowing the use of a chain of one node for the sake of speed (as a proxy server).
Its inclusion in the tor client configuration file should be 0 ExcludeSingleHopRelays option.

But it should be borne in mind that the anonymity of the user falls not only on the grounds that he uses the hosts as a normal odnohopovyj proxy. For odnohopovyh proxy connections will only be used, the exit nodes that 1 AllowSingleHopExits option is enabled.