On Ubuntu and its derivative, Pop!_OS, ld.so, I couldn’t find ld.so.
Instead it was /lib64/ld-linux-x86-64.so.2.
On Ubuntu and its derivative, Pop!_OS, ld.so, I couldn’t find ld.so.
Instead it was /lib64/ld-linux-x86-64.so.2.
First take a snapshot or backup of your server.
Then, we’ll take a backup of our php-fpm.conf file
because if we uninstall php-7.3 it will remove this file too.
doas cp php-fpm.conf php-fpm.conf.bak
Now, let’s stop our instance of php-7.3
doas rcctl stop php-7.3
install php-curl which will pull in php as well.
doas pkg_add -iv php-curl
When presented with a list of php-versions pick php-7.4
Also, install php-zip and pecl74-imagick.
doas pkg_add -iv php-gd php-zip pecl74-imagick
Remember, none of these modules are activated by default by OpenBSD.
In order to activate them, we need to copy them from /etc/php-7.4.sample
directory to /etc/php-7.4
cd /etc/php-.7.4
doas cp ../php-7.4.sample/* .
Now with our files in place and php upgraded, lets edit our
/etc/rc.conf.local file and change php73_fpm to php74_fpm
And we can now start up php74_fpm
doas rcctl start php74_fpm
Refresh our website and make sure WordPress is running fine.
Now we can delete php-7.3
doas pkg_delete -iv php-7.3
This will also remove php-fpm.conf and our site will be broken.
Fortunately we made a backup of this file.
doas mv /etc/php-fpm.conf.bak /etc/php-fpm.conf
Do some file cleanup
doas rm -r /etc/php-7.3 /usr/local/share/php-7.3
doas, available on OpenBSD as part of the default system, is a simpler replacement for sudo.
Become root user and then copy doas configuration file from /etc/examples/.
su -
cp /etc/examples/doas.conf /etc/
Use your favorite editor or vi or Emacs clone mg which are included in the base to edit /etc/doas.conf. Add the word “persist” after “permit” to enter your password less often.
So you are now using a real, superior text editor and you want to be able to add Unicode characters for whatever reason.
First, you need to be in insert mode so begin by pressing ‘i’. Hold down ctrl + v, let go, then press ‘u’, let go, now enter the Unicode key sequence. Voila!
One way to add a Unicode character to Python’s REPL is to add it as a string literal.
Suppose you had the phrase “My Spanish brown eyed girl.”
To print the phrase with a Jerusalem cross between each word you would find on the internet a Unicode character reference that gives you the number sequence in this case, U+2629.
Since join method accepts one argument lets first place our sentence in a variable.
my_girl = 'My', 'Spanish', 'brown', 'eyed', 'girl.'
print('\u2629'.join('My Spanish brown eyed girl.'))
This will output the following:
My☩Spanish☩brown☩eyed☩girl.
I am not sure how this is useful, but if you want to send a message to syslog, logger will do the trick.
From a terminal:
logger jumpin jack flash is a gas, gas, gas
tail /var/log/syslog
May 19 20:09:30 bernard chytraeus: jumpin jack flash is a gas, gas, gas
Apparently, quotes around whatever you have to say are unnecessary.
When I first setup WordPress on OpenBSD I followed Michael W. Lucas’s book, “Httpd and Relayd”. Actually, this was my first experience ever setting up WordPress on any server. The steps Michael gave made setting it up straightforward. But, when there was an update to WordPress 5.3 yesterday, I felt a bit nervous. I couldn’t find a howto or tutorial on how to upgrade WordPress in a chroot.
httpd on OpenBSD runs in a chroot. I thought this would prove to be a huge problem but it wasn’t too difficult to update.
In addition to Michael’s book mentioned above, the WordPress documentation on doing a manual upgrade was also helpful.
I adapted the above instructions from WordPress’s to the fact that WordPress runs in a chroot on OpenBSD.
To begin with, I downloaded the latest updated stable code from WordPess.
ftp https://wordpress.org/latest.tar.gz
Unpack the gzipped tarball and remove the oldwp-includes
andwp-admin
directories
tar -xzf latest.tar.gz
doas rm -r /var/www/htdocs/wp-includes/ /var/www/htdocs/wp-admin/
Now, update all the files without removing your own content.
doas rsync --update -ra --progress wordpress/ /var/www/htdocs/
All of our fresh files from WordPress are in place. Let’s fix the permissions on those files.
doas chown -R www:www /var/www/htdocs
That’s all I needed to do. I have a simple setup. Your mileage may vary.
Let’s say I have the username of tom and my main group is also tom.
For some reason I now need my username to be jerry and in the group jerry.
sudo usermod -l jerry tom
That changed the username from tom to jerry. But jerry is still in the group tom.
sudo groupmod -n jerry tom
Okay. Now jerry is in the group jerry. But all jerry’s files are still in /home/tom.
sudo usermod -m -d /home/jerry jerry
Voila! Now tom is jerry.
I’ve begun learning Lua.
To find the length of a string:
string.len("shark")
5
To find the cosine:
math.cos
To convert a lowercase string to uppercase:
string.upper("dad")
DAD
For some reason, I found it difficult to find the answer as to how I could take an USB thumb drive, format it with the NTFS file system, and label it. All from the command line and on Linux. After Googling, Duck Duck Go-ing it, and searching with Qwant I remembered that I have a handy little program installed called tldr.
tldr mkfs.ntfs
One of the results was the following:
So first of all I needed to find the right device name for the thumb drive I had plugged in so I didn’t overwrite my 200 gigabyte home folder!
lsblk:
sdc 8:32 1 7.6G 0 disk
└─sdc1 8:33 1 7.6G 0 part
Now that I had the right device to write to, I could create a file system on it.
sudo mkfs.ntfs /dev/sdc1 -L "THE WALKING DEAD"
Bingo! That did the trick.