-
Notifications
You must be signed in to change notification settings - Fork 3
/
Day 12 Linux Package and Repositories Management -
232 lines (173 loc) · 4.16 KB
/
Day 12 Linux Package and Repositories Management -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
----------------------------------------------------
Package Management in Linux
----------------------------------------------------
.deb for debien
dpkg, apptitide , apt-get
.rpm for Fedora
rpm, yum ,dnf
Debien pakgemanagment
dpkg -l
user for see installed packedge
dpkg -l | wc -l
dpkg -l rstnc
dpkg -l apache2
agr apko file ki information dehna hai k kesi pkg ki waja se konsi files files apk system b install hwi
dpkg -S rsync
agr hune ye dekhna hai k is file ko is pkg wja se instaall kiya gya
dpkg -S /yse.share/doc/rsync
dpkg -L apache2
dpkg -i apache2
dpkg -r apache2
apt-get update
apt-get install apache2
hamary sary jo b hun downlaod krty hian wo yahan store hoty hain
cd /var/cache/apt/acrcives
ls
agr hume sary pkgs ko remove krn ho
apt-get clean
ls
agr ap install pkg lko search krna chahty hian
apt-cache search apache2
apt-get remove apache2 -y
agr hume pkg ko remvoe krne k sth uskki configuration file ko b remvoe krna hai
apt-get install apache2
apt-get purge apache2
aptitude update
agr ap safley apni machine ko update or patch krna krna chhaty hahain
aptitude safe-upgrade
aptitude install apache2
aptitude remove apache2
agr ap keis remopo m pkg ko search krna chty hian tu wo b aap kr skty hian
aptitude search apache2
aptitude purge apache2
ls -l /etc/apt/sources.list
adding repository
add-apt-repository URL of Repo
apt-key add URL
apropos apt URL
Fedora Base Destribution
rpm -qa |grep samba
rpm -qa
rpm -qa | wc -l
rpm -qi Pkgname
mount /dev/sr0 /mnt
df -h
cd /mnt BAseOs/Pakges
rpm -qa | grep zsh
rpm -i Pkgname
rpm -qa | grep zsh
rpm -e zsh
show Process
rpm -iv Pkgname
rpm -ev zsh
rpm -ivh Pkgname
rpm -evh Pkgname
For Upgrade Pkg
rpm -Uvh pkgname
Pkgs databae store here {MetaData}
ls /var/lib/rpm
agr hume pkg ko cpio convert krna hai
cp -r zshpkg name copy /root
cd /root
ls
rpm2cpio pkgname > zsh.cpio
agr hum eksi rpm k andr ki file ko dekhn achhaty hain
rmp2cpi pkgname |cpio -t
rmp ki madad se agr ap kesi esy pkg ko instrall krna chty hian jis ki dependency hain tu ap install nh i kr skty
cd /mnt/AppsStream/Packegs
ls |gre ypbind
rpm -ivh ypbind
yum install ypbind
yum list
dnf list
yum list all
dnf list all
dnf list httpd
yum lisy httpd
Search pkg
yum search httpd
dnf search httpd
agr yume dekhna hai koi particulat file ksi pkg m h k nhi
yum provides /usr/shre/man/man5/passwd.5.gz
install pkg details
yum list installed
yum list installed | wc -l
dnf list installed
yum install httpd ftp vsftpd
dnf install httpd ftp vsftpd
dnf remove httpd
dnf umdate
yum grouplist
dnf groupinstall "grouppkgname"
cd /etc/yum.repos.d
ls
cd /etc/yum.conf
Convert rpm pkg to debian pkg or debian pkg to rpm
Go to Ubuntu
rmp file
alien --to-deb pakgname
ls
alien --to-rpm pakgname
Centos
cd /etc/yum.repos.d
ls
install epel repo here
wget URL eplrepo
rpm -ivh nameepl
rpm -evh eplopkgname
Install pkg from source code
downlaod source code of pkg
yum install gcc -y
install develpmet tools pkgs
dnf groupinstall "Development Tools"
tar -xvf filename
cd putty
ls
./configure
make
make install
-------------------------------------------
Managing Repositories
-------------------------------------------
RedHat 8
yum install -y httpd
df -h
ISO image attach
mkdir localrepo
mount /dev/sr0 /localrepo
cd localrepo
ls
AppStream ma BseOS has all pkgs
cd /etc/yum.repos.d
vim local.repo
[BaseOS]
name=BaseOS-RHEL8
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///root/localrepo/BaseOS
gpgkey=file:///etc/pki/rpm-gpg?RPM-GPG_KEY-redhat-release
[AppStream]
name=AppStream-RHEL8
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///root/localrepo/AppStream
gpgkey=file:///etc/pki/rpm-gpg?RPM-GPG_KEY-redhat-release
save
yum repolist all
yum install httpd
Remove warning of REDHAT
vim /etc/yum/pluginconf.d/seubscription-manager.conf
enable=0
dnf install vsfdtpd
ap ye sb ek commd se b kr skty hian
yum config-manager --add-repo=file://lcoalrepo/BaseOS
yum config-manager --add-repo=file://lcoalrepo/AppStream
epelRepo configuration
rm *
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install epelrepoURL
dnf repolist
yum install -y chromium
yum clean all