new config added

This commit is contained in:
Ange-Marie MAURIN committed 2022-05-03 21:24:32 +02:00
1 parent a062fb69bd
commit 0063dd7971
7 files changed
+2028 -35

No files matched your search

+1
View File
@@ -1 +1,2 @@
.remote-sync.json*
.github-token
+37
View File
@@ -0,0 +1,37 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /home/pi/VidLooper/site
<Directory "/home/pi/VidLooper/site">
AllowOverride all
Order allow,deny
Allow from all
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
+1
View File
@@ -0,0 +1 @@
www-data ALL=NOPASSWD: /sbin/reboot
+47 -32
View File
@@ -17,7 +17,7 @@ By default raspberry OS (aka raspbian) boot in graphical mode in it's full versi
*I think that the lite version does not.*
```console
:~$ sudo raspi-config
pi@RIP2:~ $ sudo raspi-config
```
In raspi-config change default password for security.
@@ -48,17 +48,17 @@ You can hang around to see other parameters but for now we're done with those ba
Raspbian has release a new version so *--allow-releaseinfo-change* option is important and need to be done 2 times.
```console
:~$ sudo apt-get update --allow-releaseinfo-change
:~$ sudo apt-get update --allow-releaseinfo-change
:~$ sudo apt-get upgrade
:~$ sudo apt-get dist-upgrade
pi@RIP2:~ $ sudo apt-get update --allow-releaseinfo-change
pi@RIP2:~ $ sudo apt-get update --allow-releaseinfo-change
pi@RIP2:~ $ sudo apt-get upgrade
pi@RIP2:~ $ sudo apt-get dist-upgrade
```
3. Installing software
```console
:~$ sudo apt-get install hostapd dnsmasq apache2 vsftpd php omxplayer fbi
:~$ sudo pip3 install vidlooper
pi@RIP2:~ $ sudo apt-get install hostapd dnsmasq apache2 vsftpd php omxplayer fbi
pi@RIP2:~ $ sudo pip3 install vidlooper
```
4. Configure Wifi AP, dnsmasq and IP settings
@@ -69,17 +69,17 @@ Raspbian has release a new version so *--allow-releaseinfo-change* option is imp
Stop all services that we have just install.
```console
:~$ sudo service dnsmasq stop
:~$ sudo service vsftpd stop
:~$ sudo service apache2 stop
:~$ sudo service hostapd stop
pi@RIP2:~ $ sudo service dnsmasq stop
pi@RIP2:~ $ sudo service vsftpd stop
pi@RIP2:~ $ sudo service apache2 stop
pi@RIP2:~ $ sudo service hostapd stop
```
Save a copy of dhcpcd.conf and edit dhcpcd.conf
```console
:~$ sudo mv /etc/dhcpcd.conf /etc/dhcpcd.conf.orig
:~$ sudo nano /etc/dhcpcd.conf
pi@RIP2:~ $ sudo mv /etc/dhcpcd.conf /etc/dhcpcd.conf.orig
pi@RIP2:~ $ sudo nano /etc/dhcpcd.conf
```
add these lines :
@@ -107,11 +107,11 @@ You can just send a copy of the dhcpcd.conf in this folder with scp.
So close your remote session
```console
:~$ exit
pi@RIP2:~ $ exit
```
and then in the host command prompt do.
```console
:~$ scp ./dhcpcd.conf pi@YOUR-PI-IP-ADDRESS:dhcpcd.conf
pi@RIP2:~ $ scp ./dhcpcd.conf pi@YOUR-PI-IP-ADDRESS:dhcpcd.conf
pi@YOUR-PI-IP-ADDRESS's password:
```
Replace YOUR-PI-IP-ADDRESS by the raspberry pi ip address.
@@ -119,21 +119,21 @@ You will be ask to type your ssh password.
Then log back your pi with ssh and put the file in the right place.
```console
:~$ sudo mv dhcpcd.conf /etc/dhcpcd.conf
pi@RIP2:~ $ sudo mv dhcpcd.conf /etc/dhcpcd.conf
```
Do the same for hostapd.conf and dnsmask.conf. of course replace YOUR-PI-IP-ADDRESS by your pi ip address.
In host :
```console
:~$ scp ./hostapd.conf pi@YOUR-PI-IP-ADDRESS:hostapd.conf
pi@RIP2:~ $ scp ./hostapd.conf pi@YOUR-PI-IP-ADDRESS:hostapd.conf
pi@YOUR-PI-IP-ADDRESS's password:
:~$ scp ./dnsmask.conf pi@YOUR-PI-IP-ADDRESS:dnsmask.conf
pi@RIP2:~ $ scp ./dnsmask.conf pi@YOUR-PI-IP-ADDRESS:dnsmask.conf
pi@YOUR-PI-IP-ADDRESS's password:
```
And back in the pi.
```console
:~$ sudo mv hostapd.conf /etc/hostapd/hostapd.conf
:~$ sudo mv dnsmask.conf /etc/dnsmask.conf
pi@RIP2:~ $ sudo mv hostapd.conf /etc/hostapd/hostapd.conf
pi@RIP2:~ $ sudo mv dnsmask.conf /etc/dnsmask.conf
```
Obviously, you have to change some configuration in /etc/hostapd/hostapd.conf to suite your needs. In fact adjust as minimal requirements the SSID and the PASSWORD on these lines.
@@ -144,7 +144,7 @@ wpa_passphrase=AP-WIFI-PASSWORD
And we are not done yet with hostapd. you have to setup the default config file that hostapd will use. To do that, edit /etc/default/hostapd
```console
:~$ sudo nano /etc/default/hostapd
pi@RIP2:~ $ sudo nano /etc/default/hostapd
```
And uncomment the line DAEMON_OPTS and put the path of the conf file we have copy. Ctrl-X to exit nano then yes to save changes again.
@@ -161,7 +161,7 @@ sudo systemctl enable hostapd.service
now we are ready to reboot and see if the access point is working properly.
```console
:~$ sudo reboot
pi@RIP2:~ $ sudo reboot
```
5. Configure vsftpd, apache2 and php :
@@ -169,20 +169,35 @@ now we are ready to reboot and see if the access point is working properly.
From host copy vsftpd.conf
```console
:~$ scp ./vsftpd.conf pi@YOUR-PI-IP-ADDRESS:vsftpd.conf
pi@RIP2:~ $ scp ./vsftpd.conf pi@YOUR-PI-IP-ADDRESS:vsftpd.conf
pi@YOUR-PI-IP-ADDRESS's password:
```
```console
:~$ cd
:~$ sudo mv vsftpd.conf /etc/vsftpd.conf
:~$ mkdir VidLooper
:~$ sudo chgrp -R www-data VidLooper
:~$ sudo chmod -G www-data ftp
:~$ sudo chmod -R g+rwx ./VidLooper
:~$ git clone https://github.com/a2msystemes/RIP
:~$ cd RIP
:~$ cp -R site/ ../VidLooper
pi@RIP2:~ $ cd
pi@RIP2:~ $ sudo mv vsftpd.conf /etc/vsftpd.conf
pi@RIP2:~ $ mkdir VidLooper
pi@RIP2:~ $ sudo chgrp -R www-data VidLooper
pi@RIP2:~ $ sudo chmod -G www-data ftp
pi@RIP2:~ $ sudo chmod -R g+rwx ./VidLooper
pi@RIP2:~ $ git clone https://github.com/a2msystemes/RIP
pi@RIP2:~ $ cd RIP
pi@RIP2:~ $ cp -R site/ ../VidLooper
pi@RIP2:~ $ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/site
s-available/001-RIP-webApp.conf
pi@RIP2:~ $ sudo a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
pi@RIP2:~ $ sudo systemctl reload apache2.service
pi@RIP2:~ $ cd RIP
pi@RIP2:~ $ sudo cp ./001-RIP-webApp.conf /etc/apache2/sites-available/
pi@RIP2:~ $ sudo a2ensite 001-RIP-webApp.conf
pi@RIP2:~ $ sudo apachectl configtest
pi@RIP2:~ $ sudo systemctl reload apache2.service
pi@RIP2:~ $ sudo cp ./php.ini /etc/php/[php-version]/apache2/php.ini
pi@RIP2:~ $ sudo cp ./010_rip-reboot /etc/sudoers.d/010_rip-reboot
pi@RIP2:~ $ sudo reboot
```
+1939
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -18,7 +18,7 @@
echo '<pre>' . $_FILES['video_file']['name'] . '</pre>';
$currentDirectory = getcwd();
$uploadDirectory = "/../Videos/";
$uploadDirectory = "/../data/";
$errors = []; // Store errors here
@@ -62,7 +62,7 @@
echo '<pre>file = ' . $_FILES['splash_screen']['name'] . '</pre>';
$currentDirectory = getcwd();
$uploadDirectory = "/../Videos/";
$uploadDirectory = "/../data/";
$errors = []; // Store errors here
+1 -1
View File
@@ -154,5 +154,5 @@ ssl_enable=NO
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/$USER/VidLooper
local_root=/home/$USER/VidLooper/data
allow_writeable_chroot=YES