Category Archives: Ubuntu

Setting up Ethereum node on Windows 10 and Ubuntu.

After a few attempts I was able to start Ethereum Mist 0.11.1 in ‘fast’ mode on Windows 10:

it downloaded ‘geth’, connected to {“path”:”\\\\.\\pipe\\geth.ipc”} and started to sync, but when sync finished I was unable to send transactions (they were ‘denied’ for some reason).

(more…)

Mining Ethereum on Ubuntu 18.04 with GeForce GTX 1060 3GB

I am not a Linux expert, so it took me some time to configure my mining rig on Ubuntu 18.04 with NVIDIA GeForce GTX 1060 3GB, and I wrote down all the steps I did:

First I installed NVIDIA driver, but OpenCL did not install automatically with it and I installed it manually with the following command:

sudo apt install -y ocl-icd-libopencl1

Then I installed CURL:

sudo apt install -y libcurl3

not ‘curl’ and not ‘libcurl4’ packages, otherwise the miner will fail to start reporting the following error message:

./ethdcrminer64: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./ethdcrminer64)

(more…)

PHP script that saves client IP address to a file.

Below I wrote down a simple PHP script that saves client IP address to a file. If the IP address of your home machine periodically changes, you can store it on a web server once a minute by scheduling a task like this:

sudo crontab -u <user> -e
* * * * * wget -q -O /dev/null -o /dev/null "https://yourwebsite.com/ip.php?rig=rig1&password=XXXXX"

where ip.php is the following PHP script:
(more…)

Setting up Squid proxy on Ubuntu 16.04 to browse blocked websites

Squid 3.5.12 can be installed and tested on Ubuntu 16.04 with the following commands:

sudo apt install squid
service squid start
sudo ufw allow 3128/tcp
wget -e use_proxy=yes -e http_proxy=http://localhost:3128 http://google.com

by default Squid listens on port 3128.

At first, Google Chrome started with Squid proxy from some external IP address:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --proxy-server=http://developernote.com:3128

(more…)

Installing NVIDIA Driver on Ubuntu 16.04 and 18.04

I am not sure if there were NVIDIA drivers when I installed Ubuntu 16.01 on a machine with Intel processor and GTX 1060 graphic card, but at least I saw this in the terminal (it is not clear what actually FAILED):

(more…)

Configuring Postfix with Yandex.ru relay in Ubuntu 16.04

Today I read that Postfix can be better than sendmail and found a great Russian article on how to configure Postfix to work with Yandex.ru relay (Yandex.ru is some kind of Russian Google). The only notice I would give is that in a Docker container I need also install rsyslog, otherwise /var/log/mail.log file is not created:

apt install rsyslog

After doing all the steps described in this Russian manual I was able to send email to Yandex.ru and GMail accounts, but GMail landed all the emails to its spam folder. My first idea was that it is because I did not configure ‘from address’ correctly, so I had the following in /var/log/mail.log, and also there was a message ‘Cannot assign requested address‘:

Oct 27 11:36:19 0675c97b78aa postfix/pickup[1210]: 8C7ECE5B72: uid=0 from=<root>
Oct 27 11:36:19 0675c97b78aa postfix/cleanup[10786]: 8C7ECE5B72: message-id=<20171027113619.8C7ECE5B72@0675c97b78aa.localdomain>
Oct 27 11:36:19 0675c97b78aa postfix/qmgr[1211]: 8C7ECE5B72: from=<root@0675c97b78aa.localdomain>, size=405, nrcpt=2 (queue active)
Oct 27 11:36:19 0675c97b78aa postfix/smtp[10788]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c09::1b]:25: Cannot assign requested address
...

(more…)

Configuring sendmail with GMail relay on Ubuntu 16.04

Previously I published post How I configured sendmail for PHP on Ubuntu Server 12.04 describing how to configure sendmail to use custom SMTP server. But after switching to Ubuntu 16.04 VPS my first idea was that I can use sendmail in its default configuration, but this idea was wrong, because while sendmail worked well with yandex.ru (some Russian mail server), for example, it did not work with GMail, because GMail did not accept the mail reporting ‘DSN: Service unavailable.‘ in /var/log/mail.log, see my post on Ubuntu Forum for more information. Now my second idea is that using GMail as sendmail relay will prevent GMail from rejecting my mail. Below I provided a short instruction on how to realize this successful idea.

Install the packages

apt-get install sendmail mailutils

mailutils allows to run mail command.

(more…)

Compiling the latest version of CMake from sources on Ubuntu

I was unable to add QML resources to a QT Quick application with CMake 2.8 installed on my machine, so I built the latest version of CMake with the following commands:

cd ~/examples
mkdir tools
cd tools
mkdir install
tar -xf ~/Downloads/cmake-3.9.1.tar.gz
cd cmake-3.9.1/
./configure --prefix=/home/dmitry/examples/tools/install/
make -j4
make install

Now my QT application is compiled and run successfully:

~/examples/tools/install/bin/cmake ../../OsgQmlTest/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MODULE_PATH=/home/user/3rdpart/osg/CMakeModules/ -DCMAKE_INSTALL_PREFIX=/home/dmitry/examples/install
make -j4
make install

(more…)

Building OsgQtQuick on Ubuntu 14.04

The following section in OsgQtQuick‘s CMakeLists.txt:

find_package(OpenSceneGraph 3.0 REQUIRED
  osg
  osgQt
  osgDB
  osgGA
  osgManipulator
  osgUtil
  osgViewer
  osgText)

results in CMake searching for FindOpenSceneGraph.cmake file:

strace cmake ../../osgqtquick/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/dmitry/examples/install |& grep -i OpenSceneGraph
access("/home/dmitry/examples/osgqtquick/cmake/FindOpenSceneGraph.cmake", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake", R_OK) = 0
access("/usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake", R_OK) = 0
stat("/usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake", {st_mode=S_IFREG|0644, st_size=7438, ...}) = 0
open("/usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake", O_RDONLY) = 3
read(3, "# - Find OpenSceneGraph\n# This m"..., 8192) = 7438
read(3, "/* -*-c++-*- OpenSceneGraph - Co"..., 4096) = 3495
read(3, "/* -*-c++-*- OpenSceneGraph - Co"..., 8191) = 3495
  Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
  OPENSCENEGRAPH_INCLUDE_DIR OSG_FOUND OSGQT_FOUND OSGDB_FOUND OSGGA_FOUND
  /usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake:187 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
access("/usr/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake", R_OK) = 0

(more…)

Building OsgEarth on Ubuntu 14.04

I already had QT 5.5.1 with GCC 4.7.3 (and probably some libraries, including libcurl4-gnutls-dev, libgdal-dev, glut, that are installed, but not built) on my machine, so I built OSG with the following commands (I am not sure that it makes a sense to clone recursively, but making with ‘CMAKE_BUILD_TYPE=Debug’ can be better than with ‘debug’ or ‘DEBUG’, because CMAKE does case-sensitive compare. We can build osgEarth 2.8 against OSG 3.4 or osgEarth master branch against OSG 3.4 or newer..):

cd ~
mkdir examples
cd examples
mkdir install
git clone --recursive https://github.com/openscenegraph/OpenSceneGraph.git
git tag
git reset --hard OpenSceneGraph-3.4.0
mkdir -p build/osg
cd build/osg
cmake ../../OpenSceneGraph/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/dmitry/examples/install
make -j3 install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dmitry/examples/install/lib64
~/examples/install/bin
./osgversiond

(more…)