My Ubuntu 18.04 installed in Windows 10 HyperV virtual machine stopped booting up with the following errors:
(more…)Category Archives: Ubuntu
Setting up time synchronization on Ubuntu
I followed the official Ubuntu time synchronization guide and installed chrony:
sudo apt update sudo apt install chrony cat /etc/chrony/chrony.conf chronyc sources chronyc sourcestats sudo systemctl restart chrony.service apt remove --autoremove chrony
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).
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)
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
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):
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 ...
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