Web server за Linux дебиан

Всичко за извъндизайнерският профил на Вашият компютър
h4x0r
Турист
Турист
Posts: 269
Joined: Thu Jan 14, 2010 7:56 am

Web server за Linux дебиан

Post by h4x0r » Sun Jun 12, 2011 9:25 pm

Здравейте ...
Писах в няколко форума за тази тема но всеки се направи на интересен и нищо правилно не ми казаха...

Въпроса ми е следният.

Как да си инсталирам Web server ? Apache MySql PMA

nom3r1
Гуру
Гуру
Posts: 2048
Joined: Thu Oct 16, 2008 10:47 am
Answers: 156

Re: Web server за Linux дебиан

Post by nom3r1 » Sun Jun 12, 2011 10:15 pm

'щом си h4x0r трябва да знаеш :)

А сега сериозно.

root@localhost~# apt-get update
root@localhost~# apt-get install mysql-server mysql-client
root@localhost~# apt-get install apache2
root@localhost~# apt-get install php5 libapache2-mod-php5
root@localhost~# /etc/init.d/apache2 restart
root@localhost~# apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
root@localhost~# /etc/init.d/apache2 restart
root@localhost~# install phpmyadmin

http://ip/phpmyadmin

Жив , здрав, прав, ку*ав. :?:
Last edited by nom3r1 on Sun Jun 12, 2011 10:51 pm, edited 1 time in total.

h4x0r
Турист
Турист
Posts: 269
Joined: Thu Jan 14, 2010 7:56 am

Post by h4x0r » Sun Jun 12, 2011 10:18 pm

Code: Select all

root@debian:/home/exp# apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate
E: Package 'mysql-client' has no installation candidate
root@debian:/home/exp#

нито една команда не ми помогна :D

nom3r1
Гуру
Гуру
Posts: 2048
Joined: Thu Oct 16, 2008 10:47 am
Answers: 156

Post by nom3r1 » Sun Jun 12, 2011 10:25 pm

apt-get update ?

Ако ли не, тогава си оправи хранилищата и:

root@localhost~# nano /etc/apt/sources.list

сложи т'ва вместо твоето:

Code: Select all

	
#za vseki sluchai:
# deb ftp://ftp.debian.org/debian/ stable main contrib non-free
# deb ftp://ftp.debian.org/debian/ testing main contrib non-free
# deb ftp://ftp.debian.org/debian/ unstable main contrib non-free

#bghranilishta
deb ftp://ftp.bg.debian.org/debian/ stable main contrib non-free
deb ftp://ftp.bg.debian.org/debian/ testing main contrib non-free
deb ftp://ftp.bg.debian.org/debian/ unstable main contrib non-free

#deb-src ftp://ftp.bg.debian.org/debian/ stable main contrib non-free
#deb-src ftp://ftp.bg.debian.org/debian/ testing main contrib non-free
#deb-src ftp://ftp.bg.debian.org/debian/ unstable main contrib non-free

#deb ftp://debian.ludost.net/debian-non-US/ stable/non-US main contrib non-free
#deb ftp://debian.ludost.net/debian-non-US/ testing/non-US main contrib non-free
#deb ftp://debian.ludost.net/debian-non-US/ unstable/non-US main contrib non-free

#deb ftp://debian.ludost.net/debian/ proposed-updates main contrib non-free
#deb ftp://debian.ludost.net/debian/ testing-proposed-updates main contrib non-free

#deb ftp://ftp.uni-sofia.bg/debian-addons-bg/ ./
#deb ftp://ftp.logos-bg.net/debian-addons-bg/ ./
#deb-src ftp://ftp.logos-bg.net/debian-addons-bg/ ./

#Debian security
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free

#Debian multimedia
deb http://www.debian-multimedia.org/ sid main
deb http://www.debian-multimedia.org/ etch main
deb http://www.debian-multimedia.org/ sarge main

#New kernels
#deb http://kernel-archive.buildserver.net/debian-kernel/ sid main
после го запаметяваш , следваща стъпка и после виж предното ми мнение ~>
root@localhost~# apt-get update
root@localhost~# aptitude update
Last edited by nom3r1 on Sun Jun 12, 2011 10:30 pm, edited 1 time in total.

h4x0r
Турист
Турист
Posts: 269
Joined: Thu Jan 14, 2010 7:56 am

Post by h4x0r » Sun Jun 12, 2011 10:29 pm

nom3r1 wrote:apt-get update ?

Ако ли не, тогава си оправи хранилищата и:

apt-get update/upgrade
aptitude update
Това го направих но другите пак не ми тръгнаха само ъпдейт-а ми бачка...

Не съм много навътре btw

nom3r1
Гуру
Гуру
Posts: 2048
Joined: Thu Oct 16, 2008 10:47 am
Answers: 156

Post by nom3r1 » Sun Jun 12, 2011 10:30 pm

Редактирах си мнението.
Ако не стане ~>
root@localhost~# apt-cache search apache2

и ми копирай

h4x0r
Турист
Турист
Posts: 269
Joined: Thu Jan 14, 2010 7:56 am

Post by h4x0r » Sun Jun 12, 2011 10:41 pm

сега зацепи ето тук

Code: Select all

root@debian:/home/exp# install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
install: target `php5-json' is not a directory
root@debian:/home/exp#
и можеш ли да ми кажеш каква е командата за да спра apache и каде се намира папката www или htdocs

nom3r1
Гуру
Гуру
Posts: 2048
Joined: Thu Oct 16, 2008 10:47 am
Answers: 156

Post by nom3r1 » Sun Jun 12, 2011 10:45 pm

root@debian:/home/exp# install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
install: target `php5-json' is not a directory
root@debian:/home/exp#
я пробвай така ~>

root@localhost~# apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json


/etc/init.d/apache2 start|stop|restart /би трябвало да са ти ясни start,stop,restart, за к'во са.

Мисля, че беше /var/www, не съм сигурен говоря наизуст.

ЕДИТ: Забравил си APT-GET!

h4x0r
Турист
Турист
Posts: 269
Joined: Thu Jan 14, 2010 7:56 am

Post by h4x0r » Sun Jun 12, 2011 10:50 pm

До тук всичко перфектно ако ми кажеш как се даваха права на определен user в debian до определена папка ще си златен .
Пример user "exp" как да има 0777 права в /var/www/

nom3r1
Гуру
Гуру
Posts: 2048
Joined: Thu Oct 16, 2008 10:47 am
Answers: 156

Post by nom3r1 » Sun Jun 12, 2011 10:55 pm

Не ми се иска да съм златен, нито платинен. Ще оставя да се понаучиш малко сам, за да си знаеш за напред. :)

Попитай чичо Гугъл за Folder permission in linux

Можеш и да погледнеш тази статия :?:

http://www.linuxforums.org/articles/fil ... ns_94.html

Иначе, ако просто искаш самата папка да има права 777 пиши в терминала :

root@localhost~# chmod 777 folder/www/htdocs/kvatoiskashpapka

ЕДИТ: Не съм сигурен, но и това би ти свършило работа при чичо Гугъл ~> How to CHOWN folders for apache user

ЕДИТ2: Сега видях, че си искал права 777..

chmod 777 papkata

Post Reply