ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > ИНФО > Статьи > Чужие Статьи
   
 
 
Опции темы Поиск в этой теме Опции просмотра

LightHTTPd Install for FreeBSD
  #11  
Старый 16.02.2009, 22:34
Аватар для PandoraBox
PandoraBox
Постоянный
Регистрация: 06.05.2007
Сообщений: 393
Провел на форуме:
1510937

Репутация: 398
Отправить сообщение для PandoraBox с помощью ICQ
По умолчанию LightHTTPd Install for FreeBSD

FreeBSD

FreeBSD has the ports and lighttpd is in this tree for a long time now.

Код:
# cd /usr/ports/www/lighttpd
# make install clean
Код:
# cd /usr/ports/lang/php5/
# make install clean
Make sure you enable FastCGI support in the configuration dialog. If you don't get the configuration dialog, do "make config" first. The additional CONFIG_ARGS for the PHP5 installation force cgi-fcgi support in /usr/local/bin/php. The option '--with-pcre-regex' is needed to support several functions that use regular expressions like 'preg_match'.

php -v should give you something like this:

PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 8 2007 05:47:06)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

PHP extensions are in /usr/ports/lang/php5-extensions/. If you need mySQL support, that is where you can find it, select only extensions that you actually need. During compiling when it asks you to install UTF8 support, I suggest you install it.

Код:
# cd /usr/ports/lang/php5-extensions
# make config
# make install clean
Now that everything is installed, enable Lighttpd in rc.conf and edit it's configuration:

Код:
# echo lighttpd_enable=\"YES\" >> /etc/rc.conf
# cd /usr/local/etc/
# cp lighttpd.conf.sample lighttpd.conf
# cp php.ini-recommended php.ini
You will probably need to create some directories and files, since the port neglects to do them for you (as of 2008 February 24):

Код:
# mkdir /var/log/lighttpd
# touch /var/log/lighttpd/lighttpd.error.log
# touch /var/log/lighttpd/lighttpd.access.log
Make your new directories and files accessible by the user and group "www" that Lighttpd operates as:

Код:
# chown www:www /var/log/lighttpd
# chown www:www /var/log/lighttpd/lighttpd.error.log
# chown www:www /var/log/lighttpd/lighttpd.access.log
Edit lighttpd.conf to use the new directories and files as follows:

Код:
* server.errorlog = "/var/log/lighttpd/lighttpd.error.log"
* accesslog.filename = "/var/log/lighttpd/lighttpd.access.log"
Edit lighttpd.conf docroot:

Код:
* server.document-root = "/usr/local/www/"
Test to make sure Lighttpd starts up properly:

Код:
# /usr/local/etc/rc.d/lighttpd start
If you need to, you may shutdown lighttpd this way:

Код:
# /usr/local/etc/rc.d/lighttpd stop
And then restart it with this:

Код:
# /usr/local/etc/rc.d/lighttpd restart
If you get an error that says "permission denied", check to make sure that the files and directories mentioned exist AND that user www has permission to operate on them. Also be sure that lighttpd.conf has been corrected from the non-working default version. If you get no errors, put an HTML file in /usr/local/www/ and try to load it up in your browser. If everything works, now enable PHP:

* In section "server.modules" uncomment the line "mod_fastcgi"
* uncomment the entire section "fastcgi.server"
* add the following lines under "socket" in the "fastcgi.server" section:

Код:
"bin-path" => "/usr/local/bin/php-cgi",
"broken-scriptfilename" => "enable"


Now make some more files and directories that are missing from the port (as of 2008 Feb 29):

Код:
# mkdir /var/run/lighttpd
# touch /var/run/lighttpd/php-fastcgi.socket


Make your new directories and files accessible by the user and group "www" that Lighttpd operates as:

Код:
# chown www:www /var/run/lighttpd
# chown www:www /var/run/lighttpd/php-fastcgi.socket
 
Ответить с цитированием
 



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
FreeBSD 7; PCMCIA procedure *nix 16 17.07.2008 14:32
Новые сравнения производительности FreeBSD и Linux zythar Мировые новости 5 08.03.2008 23:27
Вышла операционная система FreeBSD 6.3 Mr. P.S. Мировые новости 1 19.01.2008 00:30
Шлюз в интернет на FreeBSD - Быстрая установка netf0x Soft - *nix 3 07.08.2007 20:08



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


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




ANTICHAT.XYZ