1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Updated Manual installation (markdown)

Bill Zimmerman 2020-01-19 13:52:35 +01:00
parent 68c8b25cb8
commit b0945999c1

@ -2,13 +2,13 @@ These steps apply to the latest release of Raspbian (currently [Buster](https://
```sh ```sh
sudo apt-get install git lighttpd php7.1-cgi hostapd dnsmasq vnstat sudo apt-get install git lighttpd php7.1-cgi hostapd dnsmasq vnstat
``` ```
**Note:** for Raspbian Stretch, replace `php7.1-cgi` with `php7.0-cgi`. For Raspbian Jessie and older versions, use `php5-cgi`. After that, enable PHP for lighttpd and restart it for the settings to take effect. **Note:** for Raspbian Stretch, replace `php7.1-cgi` with `php7.0-cgi`. php5 is no longer supported. After that, enable PHP for lighttpd and restart it for the settings to take effect.
```sh ```sh
sudo lighttpd-enable-mod fastcgi-php sudo lighttpd-enable-mod fastcgi-php
sudo service lighttpd restart sudo service lighttpd restart
``` ```
Now comes the fun part. For security reasons, the `www-data` user which lighttpd runs under is not allowed to start or stop daemons, or run commands like ifdown and ifup, all of which we want our page to do. Now comes the fun part. For security reasons, the `www-data` user which lighttpd runs under is not allowed to start or stop daemons, or run commands like ifdown and ifup, all of which we want our page to do.
So what I have done is added the `www-data` user to the sudoers file, but with restrictions on what commands the user can run. Add the following to the end of `/etc/sudoers`: So what I have done is added the `www-data` user to the sudoers file, but with restrictions on what commands the user can run. Add the following to the end of `/etc/sudoers` with `sudo visudo`:
```sh ```sh
www-data ALL=(ALL) NOPASSWD:/sbin/ifdown www-data ALL=(ALL) NOPASSWD:/sbin/ifdown
@ -46,8 +46,6 @@ www-data ALL=(ALL) NOPASSWD:/etc/raspap/openvpn/configauth.sh
``` ```
Once those modifications are done, git clone the files to `/var/www/html`. Once those modifications are done, git clone the files to `/var/www/html`.
**Note:** for older versions of Raspbian (before Jessie, May 2016) use
`/var/www` instead.
```sh ```sh
sudo rm -rf /var/www/html sudo rm -rf /var/www/html
sudo git clone https://github.com/billz/raspap-webgui /var/www/html sudo git clone https://github.com/billz/raspap-webgui /var/www/html