Posts

Showing posts from September, 2018

How to create a local yum repository for Centos/Redhat/Fedora

Image
In this tutorial, How to create a local yum repository for Centos / Redhat / Fedora . Step 1: mount your ISO file Create folder path /mnt/dvd [huupv@huupv huuphan.com]$ sudo mkdir -p /mnt/dvd If you used a physical DVD [huupv@huupv huuphan.com]$ sudo umount /dev/sr0 [huupv@huupv huuphan.com]$ sudo mount -t iso9660 -o ro /dev/sr0 /mnt/dvd If you used an IOS file [huupv@huupv huuphan.com]$ sudo mount -t iso9660 -o loop,ro /opt/CentOS-7-x86_64-Minimal-1511.iso /mnt/dvd Step 2: Create the repository I'll use vi editor. [huupv@huupv huuphan.com]$  vi /etc/yum.repos.d/local.repo Add the following lines: [local] name=Local DVD or ISO repository baseurl= file:///mnt/dvd gpgcheck=0 enabled=1 Step 3: Test your local repository I installing nginx package using local repository. [huupv@huupv huuphan.com]$  yum install --disablerepo="*" --enablerepo="local" nginx

Linux find command

Image
In this tutorial, Using find command to search for file or directory in linux. How to use linux find command find all folder or file. Using -exec flag. Linux find command How to find all folder not contain path ".backup" as below [huupv@huupv huuphan.com]$ find ./ -type d -not -path "*/.backup*"    -exec ls -ld {} \; The screen output terminal: How to find all symbolic link in current folder. [huupv@huupv huuphan.com]$ find ./ -type l -exec ls -l {} \; The screen output terminal: Conclusion Thought the article, you can use Linux find command. I hope will this your helpful

Linux alias tips

Image
In this tutorial, How do I  use alias command to stop and start service with human language. Linux alias tips For example, you execute command " vagrant halt app1 " to stop server app1  or " vagrant halt db " to stop server db in Vagrant . you can use alias command the define command  "stop_app1" or "stop_db" Step 1: Add command end of line in .bashrc file  [huupv@huupv ~]$ vim .bashrc The terminal output as below Step 2: Apply the change [huupv@huupv ~]$ source .bashrc The screen output terminal: [huupv@huupv ~]$ cd my_ansible/example01/ [huupv@huupv example01]$ stop_app1 DEPRECATION: The 'sudo' option for the Ansible provisioner is deprecated. Please use the 'become' option instead. The 'sudo' option will be removed in a future release of Vagrant. ==> app1: Attempting graceful shutdown of VM... [huupv@huupv example01]$ stop_db DEPRECATION: The 'sudo' option for the Ansible provi

How to Install sublime text editor on Fedora with DNF

Image
In this tutorial, How to Install sublime text editor on Fedora with DNF. Sublime Text is a powerful tool for web developer. I love it Install sublime Text editor Use sublime official yum repository for fedora system. Open terminal and import gpg $ sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg $ sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo Install sublime text latest version your system. $ sudo dnf install sublime-text Access sublime text Yeah coding :)