Igor Posted October 8, 2015 Author Posted October 8, 2015 I started to move on. Just a note https://github.com/igorpecovnik/Debian-micro-home-server/tree/dev Development, not really working scripts ... if anyone has ideas how to solve, what to add/remove.
Tido Posted October 12, 2015 Posted October 12, 2015 (edited) Why not writing a script for LAMP.Why not writing a script for VPNWhy not writing a script for iptablesWhy not writing a script for whateversimple copy & paste, the UNIX way, one task, one program The LAMP script I modded a bit does work for the Kernel 3.4.108 - it runs smoothly on the R1. #!/bin/bash # author: Martin Clauß - mc@informatik.uni-leipzig.de # created: July 14 2013 # This script is based on this tutorial: http://community.linuxmint.com/tutorial/view/486 # cd into the directory where you saved it, make it executable by: # chmod +x LAMP_install.sh # start it with: sudo ./LAMP_install.sh echo "********************************" echo " LAMP installation script" echo "********************************" if [[ $UID -ne 0 ]]; then echo "You must be root to run this script. Exiting..." exit 1 fi echo "********************************" echo " install Apache" echo "********************************" apt-get install apache2 if ! wget -q "http://localhost" then echo "Apache not running. Exiting..." exit 1 fi echo "********************************" echo " install PHP" echo "********************************" apt-get install php5 libapache2-mod-php5 /etc/init.d/apache2 restart # this few lines will test if PHP and Apache is running echo "<?php phpinfo(); ?>" > /var/www/testphp.php if ! wget -q "http://localhost/testphp.php" then echo "Cannot open testphp.php. Exiting..." rm /var/www/testphp.php exit 1 else if [[ $(wget -q -O - "http://localhost/testphp.php" | grep -i php) == "" ]] then echo "PHP is not running correctly. Exiting..." # rm /var/www/testphp.php exit 1 fi fi # uncomment this if you want to remove the testfile # rm /var/www/testphp.php echo "********************************" echo " install mySQL Server" echo "********************************" apt-get install mysql-server # password will be set during the mysql-server installation echo "********************************" echo " install phpMyAdmin " echo "********************************" apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin sed -i "s/;extension=mysql.so/extension=mysql.so/" /etc/php5/apache2/php.ini /etc/init.d/apache2 restart if [[ $(grep -i "Include /etc/phpmyadmin/apache.conf" /etc/apache2/apache2.conf) == "" ]] then echo -e "\nInclude /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf fi if ! wget -q "http://localhost/phpmyadmin" then echo "phpmyadmin is not running. Exiting..." exit 1 fi echo "Installation complete :)" Edited January 4, 2016 by Tido
Rui Ribeiro Posted November 2, 2015 Posted November 2, 2015 I setup an IPsec VPN on the lamobo, but now I cannot see DLNA on my iphone while remote, only in the local network. Out of curiosity, has anyone managed to setup minidlna working at the same time, but in the local and in the VPN network? I will give it a try again later on.
tkaiser Posted November 2, 2015 Posted November 2, 2015 now I cannot see DLNA on my iphone while remote, only in the local network Isn't DLNA device discovery based on SSDP and works therefore only with link local addresses in the LAN?
PaceyIV Posted November 2, 2015 Posted November 2, 2015 I've never tried to use minidlna on a VPN. In this context I think I would use subsonic to stream (with compression) the media on Internet using subsonic (http://www.subsonic.org/pages/index.jsp) I don't remember the name of the open source alternative/clone to this one.
Rui Ribeiro Posted November 8, 2015 Posted November 8, 2015 Yep tkaiser, it is LAN-only, some people claim that they got it to work in VPNs, however maybe they are confused while using the VPN service in their home network. I might make the multimedia files available in the VPN through HTTP
tkaiser Posted November 16, 2015 Posted November 16, 2015 it is LAN-only, some people claim that they got it to work in VPNs, however maybe they are confused while using the VPN service in their home network. I might make the multimedia files available in the VPN through HTTP Protocols relying on link local addresses and multicast shouldn't work over VPN connections by design. I recently searched for a way to announce 5 camera live streams and a bunch of videos encoded before via UPnP and ended up with something called 'xupnpd' (runs on ARMv7/A20). I use the following code to provide one playlist containing the 5 livestreams: PlayList=/usr/local/xupnpd/src/playlists/playlist.m3u StartPort=8551 StreamFolder="${StreamBase}/$(date "+%Y-%m-%d")" echo -e "#EXTM3U name=\"Live\"" >"${PlayList}" sleep 1 grep -v "#" /var/run/pispy.lst | while read ; do set $REPLY Hostname=$1 Address=$2 # create playlist entry echo -e "#EXTINF:0 type=h264 ,${Hostname}\nrtsp://${MyAddress}:${StartPort}/${Hostname}" >>"${PlayList}" # create stream file if [ ! -d "${StreamFolder}" ]; then mkdir -p -m2777 "${StreamFolder}" fi StreamName="${TimeNow}-${Hostname}.h264" StreamFile="${StreamFolder}/${StreamName}" /usr/local/pispy/record-and-transcode-stream.sh ${Hostname} ${Address} "${StreamFile}" ${StartPort} & StartPort=$(( ${StartPort} + 1 )) done All previous recordings are converted to .mp4 files and then I let another script also create playlist for all these files. The skeleton looks like this (just to give you an idea how the .m3u files should look like since this took me some time): PlayList="${TempDir}/record-${i}.m3u" ((i++)) # check whether it's today Today="$(date "+%Y-%m-%d")" if [ "X$FolderName" = "X${Today}" ]; then echo -e "#EXTM3U name=\"Aufzeichnungen Heute\"" >"${PlayList}" else echo -e "#EXTM3U name=\"Aufzeichnungen ${FolderName}\"" >"${PlayList}" fi find "${StreamBase}/${FolderName}" -name "*.mp4" | sort | while read ; do ... echo -e "#EXTINF:0 event=reload ,${ClipName}\nfile://${StreamBase}/${FolderName}/${FileName}" >>"${PlayList}" done Maybe you can use xupnpd as some sort of proxy providing SSDP multicast announcements at the other side of the VPN connection?
Rui Ribeiro Posted November 16, 2015 Posted November 16, 2015 I am actually wrote a very basic script to generate HTML5 and some srt conversion to vtt to stream films via a browser. I will later try to read with more attention your post, thanks for the ideas.
paul75 Posted May 14, 2016 Posted May 14, 2016 Hello, I test it and When I install apache, php ... I've got this error : "E: Package 'libapache2-mod-suphp' has no installation candidate" Thanks
Igor Posted May 15, 2016 Author Posted May 15, 2016 Where did you install this? Debian Jessie, Wheezy, Trusty, ... ? arm, arm64, amd64, x86 ?
Bernie_O Posted May 15, 2016 Posted May 15, 2016 I setup an IPsec VPN on the lamobo, but now I cannot see DLNA on my iphone while remote, only in the local network. Out of curiosity, has anyone managed to setup minidlna working at the same time, but in the local and in the VPN network? I will give it a try again later on. Isn't DLNA device discovery based on SSDP and works therefore only with link local addresses in the LAN? Protocols relying on link local addresses and multicast shouldn't work over VPN connections by design.Hm - maybe I misconfigured something somewhere, but I am using minidlna on my banana pi via VPN when I am not at home for quite a while now without any problems. IPsec VPN is not setup on the banana pi, but on my Router (it is a fritz.box 7390).Service-discovery works only when I am at home in my LAN but once the client (I use iPhone and iPad with an app called nPlayer) is configured - I can access my media files via dlna when I am physically not at home but connected via VPN. I don't think I did anything special in configuring minidlna and I am willing to share the settings of my /etc/mindlna.conf if someone is interested...
Rui Ribeiro Posted May 15, 2016 Posted May 15, 2016 @paul, suphp is deprecated in jessie. I would advise using libapache2-mod-ruid2 Please see my answer here. http://unix.stackexchange.com/questions/262138/apache-cant-access-file-while-is-has-permission
paul75 Posted May 19, 2016 Posted May 19, 2016 Where did you install this? Debian Jessie, Wheezy, Trusty, ... ? arm, arm64, amd64, x86 ? Hello, I install in Jessie, in my arm board....
paul75 Posted May 19, 2016 Posted May 19, 2016 @paul, suphp is deprecated in jessie. I would advise using libapache2-mod-ruid2 Please see my answer here. http://unix.stackexchange.com/questions/262138/apache-cant-access-file-while-is-has-permission maybe but in the script it want to install automatly it is not my choice
amsaravi Posted June 1, 2016 Posted June 1, 2016 i want to load a script at boot time using the instructions provided at this site: http://tutos.readthedocs.io/en/latest/source/ndg.html If it is working, it’s great! Now we’ll daemonize it by using systemd. Of course you can use another init system (like Ubuntu upstart. Just search for “how to run script after bootâ€. Create new service file /usr/lib/systemd/system/gunicorn_ourcase.service and insert this: [Unit] Description=Ourcase gunicorn daemon [Service] Type=simple User=nginx ExecStart=/var/www/test/gunicorn_start.sh [Install] WantedBy=multi-user.target now enable it as with other units: systemctl enable gunicorn_ourcase but when i want to run the command systemctl enable gunicorn_ourcase it prompts: Failed to execute operation: No such file or directory when i add the --user switch, this error will occure: Failed to get D-Bus connection: Connection refused what is the problem with the command and what can i do?
JaFonseca Posted December 13, 2016 Posted December 13, 2016 Ihave this error..And now what can I do? Have I need to reinstall all again?
Igor Posted December 13, 2016 Author Posted December 13, 2016 This install script was originally designed for Debian Wheezy, while I do use it on Debian Jessie but ... with nginx so I could not notice this problem. Xenial ... don't know. Do you use Jessie or Xenial base? BTW: this module is optional, so let's remove it.https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/2/ Exits only in wheezy https://packages.debian.org/search?keywords=libapache2-mod-suphp I am not sure if it's safe to restart the installation ... clean install is better way, after fix ... or simply use ngix. It's working. This forum is a working example
JaFonseca Posted December 13, 2016 Posted December 13, 2016 This install script was originally designed for Debian Wheezy, while I do use it on Debian Jessie but ... with nginx so I could not notice this problem. Xenial ... don't know. Do you use Jessie or Xenial base? BTW: this module is optional, so let's remove it. https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/2/ Exits only in wheezy https://packages.debian.org/search?keywords=libapache2-mod-suphp I am not sure if it's safe to restart the installation ... clean install is better way, after fix ... or simply use ngix. It's working. This forum is a working example I use Jessie I try to make server with an orange pi zero 256mb, is that possible. I dont use never nginx (only apache ) well I try to 'clean install' how can I do it? If I would like to create a wordpress blog, is this viable with orange pi zero? thanks
Igor Posted December 13, 2016 Author Posted December 13, 2016 This script install Ispconfig which is a powerful and complex tool. It's not just web server. It would be better it you start with some generic Debian / Ubuntu how to. It's exactly the same. If you are running our Debian Jessie, google for "Debian Jessie webserver howto" "Debian Jessie apache howto" or similar.
marine88 Posted February 17, 2017 Posted February 17, 2017 I there i can install ispconfig in orangepi zero 512mb ram but after that i can´t reach it i use x.x.x.x:4000 and nothing heapend Any help?
Igor Posted February 17, 2017 Author Posted February 17, 2017 I there i can install ispconfig in orangepi zero 512mb ram but after that i can´t reach it i use x.x.x.x:4000 and nothing heapend Any help? Last time I was installing it to Debian Jessie - few months ago, it was working normally. In case of troubles - check logs and read documentations. There are no quick solutions: Note that ISPconfig is a complex and powerful tool. I also need to read manual if things broke: http://www.ispconfig.org/get-support/ If you need just a web server wih php and perhaps sql, check those tutorials: https://www.digitalocean.com/community/tutorials
Igor Posted April 2, 2017 Author Posted April 2, 2017 Bump. https://github.com/igorpecovnik/Debian-micro-home-server Script reworked - need some testing. Known bugs: ISPconfig fails to install on Ubuntu Xenial.
Igor Posted April 4, 2017 Author Posted April 4, 2017 Added to nightly builds from tomorrow. login and type armbian-config Need testing and ideas.
zador.blood.stained Posted April 4, 2017 Posted April 4, 2017 58 minutes ago, Igor said: Need testing and ideas. In the future - merge armbianmonitor, h3disp, sunxi-musb (if it is still actual) into this tool and implement similar tasks (switching host/OTG mode, switching display resolution) where it is possible (i.e. with mainline u-boot environment can be edited from the OS using fw_setenv) . Backwards compatibility can be achieved by using symlinks with names for older tools and using basename $0 to check how the tool was executed.
zador.blood.stained Posted April 11, 2017 Posted April 11, 2017 Do we really want to show this [ General system configuration: armbian-config ] on every login in every new shell/session? Or only once is enough?
Igor Posted April 11, 2017 Author Posted April 11, 2017 Once at first login or perhaps for user root only?
zador.blood.stained Posted April 11, 2017 Posted April 11, 2017 2 minutes ago, Igor said: Once at first login or perhaps for user root only? Or move it to 99-point-to-faq MOTD script, so it will be displayed once after every board support package update
Bubba Posted April 11, 2017 Posted April 11, 2017 I like having there when logging in, the kids who are playing with the boards would find it easier than digging around via CLI.
Superkoning Posted April 11, 2017 Posted April 11, 2017 armbian-config says "Toogle running services" and "Toogle virtual ...". I'm assuming Toogle is not a mix of Toggle and Google ;-), so I guess it must be a typo. I would like to send a PR for that, but: https://github.com/igorpecovnik/Debian-micro-home-server/tree/dev does not contain armbian-config, but debian-config (which contains the same code). So ... how should I send a Pull Request?
Igor Posted April 12, 2017 Author Posted April 12, 2017 9 hours ago, Superkoning said: https://github.com/igorpecovnik/Debian-micro-home-server/tree/dev does not contain armbian-config, but debian-config (which contains the same code). So ... how should I send a Pull Request? This is it. It's only renamed upon install. The idea behind is to develop generic architecture independent installer and config with build in special things for Armbian, when used within. Yes, there are typos and bugs to hunt down and it's better if this is done by somebody else but me. I can overlook even most obvious one at this stage Edit: If someone has time - we could move up a little. Instead of toggling we could provide adjusted text related to reality: Wireless - connect to your router / Wireless - disconnect from your router
Recommended Posts