But after saving the changes, the tor does not start up with the following errors on the command line:
[root@vps18483 ~]# sudo service tor start
Raising maximum number of filedescriptors (ulimit -n) to 32768.
Checking if tor configuration is validJan 31 12:54:18.152 [notice] Tor 0.2.9.17 (git-e057a19b74589fca) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1e-fips and Zlib 1.2.3.
Jan 31 12:54:18.152 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jan 31 12:54:18.152 [notice] Read configuration file "/etc/tor/torrc".
Jan 31 12:54:18.155 [warn] Couldn't find $HOME environment variable while expanding "~/.tor"; defaulting to "".
Jan 31 12:54:18.155 [warn] Default DataDirectory is "~/.tor". This expands to "/.tor", which is probably not what you want. Using "/var/tor" instead
Jan 31 12:54:18.155 [warn] /home/admin/web/SITE.pw/public_html/ is not owned by this user (root, 0) but by <unknown> (501). Perhaps you are running Tor as the wrong user?
Jan 31 12:54:18.155 [warn] Checking service directory /home/admin/web/SITE.pw/public_html/ failed.
Jan 31 12:54:18.155 [warn] Failed to parse/validate config: Failed to configure rendezvous options. See logs for details.
Jan 31 12:54:18.155 [err] Reading config failed--see warnings above.
The only explanation that I can give is that, judging by the date the torrc file was modified on 09/22/2018, the old version of TOR from this repository is being installed, which does not yet support V3 addresses. If this is because of this, then how to download the latest version for centos?
[root@vps18483 ~]# yum install epel-release
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: ftp-stud.hs-esslingen.de
* remi: mirror.docker.ru
* remi-php55: mirror.docker.ru
* remi-php56: mirror.docker.ru
* remi-safe: mirror.docker.ru
* remi-test: mirror.docker.ru
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
[root@vps18483 ~]# yum install tor
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: ftp-stud.hs-esslingen.de
* remi: mirror.docker.ru
* remi-php55: mirror.docker.ru
* remi-php56: mirror.docker.ru
* remi-safe: mirror.docker.ru
* remi-test: mirror.docker.ru
Resolving Dependencies
--> Running transaction check
---> Package tor.i686 0:0.2.9.17-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
tor i686 0.2.9.17-1.el6 epel 3.0 M
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package(s)
Total download size: 3.0 M
Installed size: 12 M
Is this ok [y/N]: y
Downloading Packages:
tor-0.2.9.17-1.el6.i686.rpm | 3.0 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tor-0.2.9.17-1.el6.i686 1/1
Verifying : tor-0.2.9.17-1.el6.i686 1/1
Installed:
tor.i686 0:0.2.9.17-1.el6
Complete!
Not sure if this is your issue. try tor --version to see what version of tor you have installed.
tor --version
Tor version 0.4.6.9.
Tor is running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.4 and Glibc 2.31 as libc.
Tor compiled with GCC version 9.3.0
In any case, you can always compile tor from source as described here
Also, not sure if it is a good idea in general to provide a public service with an EOL Operating System. As far as I know, maintenance updates for CentOS 6 have stopped over a year ago. Consider upgrading to something more modern to make sure you and your visitors stay safe.
how to install them? Do you need to download a file, upload it via FTP to the server, and then install it with a command on the command line? (delete the previous version of course)
Please help me how to install on centos
You can ask Google how to install any software from source for your OS. In a nutshell, you will need to make sure you have the correct compiler and dependencies installed (such as libevent, openssl and zlib for tor) and then you execute “make” and “make install”.
If this is too complicated, I recommend to switch to a different OS. Easy to install and current tor packages are for example available for Debian, Ubuntu and Fedora. More information can be found here.
Feb 01 07:16:27.405 [notice] Tor 0.2.9.17 (git-e057a19b74589fca) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1e-fips and Zlib 1.2.3.
Deleted the old version of TOR.
When I tried to uninstall, the server issued these lines, does this mean that these compilers are already installed with me or do I need to install them? How can I check if they are installed on my server? If they are already installed, can you use them to build the latest version of Tor 0.4.6.9?
Please, help.
As I understand it with the right command download on server
This is true? Please help, I don’t know English and I communicate with the help of Google translator, I can’t find in Russian “how to build Tor under Centos 6”
Can you give a link to the instructions for lamers?
[root@vps18483 ~]# ./configure --prefix=/opt/tor-VERSION --sysconfdir=/etc --localstatedir=/var \
> --enable-static-openssl --with-openssl-dir=/opt/openssl \
> --with-tor-user=tor --with-tor-group=tor \
> --enable-lzma --enable-zstd
-bash: ./configure: No such file or directory
[root@vps18483 ~]# make
make: *** No targets specified and no makefile found. Stop.
[root@vps18483 ~]# sudo make install
make: *** No rule to make target `install'. Stop.
[root@vps18483 ~]#
I downloaded and unpacked the new version of Tor, I’m trying to make a configuration before building - nothing comes out, what should I do?
[root@vps18483 ~]# ./configure --prefix=/opt/tor-VERSION --sysconfdir=/etc --localstatedir=/var \
> --enable-static-openssl --with-openssl-dir=/opt/openssl \
> --with-tor-user=tor --with-tor-group=tor \
> --enable-lzma --enable-zstd
-bash: ./configure: No such file or directory
Hi!
CentOS 6 has EOL for a while now, I am not sure you should keep running services there.
Anyway, your error here is that you need to cd to the tor directory before running ./configure .
I agree, but how to find out where the archive was unpacked?
I’m completely lamer, for me to compile a program on a remote server via the command line is something at the level of ancient sorcery.
This needs to be done, as I understand it, with the cd command? Can you help?
Well, are you sure that you want to host a hidden service, then?
If you do not configure it properly, you risk to compromise the security and/or privacy of your service, and of your server.
Yes. There are a few useful commands you should learn:
pwd tells you which is your current directory (and you also see its name in the prompt, ~ means that you are in your home)
ls lists the content of your current directory, of ls path lists the content of paths
cd path you move to a certain path.
But you should however look for a complete guide…
Also, I noticed that you are running a root shell.
You should not, unless you need to run commands that need high privileges.
Compiling a program does not require root privileges, only installing it (make install) usually requires root privileges.
Usually source archives contain a directory in the format programname-version, and tor complies to this rule. So, the archive you downloaded, once extracted, creates a tor-0.4.6.9 directory.
Again, I suggest you to upgrade from CentOS 6 to something more recent, and avoid installing Tor from sources, unless you are ready to keep it updated in case of updates.
Especially security updates.
Also, the configure command will likely fail.
You will need all the dependencies (and their headers) for it to succeed.
# cd tor-0.4.6.9
[root@vps18483 tor-0.4.6.9]
# ./configure --prefix=/opt/tor-VERSION --sysconfdir=/etc --localstatedir=/var \
> --enable-static-openssl --with-openssl-dir=/opt/openssl \
> --with-tor-user=tor --with-tor-group=tor \
> --enable-lzma --enable-zstd
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/tor-0.4.6.9':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
As I understood further, you can not try to do anything, everything is useless?
There, about 10 sites will have to be transferred, the option of moving and updating is not even considered. My server does not contain secret information.
As configure told you, you do not have a C compiler installed on your system.
I am sorry, but I have no experience with CentOS 6, so I cannot help you.