ืืคืืกื ืื ื ืกืชืื ืขื ืืืกืื ืืคืฆื ื-rpm ืืืืฆืขืืช ืกืงืจืืคื ืคืฉืื ืขื inotify + createrepo. ืืขืืืช ืืคืฆืื ืืชืืฆืขืช ืืืืฆืขืืช webdav ืืืืฆืขืืช apache httpd. ืืื apache httpd ืืืืชื ืืงืจืืช ืกืืฃ ืืคืืกื.
ืืื, ืืคืชืจืื ืืืื ืืขืืื ืืืจืืฉืืช ืืืืืช ืืืจืืื ืืืกืื RPM ืืืื:
-
ืืื ื
-
ืืืื ืืช ืืืืืื ืืืืืจ ืืกืคืจ ืฉื ืืืช ืืืืจ ืืขืืื ืืืืืจ ืืืคืฆืื.
-
ืงื ืืืชืงื ื ืืืชืืืืงื
-
ืืืืืช ืืืื ืืช ืืืืื
ืืื ืื
SonaType Nexus ืืืฆืืคื : -
ืืืกืื ื
SonaType Nexus ืืืฆืืคื ืกืืืื ืจืืื ืฉื ืืคืฆืื ืืืืืืื ืืืSonaType Nexus ืืืฆืืคื ืืืคืื ืื ืงืืืช ืืืฉืืื ืืืช. -
ืืืื ืืช ืืืืื ื
SonaType Nexus ืฉืืื. -
ืฆืืคื ื ืจืื ืื ืืื ืคืชืจืื ืืกืืื ืืื. -
ืืคืฆืื ื
SonaType Nexus ืืืืืกื ืื ืืืชื. ืื ืืฉ ืืคืกืงืช ืืฉืื ืคืชืืืืืช, ืื ืชืืื ืืฉืืืจ ืืช ืืืชื ืื ืืื ืื ืืืืื. ืืืืชื ืื ื ืืฉืืืื ืืื:ERROR [ForkJoinPool.commonPool-worker-2] *SYSTEM [com.orientechnologies.orient.core.storage](http://com.orientechnologies.orient.core.storage/).fs.OFileClassic - $ANSI{green {db=security}} Error during data read for file 'privilege_5.pcl' 1-th attempt [java.io](http://java.io/).IOException: Bad address
. ืืืื ืืขืืื ืื ืฉืืืืจ.
ืงืื ืืงืืจ
โ ื ืืฆื ืงืื ืืืงืืจ
ืืชืกืจืื ืืจืืฉื ื ืจืื ืื:
#!/bin/bash
source /etc/inotify-createrepo.conf
LOGFILE=/var/log/inotify-createrepo.log
function monitoring() {
inotifywait -e close_write,delete -msrq --exclude ".repodata|.olddata|repodata" "${REPO}" | while read events
do
echo $events >> $LOGFILE
touch /tmp/need_create
done
}
function run_createrepo() {
while true; do
if [ -f /tmp/need_create ];
then
rm -f /tmp/need_create
echo "start createrepo $(date --rfc-3339=seconds)"
/usr/bin/createrepo --update "${REPO}"
echo "finish createrepo $(date --rfc-3339=seconds)"
fi
sleep 1
done
}
echo "Start filesystem monitoring: Directory is $REPO, monitor logfile is $LOGFILE"
monitoring >> $LOGFILE &
run_createrepo >> $LOGFILE &
ืืชืงื ื
Inotify-createrepo ืขืืื ืจืง ืขื CentOS 7 ืืืขืื. ืื ืืฆืืืชื ืืืจืื ืืื ืืขืืื ืขื CentOS 6.
yum -y install yum-plugin-copr
yum copr enable antonpatsev/inotify-createrepo
yum -y install inotify-createrepo
systemctl start inotify-createrepo
ืชึฐืฆืึผืจึธื
ืืืจืืจืช ืืืื, inotify-createrepo ืื ืืจ ืืช ืืกืคืจืืื /var/www/repos/rpm-repo/
.
ืืชื ืืืื ืืฉื ืืช ืืช ืืกืคืจืืื ืืื ืืงืืืฅ /etc/inotify-createrepo.conf.
ืืืฉืชืืฉ
ืืขืช ืืืกืคืช ืงืืืฅ ืืืฉืื ืืกืคืจืื /var/www/repos/rpm-repo/
inotifywait ืชืืฆืืจ ืืช ืืงืืืฅ /tmp/need_create
. ืืคืื ืงืฆืื run_createrepo ืคืืขืืช ืืืืืื ืืื ืกืืคืืช ืืื ืืจืช ืืช ืืงืืืฅ /tmp/need_create
. ืื ืืงืืืฅ ืงืืื, ืืื ืคืืขื createrepo --update
.
ืืงืืืฅ ืืืคืืข ืขืจื:
/var/www/repos/rpm-repo/ CREATE nginx-1.16.1-1.el7.ngx.x86_64.rpm
start createrepo 2020-03-02 09:46:21+03:00
Spawning worker 0 with 1 pkgs
Spawning worker 1 with 0 pkgs
Spawning worker 2 with 0 pkgs
Spawning worker 3 with 0 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
finish createrepo 2020-03-02 09:46:22+03:00
ืืืืืช ืืืื ืืช ืืืืื
ืืื ืืืคืื ืืืื ืืช ืืืืื ืืคืชืจืื ืงืืื, ืื ื ืืืฉื ืฉืืชื ืืืื ืืืฉืชืืฉ ืืฉื ื ืฉืจืชืื, Keepalved ืขืืืจ HA ื-Lsyncd ืืกื ืืจืื ืืคืฆืื.
WebDav
ืืชื ืืืื ืืืขืืืช ืงืืฆืื ืืืื ืืจืืื: SSH, NFS, WebDav. ื ืจืื ืฉ-WebDav ืืื ืืคืฉืจืืช ืืืืจื ืืช ืืคืฉืืื.
ืขืืืจ WebDav ื ืฉืชืืฉ ื- Apache httpd. ืืื Apache httpd ืืฉื ืช 2020 ืืื nginx?
ืืจืฆืื ื ืืืฉืชืืฉ ืืืืื ืืืืืืืืื ืืื ืืืช ืืืืืืื ืฉื Nginx + (ืืืืืื, Webdav).
ืืฉ ืคืจืืืงื ืืื ืืืช Nginx + ืืืืืืื -
ืืืฉืชื ืืงืฉืช ืืฉืืื
ืืืืจืืช webdav.conf
DavLockDB /var/www/html/DavLock
<VirtualHost localhost:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
Alias /rpm /var/www/repos/rpm-repo
<Directory /var/www/repos/rpm-repo>
DAV On
Options Indexes FollowSymlinks SymLinksifOwnerMatch IncludesNOEXEC
IndexOptions NameWidth=* DescriptionWidth=*
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
ืื ื ืืืฉื ืฉืืชื ืืืื ืืขืฉืืช ืืช ืฉืืจ ืืืืืจื ืฉื Apache httpd ืืขืฆืื.
Nginx ืืคื ื Apache httpd
ืฉืื ืืื Apache, Nginx ืืฉืชืืฉ ืืืืื ืขืืืื ืืงืฉืืช ืืืืกืก ืืืจืืขืื, ืืืืจืฉ ืจืง ืชืืืื ืฉืจืช HTTP ืืื ืขืืืจ ืื ืืกืคืจ ืฉื ืืงืืืืช. ืืชื ืืืื ืืืฉืชืืฉ ื-nginx ืืืืคืืืช ืืช ืืขืืืก ืขื ืืฉืจืช.
ืืืืจืช nginx-front.conf. ืื ื ืืืฉื ืฉืืชื ืืืื ืืขืฉืืช ืืช ืฉืืจ ืืืืืจืืช ืฉื nginx ืืขืฆืื.
upstream nginx_front {
server localhost:80;
}
server {
listen 443 ssl;
server_name ะฒะฐั-ะฒะธัััะฐะปัะฝัั
-ั
ะพัั;
access_log /var/log/nginx/nginx-front-access.log main;
error_log /var/log/nginx/nginx-front.conf-error.log warn;
location / {
proxy_pass http://nginx_front;
}
}
ืืขืืืช ืงืืฆืื ืืจื WebDav
ืืขืื ืช ืกื"ื ืืื ืคืฉืืื ืืืื.
curl -T ./nginx-1.16.1-1.el7.ngx.x86_64.rpm https://ะฒะฐั-ะฒะธัััะฐะปัะฝัะน-ั
ะพัั/rpm/
ืืงืืจ: www.habr.com