لم يتم العثور على أمر تثبيت المشروب إنجن إكس
-
13-12-2019 - |
سؤال
أفعل
$ brew install nginx
والحصول على:
==> Downloading http://nginx.org/download/nginx-1.2.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/nginx-1.2.2.tar.gz
==> Patching
patching file conf/nginx.conf
==> ./configure --prefix=/usr/local/Cellar/nginx/1.2.2 --with-http_ssl_module --with-pcre --with-ipv6 --with-cc-opt=-I/usr/local/include --with-ld-opt=-L/usr/local/lib --conf
==> make
==> make install
==> Caveats
In the interest of allowing you to run `nginx` without `sudo`, the default
port is set to localhost:8080.
If you want to host pages on your local machine to the public, you should
change that to localhost:80, and run `sudo nginx`. You'll need to turn off
any other web servers running port 80, of course.
You can start nginx automatically on login running as your user with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/nginx/1.2.2/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
Though note that if running as your user, the launch agent will fail if you
try to use a port below 1024 (such as http's default of 80.)
Warning: /usr/local/sbin is not in your PATH
You can amend this by altering your ~/.bashrc file
لدي هذا في بلدي~/.ملف اللجنة:
export PATH=$PATH:/usr/local/sbin
عندما أقوم بتشغيل إنجن إكس-في أو سودو إنجن إكس-تي أحصل على هذا:
-bash: nginx: command not found
وأنا لم تقم بتثبيت إنجن إكس بشكل صحيح?
المحلول
تشغيل مسار Echo $، هل / USR / المحلي / يظهر Sbin؟ ان لم: جرب مصادر ملف ~ / .bashrc الخاص بك ومعرفة ما إذا كان يظهر: المصدر ~ / .bashrc
قم بتشغيل مسار Echo $ مرة أخرى.يجب أن يردع.
نصائح أخرى
في بلدي دبيان 6 خادم نجينكس مثبت في /usr/sbin/
.إذا كنت ترغب في الوصول إليه مباشرة من المحطة الطرفية ، أضف هذا الدليل إلى متغير المسار الخاص بك:
PATH=/usr/sbin/:$PATH
ال sbin
تضاف الدلائل عادة إلى مسار للمستخدم الجذر, هل قمت بتسجيل الدخول في محطة كجذر?إن لم يكن يمكنك القيام بذلك عن طريق إدخال su
الأمر.
أنا فقط تثبيت نجينكس بواسطة بريوهوم ، وأجد المسار هو /usr/local/Cellar/nginx/1.12.0/bin
, ، لذلك أنا فقط أضيف export PATH=$PATH:/usr/local/Cellar/nginx/1.12.0/bin
إلى ملف أسيوط ، وأنها تعمل بشكل جيد.
لمعلوماتك