PR

FreeBSD Package Installation Part 1

FreeBSD
記事内に広告が含まれています。

The original Japanese version is available here.

It was heavy rain yesterday. But it is clear sky with a lot of sun shines today. I got a call from one of my friends yesterday and told me that “let’s eat horse-meat sashimi at his house today”. I just arrived at he office and start doing something. So I replied that “let’s eat it tomorrow 🙂 ” It seems to be “HomeTown Tax Returns ( so called ふるさと納税返礼品 ). I visited his house on the next day with a bottle of Shochu and talk about the baseball game we watched last week at first.

The fresh onion slices are the best as well 🙂
We must have Sake with sparkling enope squid?

The FreeBSD OS we installed on VMware Player has only vmware tools installed. This is required for the communication between VMware platform and Operating System. This time, we will install some more applications to make system easy to use. As I wrote before, more than 36000 packages are ready for installation. We don’t have any specific purpose for our FreeBSD system yet. So we install minimum packages to make our FreeBSD life easier. We will install my favorite shell, ksh. And bash for Linux freaks. sudo which is convenient for multi -admin environment. An unix2dos file format converter between windows and UN*X. And CLI version of speedtest tool. A samba file share software. And portmaster and portupgrade for maintenance.

Let’s login to the system and check the package version which we are going to install on the system. We need to use pkg command to manipulate package files.

pkg tool is something like yum or dnf tool on RedHat linux. zyper on SuSE linux, And apt on Ubuntu… And that’s why I don’t like Linux 🙂

Execute pkg install command with package names in the arguments.

Let’s do it.

The number of packages we want to insall is only 8. But 61 packages totally will be installed accordingly.

Many small packages will be installed as the dependency.

Ready-To-Use packages are downloaded and installed.

No compile operations are required to use packages.

When installation is done, all messages from all packages will be displayed at the end. We need to read them carefully and do something necessary.

Read the messages carefully.

All FreeBSD packages will be installed under /usr/local directory basically. If we have the same command name in /usr/bin or /bin, for example, the command in /usr/local/bin should be executed first. The only one thing I don’t like in FreeBSD is that shells will be installed in /usr/local/bin directory. For personal reason, I need any shells to be in /bin directory. This is because I use “#!/bin/ksh” in all my scripts or in public scripts available in the network.

my personal requirement.
Let me make a symbolic link between /bin/ksh and /usr/local/bin/ksh.

Also /etc/shells need to be edited to use /bin/ksh as login shell.

If login shell is not listed here, we will have strange problem later.
Add /bin/ksh and save it.

Now we can change the login shell to /bin/ksh. The root user can edit /etc/passwd file with vipw command. Or normal user can use chsh command. I used chsh command here, for example.

The vipw for root and chsh for normal users.

If we don’t have /bin/ksh in /etc/shells file, we see error in chsh command. But we can do anything with vipw command executed by root 🙂

The inconvenience no. 1..We can’t change the shell to /bin/ksh if this is not listed in /etc/shells file.

The new SSH connection looks like this. Nothing is customized yet. We will customize shells later on.

Customizations are required !

We talked about what we will do for our summer vacation this year when we have this party. We often talk about Hokkaido since last year with one of my friends who is a politician-in-the-making. So we wanted to go to Hokkaido in this summer. He spent his student days in Hokkaido when he was young. So he will make a plan for all of us as he knows about Hokkaido well. I thought we can go to Hokkaido by car and ferry in Japan Sea. But my another friend who offered horse-meet sashimi for us doesn’t have enough days in his summer vacation 🙂 We have to choose plane and rent-a-car locally in the most highest resort season 🙁 Meaning everything will be very expensive 🙁 🙁 Anyway let’s see what happens.

Advertisement below


コメント