Форум обсуждения систем  

Вернуться   Форум обсуждения систем "Умный дом", проектов Ардуино, OpenWRT и других DIY устройств > Форум умного дома > Сделай сам > OpenWRT/LEDE

Ответ
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.08.2015, 10:14   #151
xADMx
Junior Member
 
Регистрация: 22.08.2015
Сообщений: 1
Вес репутации: 0
xADMx is an unknown quantity at this point
По умолчанию Re: Запускаем Web Server на OpenWrt

Добрый день!
При попытки сделать sh скрипт для выполнения всех операций по созданию web-сервера выходят ошибки, также при выполнении команд в консоле все выполняется.
Помогите исправить, заранее благодарен.
Сам файл:
Цитата:
#!/bin/sh
echo 'Install system'
echo 'Add group and user'
echo web:x:101: >> /etc/group
echo wwwadmin:*:101:101:wwwadmin:/srv/www:/bin/ash >> /etc/passwd
mkdir -p /srv/www/
chmod 755 /srv/www/
chgrp web /srv/www/
chown wwwadmin /srv/www/
passwd wwwadmin
opkg update
opkg install lighttpd lighttpd-mod-cgi lighttpd-mod-redirect php5-cgi
wget -P /srv/www/ http://сайт/pub/index.p
mv /srv/www/index.p /srv/www/index.php
вот что выдает:
Цитата:
root@OpenWrt:~# chmod 755 install.sh
root@OpenWrt:~# sh install.sh
Install system
Add group and user
passwd: unknown user wwwadmin
opkg: unknown sub-command update
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
update Update list of available packages
upgrade <pkgs> Upgrade packages
install <pkgs> Install package(s)
configure <pkgs> Configure unpacked package(s)
remove <pkgs|regexp> Remove package(s)
flag <flag> <pkgs> Flag package(s)
<flag>=hold|noprune|user|ok|installed|un packed (one per invocation)

Informational Commands:
list List available packages
list-installed List installed packages
list-upgradable List installed and upgradable packages
list-changed-conffiles List user modified configuration files
files <pkg> List files belonging to <pkg>
search <file|regexp> List package providing <file>
find <regexp> List packages whose name or description matches <regexp>
info [pkg|regexp] Display all info for <pkg>
status [pkg|regexp] Display all status for <pkg>
download <pkg> Download <pkg> to current directory
compare-versions <v1> <op> <v2>
compare versions using <= < > >= = << >>
print-architecture List installable package architectures
depends [-A] [pkgname|pat]+
whatdepends [-A] [pkgname|pat]+
whatdependsrec [-A] [pkgname|pat]+
whatrecommends[-A] [pkgname|pat]+
whatsuggests[-A] [pkgname|pat]+
whatprovides [-A] [pkgname|pat]+
whatconflicts [-A] [pkgname|pat]+
whatreplaces [-A] [pkgname|pat]+

Options:
-A Query all packages not just those installed
-V[<level>] Set verbosity level to <level>.
--verbosity[=<level>] Verbosity levels:
0 errors only
1 normal messages (default)
2 informative messages
3 debug
4 debug level 2
-f <conf_file> Use <conf_file> as the opkg configuration file
--conf <conf_file>
--cache <directory> Use a package cache
-d <dest_name> Use <dest_name> as the the root directory for
--dest <dest_name> package installation, removal, upgrading.
<dest_name> should be a defined dest name from
the configuration file, (but can also be a
directory name in a pinch).
-o <dir> Use <dir> as the root directory for
--offline-root <dir> offline installation of packages.
--add-arch <arch>:<prio> Register architecture with given priority
--add-dest <name>:<path> Register destination with given path

Force Options:
--force-depends Install/remove despite failed dependencies
--force-maintainer Overwrite preexisting config files
--force-reinstall Reinstall package(s)
--force-overwrite Overwrite files from other package(s)
--force-downgrade Allow opkg to downgrade packages
--force-space Disable free space checks
--force-postinstall Run postinstall scripts even in offline mode
--force-remove Remove package even if prerm script fails
--force-checksum Don't fail on checksum mismatches
--noaction No action -- test only
--download-only No action -- download only
--nodeps Do not follow dependencies
--nocase Perform case insensitive pattern matching
--force-removal-of-dependent-packages
Remove package and all dependencies
--autoremove Remove packages that were installed
automatically to satisfy dependencies
-t Specify tmp-dir.
--tmp-dir Specify tmp-dir.

regexp could be something like 'pkgname*' '*file*' or similar
e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'
Unknown package 'lighttpd'.
Unknown package 'lighttpd-mod-cgi'.
Unknown package 'lighttpd-mod-redirect'.
'.known package 'php5-cgi
Collected errors:
* opkg_install_cmd: Cannot install package lighttpd.
* opkg_install_cmd: Cannot install package lighttpd-mod-cgi.
* opkg_install_cmd: Cannot install package lighttpd-mod-redirect.
.* opkg_install_cmd: Cannot install package php5-cgi
Connecting to сайт (0.0.0.0)
wget: server returned error: HTTP/1.1 400 Bad Request
mv: can't rename '/srv/www/index.p': No such file or directory

Последний раз редактировалось xADMx; 22.08.2015 в 12:49.
xADMx вне форума   Ответить с цитированием
Старый 05.12.2015, 16:48   #152
obmp
Junior Member
 
Регистрация: 05.12.2015
Сообщений: 1
Вес репутации: 0
obmp is an unknown quantity at this point
По умолчанию Re: Запускаем Web Server на OpenWrt

Делал по инструкции, но без установки РНР. Грузит html страницу люси. Такое ощущение что не хочет читать server.document-root. Хотя изменил на папку где сайт.
obmp вне форума   Ответить с цитированием
Старый 06.12.2015, 01:29   #153
stD
Senior Member
 
Аватар для stD
 
Регистрация: 02.04.2012
Адрес: Питер
Сообщений: 1,125
Вес репутации: 1311
stD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant futurestD has a brilliant future
По умолчанию Re: Запускаем Web Server на OpenWrt

Мне кажется, что вот здесь у вас затык:
Цитата:
passwd wwwadmin
Проделайте всё вручную.
__________________
istarik.ru
stD вне форума   Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Текущее время: 12:21. Часовой пояс GMT +3.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Яндекс.Метрика