0% found this document useful (0 votes)
25 views

Install File CentOS7

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Install File CentOS7

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Check your linux version:

updatedb;echo "NGINX:";locate nginx.conf;echo "APACHE:";locate httpd.conf;locate


api.cgi;ls -l /home/;ls -l /var/www/;uname -m;cat /etc/redhat-release

XVideoSharing 1.9 File-Server installation guide for CentOS 7, 64bit

echo "nameserver 209.244.0.3" >> /etc/resolv.conf;echo "nameserver 84.200.69.80" >>


/etc/resolv.conf;echo "nameserver 8.8.4.4" >> /etc/resolv.conf;echo "nameserver
8.8.8.8" >> /etc/resolv.conf
rpm -ivh http://mirrors.m247.ro/repoforge/redhat/el7/en/x86_64/rpmforge/RPMS/
rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
yum -y install epel-release
yum -y --nogpgcheck install pcre pcre-devel zlib-devel openssl-devel make perl-
libwww-perl.noarch mc zlib* ImageMagick perl-Digest-SHA1 perl-Digest-SHA sysstat
atop psacct gcc perl-CPAN perl-Crypt-SSLeay perl-IO-Socket-SSL.noarch perl-GD wget
ntpdate perl-Time-HiRes unzip perl-XML-Simple.noarch perl-Digest-MD5-File.noarch
perl-IO-Socket-SSL.noarch perl-Net-SSLeay perl-ExtUtils-Embed perl-Digest-HMAC
psmisc perl-HTML-Form perl-HTML-Template-Pro perl-LWP-Protocol-https openssh-
clients net-tools xz httpd perl-CGI perl-JSON
ntpdate time.apple.com

cd /usr/src
wget -4 http://sibsoft.net/xvideosharing/nginx-upload-progress-module-
master.zip;unzip nginx-upload-progress-module-master.zip;rm -f nginx-upload-
progress-module-master.zip
wget -4 http://sibsoft.net/xvideosharing/nginx-upload-module-2018.zip;unzip nginx-
upload-module-2018.zip;rm -f nginx-upload-module-2018.zip
wget -4 http://sibsoft.net/xvideosharing/nginx-vod-module-1.23.tar.gz;tar -xf
nginx-vod-module-1.23.tar.gz;rm -f nginx-vod-module-1.23.tar.gz
wget -4 http://nginx.org/download/nginx-1.15.0.tar.gz;tar -xzf nginx-
1.15.0.tar.gz;rm -f nginx-1.15.0.tar.gz;cd nginx-1.15.0
./configure --with-http_stub_status_module --with-http_mp4_module
--add-module=../nginx-upload-module-master --add-module=../nginx-upload-progress-
module-master --add-module=../nginx-vod-module-1.23 --with-file-aio --with-threads
--with-http_ssl_module --with-http_v2_module
make && make install
echo "/usr/local/nginx/sbin/nginx" >> /etc/rc.local;chmod +x /etc/rc.d/rc.local

Configure your apache virtual host folders:


setenforce 0
perl -pi -e 's/=enforcing/=disabled/;' /etc/selinux/config
cd /var/www;mkdir cgi-bin;mkdir htdocs;mkdir logs;rm -f index.html;rmdir html
perl -pi -e 's/Listen 80/Listen 127.0.0.1:8001/;s/Timeout 60/Timeout
360/;s/www\/html/www\/htdocs/g;s/AllowOverride None/AllowOverride
All/;s/logs\/error_log/\/var\/www\/logs\/error_log/;s/CustomLog/#CustomLog/g;'
/etc/httpd/conf/httpd.conf
systemctl enable httpd.service;systemctl start httpd.service
firewall-cmd --permanent --add-port=80/tcp;firewall-cmd --reload
firewall-cmd --permanent --add-port=443/tcp;firewall-cmd --reload

Upload fs.zip to the /var/www folder and unpack:


cd /var/www;unzip fs.zip;mv -f fs/htdocs .;mv -f fs/cgi-bin .;rm -f fs.zip;mv -f
fs/nginx/conf/nginx.conf /usr/local/nginx/conf/;mv fs/nginx/conf/*
/usr/local/nginx/conf/;mv fs/nginx/perl /usr/local/nginx/;rm -rf fs

Run install.sh to set correct permissions:


In case you have big disk for files mounted to /home or other non-root folder run:
cd /var/www/cgi-bin;sh install_fs.sh /home
if disk is mounted to root just run:
cd /var/www/cgi-bin;sh install_fs.sh

Set the right owner for the files:


chown -R apache:apache /var/www

Start NGINX:
/usr/local/nginx/sbin/nginx

Add Host / Server through web site, Save Settings and restart daemons+nginx on
fileserver:
killall enc.pl;killall transfer.pl;killall url_upload.pl
killall nginx;sleep 1;/usr/local/nginx/sbin/nginx

Configure crontabs:
(crontab -l ; echo "*/10 * * * * cd /var/www/cgi-bin;./atop.pl >/dev/null
2>&1") | crontab -
(crontab -l ; echo "*/3 * * * * cd /var/www/cgi-bin;./nginx_logs.sh >/dev/null
2>&1") | crontab -
(crontab -l ; echo "5 0 * * * ntpdate pool.ntp.org >/dev/null 2>&1") |
crontab -

(crontab -l -uapache ; echo "*/3 * * * * cd /var/www/cgi-bin;./enc.pl


>/dev/null 2>&1") | crontab -uapache -
(crontab -l -uapache ; echo "*/3 * * * * cd /var/www/cgi-bin;./transfer.pl
>/dev/null 2>&1") | crontab -uapache -
(crontab -l -uapache ; echo "*/3 * * * * cd /var/www/cgi-bin;./url_upload.pl
>/dev/null 2>&1") | crontab -uapache -
(crontab -l -uapache ; echo "5 * * * * cd /var/www/cgi-bin;./cron_cleanup.pl
>/dev/null 2>&1") | crontab -uapache -

You might also like