![]() It uses kill -9 to ensure that they cannot ignore the kill message. The die script is my own script that wraps the kill command in a bit of code that can find running programs that match a specified string and kill them. This file is used to display a daily message to users who log in remotely using SSH. The create_motd script runs the mymotd scripts and redirects the output to the /etc/motd file. The mymotd script creates a “Message Of The Day” data stream that is sent to stdout. Use the tree command to verify that the directory structure of ~/development and the contained files looks like the following output: ~]$ tree development/ We will go into detail about each section of the spec file.Īs user student, using your home directory as your present working directory (pwd), untar the tarball. There is also a complete spec file, which you can use to build the rpm. This tarball includes all of the files and Bash scripts that will be installed by the final rpm. Download a tarball that I have prepared of a development directory structure, utils.tar, from GitHub using the following command: wget Open another terminal session and use su to switch to that user to perform the rest of these steps. The rest of this project should be performed as the user student unless otherwise explicitly directed. The number may vary, depending upon the packages already installed on your host it installed a total of 17 packages on my test VM, which is pretty minimal. Note that this command will also install several dependencies. Passwd: all authentication tokens updated ~]#īuilding rpm packages requires the rpm-build package, which is likely not already installed. ~]# useradd -c "Student User" ~]# passwd student ~]$ su ~]#Ĭreate a student user that can be used for this project and set a password for that user. Find out why in my personal blog post: Real SysAdmins don’t sudo. I do not believe that sysadmins should use sudo for any administrative tasks. Be sure to use the - option to ensure that the complete root environment is enabled. Preparationįirst, open one terminal session and su to root. I will indicate which parts should be performed as root and which by a non-root, unprivileged user. Rpms should never be built by root, but only by non-privileged users. ![]() What we have is a source that is also the executable.įor the most part, this project should be performed as the non-root user student. So we have no source code in the sense that it is something that needs to be compiled into binary executables. I am a sysadmin, and we sysadmins have different needs because we don’t-or we shouldn’t-compile code to use for administrative tasks we should use shell scripts. In addition, every one of the documents I found assumes that the code needs to be compiled from sources as in a development environment. What other information there is tends to be brief and apparently assumes that you already have a good deal of knowledge about the process. The RPM website also has links to other websites that have a lot of documentation about rpm. The online version of Maximum RPM is available at no charge and is kept up to date. It is also out of print, and used copies go for hundreds of dollars. That book is now somewhat out of date, as is the vast majority of information I have found. When I started this project, I found very little information about creating rpm packages, but I managed to find a book, Maximum RPM, that helped me figure it out. Although the rpm tool was formerly used to build rpm packages, that function was removed and a new tool, rpmbuild, was created to build new rpms. It reached the point that it took a great deal of time to install all of these packages, so I decided to automate that process by creating an rpm package that I could copy to the target hosts and install all of these files in their proper locations. Over the years I have created a number of Bash scripts, some of which have separate configuration files, that I like to install on most of my new computers and virtual machines. Free online course: RHEL Technical Overview. ![]() Sudo dnf install $(rpm -E %fedora).noarch. # For Fedora 28/27/26/25/24 # sudo dnf install $(rpm -E %fedora).noarch.rpm # For CentOS/RHEL 6 # sudo yum localinstall -nogpgcheck # For CentOS/RHEL 7 # sudo yum localinstall -nogpgcheck ![]() You can add RPMFusion yum repository by executing following commands based on your system OS version. ![]() The RPM Fusion repository provides the packages that are not shipped with the Fedora or Red Hat. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |