Fedora 3: Mettre en place et configuration un serveur apache linux

bonjour, je voudrais savoir comment demarrer le service apache sous une fedora.

[root@localhost www]# ls
cgi-bin  error  html  icons  manual  usage
[root@localhost www]# cd html
[root@localhost html]# adduser betav1
[root@localhost html]#
[root@localhost html]# cd /home/betav1/
[root@localhost betav1]# ls
[root@localhost betav1]# ls
[root@localhost betav1]# /etc/init.d/apache restart
-bash: /etc/init.d/apache: Aucun fichier ou répertoire de ce type
[root@localhost betav1]# /etc/init.d/apache reload
-bash: /etc/init.d/apache: Aucun fichier ou répertoire de ce type
[root@localhost betav1]# /etc/init.d/apache reload
-bash: /etc/init.d/apache: Aucun fichier ou répertoire de ce type
[root@localhost betav1]# restart apache
-bash: restart: command not found
[root@localhost betav1]# /etc/init.d/apache star
-bash: /etc/init.d/apache: Aucun fichier ou répertoire de ce type
[root@localhost betav1]#
[root@localhost betav1]#

également voir la list des service qui tourne. et l’url appelle pour voir le site dans le dossier betav1…

démarer un service
service httpd start

Liste des services qui tournent (tous les programmes)
ps -Al

C’est également possible de faire les deux en lançant
system-config-services

sinon y’a toujours la solution standard : apachectl [start|stop|restart|graceful|configtest]

Merci . par contre : system-config-services ne focntionne pas!!!

[cpp][root@localhost betav1]# ls /etc/init.d
acpid dund kdcrotate netfs portmap smartd
anacron functions killall netplugd psacct smb
atd gpm kudzu network readahead squid
autofs haldaemon lm_sensors NetworkManager readahead_early sshd
bluetooth halt mdmonitor nfs rhnsd syslog
cpuspeed hidd mdmpd nfslock rpcgssd tux
crond httpd mDNSResponder nifd rpcidmapd winbind
cups iptables messagebus nscd rpcsvcgssd xfs
dc_client irda microcode_ctl ntpd saslauthd xinetd
dc_server irqbalance mysqld pand sendmail ypbind
diskdump isdn netdump pcmcia single yum
[root@localhost betav1]#[/cpp]

[cpp][root@localhost betav1]# apachectl [start|stop|restart|graceful|configtest]
-bash: stop: command not found
-bash: restart: command not found
-bash: graceful: command not found
-bash: configtest]: command not found
[root@localhost betav1]#
[/cpp]

Pour reprendre le topics de v_atekor
voici les elements lister via la commande: car j’aurais quelque question concernat les services qui ne sont pas utilise pour un serveur apache…

[cpp]

[root@localhost betav1]# ps -Al
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 1 0 0 76 0 - 1184 - ? 00:00:00 init
1 S 0 2 1 0 -40 - - 0 migrat ? 00:00:00 migration/0
1 S 0 3 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/0
1 S 0 4 1 0 -40 - - 0 migrat ? 00:00:00 migration/1
1 S 0 5 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/1
1 S 0 6 1 0 -40 - - 0 migrat ? 00:00:00 migration/2
1 S 0 7 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/2
1 S 0 8 1 0 -40 - - 0 migrat ? 00:00:00 migration/3
1 S 0 9 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/3
1 S 0 10 1 0 65 -10 - 0 worker ? 00:00:00 events/0
1 S 0 11 1 0 65 -10 - 0 worker ? 00:00:00 events/1
1 S 0 12 1 0 65 -10 - 0 worker ? 00:00:00 events/2
1 S 0 13 1 0 65 -10 - 0 worker ? 00:00:00 events/3
1 S 0 14 10 0 65 -10 - 0 worker ? 00:00:00 khelper
1 S 0 15 10 0 75 -10 - 0 worker ? 00:00:00 kacpid
1 S 0 42 10 0 65 -10 - 0 worker ? 00:00:00 kblockd/0
1 S 0 43 10 0 65 -10 - 0 worker ? 00:00:00 kblockd/1
1 S 0 44 10 0 65 -10 - 0 worker ? 00:00:00 kblockd/2
1 S 0 45 10 0 65 -10 - 0 worker ? 00:00:00 kblockd/3
1 S 0 46 1 0 75 0 - 0 hub_th ? 00:00:00 khubd
1 S 0 60 10 0 80 0 - 0 pdflus ? 00:00:00 pdflush
1 S 0 61 10 0 75 0 - 0 pdflus ? 00:00:00 pdflush
1 S 0 63 10 0 71 -10 - 0 worker ? 00:00:00 aio/0
1 S 0 62 1 0 85 0 - 0 kswapd ? 00:00:00 kswapd0
1 S 0 64 10 0 65 -10 - 0 worker ? 00:00:00 aio/1
1 S 0 65 10 0 65 -10 - 0 worker ? 00:00:00 aio/2
1 S 0 66 10 0 65 -10 - 0 worker ? 00:00:00 aio/3
1 S 0 138 1 0 83 0 - 0 serio_ ? 00:00:00 kseriod
1 S 0 203 12 0 66 -10 - 0 worker ? 00:00:00 ata/0
1 S 0 204 10 0 65 -10 - 0 worker ? 00:00:00 ata/1
1 S 0 205 12 0 65 -10 - 0 worker ? 00:00:00 ata/2
1 S 0 206 10 0 65 -10 - 0 worker ? 00:00:00 ata/3
1 S 0 208 1 0 79 0 - 0 160455 ? 00:00:00 scsi_eh_0
1 S 0 209 1 0 79 0 - 0 160455 ? 00:00:00 scsi_eh_1
1 S 0 226 12 0 66 -10 - 0 worker ? 00:00:00 kmirrord/0
1 S 0 227 10 0 65 -10 - 0 worker ? 00:00:00 kmirrord/1
1 S 0 228 12 0 65 -10 - 0 worker ? 00:00:00 kmirrord/2
1 S 0 229 10 0 65 -10 - 0 worker ? 00:00:00 kmirrord/3
1 S 0 238 1 0 75 0 - 0 kjourn ? 00:00:00 kjournald
0 S 0 1152 1 0 66 -10 - 898 - ? 00:00:00 udevd
1 S 0 1484 1 0 75 0 - 0 kjourn ? 00:00:00 kjournald
1 S 0 1836 1 0 76 0 - 903 - ? 00:00:00 syslogd
5 S 0 1840 1 0 76 0 - 631 syslog ? 00:00:00 klogd
5 S 32 1858 1 0 76 0 - 1184 - ? 00:00:00 portmap
5 S 29 1877 1 0 76 0 - 1447 - ? 00:00:00 rpc.statd
1 S 0 1907 1 0 76 0 - 906 - ? 00:00:00 rpc.idmapd
5 S 0 1968 1 0 76 0 - 1199 - ? 00:00:00 nifd
1 S 99 1997 1 0 76 0 - 3876 - ? 00:00:00 mDNSResponder
1 S 0 2015 1 0 80 0 - 632 - ? 00:00:00 acpid
5 S 0 2027 1 0 76 0 - 15392 - ? 00:00:00 cupsd
5 S 0 2067 1 0 77 0 - 5197 - ? 00:00:00 sshd
1 S 0 2098 1 0 78 0 - 2175 - ? 00:00:00 xinetd
5 S 0 2117 1 0 76 0 - 8744 - ? 00:00:00 sendmail
1 S 51 2127 1 0 76 0 - 6941 pause ? 00:00:00 sendmail
1 S 0 2137 1 0 75 0 - 1041 - ? 00:00:00 gpm
1 S 0 2146 1 0 76 0 - 11396 - ? 00:00:00 crond
5 S 43 2171 1 0 76 0 - 2491 - ? 00:00:00 xfs
1 S 2 2188 1 0 76 0 - 1168 - ? 00:00:00 atd
5 S 81 2205 1 0 75 0 - 1857 - ? 00:00:00 dbus-daemon-1
5 S 0 2216 1 0 76 0 - 4329 - ? 00:00:00 hald
4 S 0 2223 1 0 78 0 - 627 - tty1 00:00:00 mingetty
4 S 0 2224 1 0 79 0 - 627 - tty2 00:00:00 mingetty
4 S 0 2225 1 0 78 0 - 627 - tty3 00:00:00 mingetty
4 S 0 2226 1 0 78 0 - 627 - tty4 00:00:00 mingetty
4 S 0 2228 1 0 77 0 - 627 - tty5 00:00:00 mingetty
4 S 0 2230 1 0 78 0 - 627 - tty6 00:00:00 mingetty
4 S 0 2232 1 0 76 0 - 2201 - ? 00:00:00 kdm
4 S 0 2568 2232 0 75 0 - 10153 - ? 00:03:53 X
1 S 0 2594 2232 0 76 0 - 3008 pipe_w ? 00:00:00 kdm
4 S 0 2670 2594 0 75 0 - 26453 - ? 00:00:00 kdm_greet
4 S 0 3728 2067 0 76 0 - 8726 - ? 00:00:00 sshd
4 S 0 3730 3728 0 76 0 - 11376 wait pts/0 00:00:00 bash
4 R 0 3780 3730 0 77 0 - 1090 - pts/0 00:00:00 ps
[/cpp]

[cpp][root@localhost betav1]# uname -a
Linux localhost.localdomain 2.6.9-1.667smp #1 SMP Tue Nov 2 15:09:11 EST 2004 x86_64 x86_
64 x86_64 GNU/Linux

[root@localhost betav1]# ls /etc/init.d |grep -E ‘apa|htt’
httpd
[/cpp]

Redemarrage du service apache…
[cpp]
[root@localhost betav1]# /etc/init.d/httpd reload
Rechargement de httpd : [ OK ]
[root@localhost betav1]#[/cpp]

voilé j’espere que ça pourra servir a d’autre pour demarrer apache sous fedora 3…

Maintenant jevoudrais savoir quelles et comment supprimer les services inutile. et a quoi serve t-il?.
cancernant la command cité plus haut.

* [root@localhost betav1]# ps -Al

Comment savoir si phpmyadmin est installé?.
je voudrais savoir egalement si je cree un compte user .il me cree un compte web : for sample : 218.172.025.43/betav1/ !!

PHPMyAdmin n’est pas un service, c’est du PHP qui tourne donc sur Apache.

-> rpm -qa phpmyadmin
ou -> rpm -qa | grep phpmyadmin

(je ne sais plus laquelle des 2 est valable)

rpm c’est la commande pour faire des installe de package sur fedora?.
contrarement a debian avec apt-get install.

le truc que je t’ai donne veut dire que tu peux taper : apachectl start OU apachectl stop OU apachectl restart OU apachectl graceful OU apachectl configtest

pour connaitre toutes les possibilites : apachectl -h

Lorsque des commandes te sont donnees, ne les lance pas betement… surtout si tu ne les comprends pas…
Un petit gars s’est fait avoir dernierement comme ca avec un rm -Rf / qui lui a ete donne pour rire et qu’il a execute sans meme essayer de savoir ce qu’il faisait.
Et puis il y a aussi le fait que certains commandes sont dispos sur certains distribs et pas d’autres (surtout au niveau de l’administration propre au systeme)

oui, excate . je fais les chose rapidement.
:slight_smile:

MISE A JOURS DISTRIBUTION

Distribution Fedora 3. je voudrais savoir ou je dois intervenir fichier ou autre pour que je puisse mettre a jours la distribution a jours via internet;

Si je pars ainsi il risque de me demander les cd ce que je ne peux plus faire car le serveur au canada.

Suite a ça via google:

j’ai telecharge un nouveau fichier yum.conf,puis yum update . …

[cpp]You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider.[/cpp]

:heink:

t’as interet a bien apprendre a te servir de linux car si tu fais une erreur son serveur pourra etre out…
j’espere que tu as qqn sur place en cas d’erreur.

et puis une fois que ton serveur tourne et que tu as correctement la main dessus, sauvegarde les fichiers de conf afin de pouvoir tout remettre en place automatiquement en cas de mauvaise manip.
Voire mets en place un script qui remets en place automatiquement et regulierement des fichiers de conf surs et qui relance les services correspondants.
Enfin, bref, si ton serveur est si loin et que tu dois l’administrer a distance, calcule bien ton coup et tu devrais avoir une machine identique (matos et logiciel) sur laquelle tu feras tes tests.

c’est mon serveur que j’ai installée labas…
car on ma donné la possiblité de le mettre labes gratuitement avec une ip fixe…

il est vrai que je dois aprendre parfaitement linux. et je le fais sur le tas en prenant des notes…

Mais je bloque au niveau de la mise a jours.

Mon fichier yum.conf

[cpp][main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=fedora-release
tolerant=1
exactarch=0

Added this because some mirrors go down and then retying takes forever.

retries=1
timeout=10

Basic Repos are in /etc/yum.conf.d/

###################

Fedora Extras

###################

[extras]
name=Fedora Extras - $releasever - $basearch
baseurl=http://fr2.rpmfind.net/linux/fedora/extras/$releasever/$basearch/
http://mirrors.kernel.org/fedora/extras/$releasever/$basearch/
http://mirror.hiwaay.net/redhat/fedora/linux/extras/$releasever/$basearch/
http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/

http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/

gpgcheck=0
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras

###############

Livna.org

###############

[livna-stable]

name=Livna.org - Fedora Compatible Packages (stable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.stable
http://livna.cat.pdx.edu/fedora/$releasever/$basearch/RPMS.stable
#gpgcheck=1

[livna-unstable]
name=Livna.org - Fedora Compatible Packages (unstable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.unstable
http://livna.cat.pdx.edu/fedora/$releasever/$basearch/RPMS.unstable
#gpgcheck=1

[livna-testing]
name=Livna.org - Fedora Compatible Packages (testing)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.testing
http://livna.cat.pdx.edu/fedora/$releasever/$basearch/RPMS.testing
#gpgcheck=1

############

Jpackage

############

JPackage is a GREAT repository for Java Software.

However, you may have to compile some SRPMs to use it,

so it’s commented out by default. See

http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS

For the SRPMs, and http://www.jpackage.org/rebuilding.php for

the general details.

Note: JPackage IS compatible with the fedora.us repositories.

You can use JPackage and fedora.us at the same time, without

any trouble. It’s also compatible with the Alternate Repositories,

for the most part.

[jpackage-generic]
name=JPackage Cross-Platform Packages
baseurl=http://mirrors.sunsite.dk/jpackage/1.6/generic/free
ftp://jpackage.hmdc.harvard.edu/JPackage/1.6/generic/free
http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/jpackage/1.6/generic/free
failovermethod=priority
enabled=0
#gpgcheck=1

[jpackage-fedora]
name=JPackage Fedora Packages
baseurl=http://mirrors.sunsite.dk/jpackage/1.6/fedora-$releasever/free
ftp://jpackage.hmdc.harvard.edu/JPackage/1.6/fedora-$releasever/free
http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/jpackage/1.6/fedora-$releasever/free
failovermethod=priority
enabled=0
#gpgcheck=1

############################

Alternate Repositories

############################

To use these repos, either use the --enablerepo

command-line argument to yum, or change “enabled=0”

to “enabled=1”. Note: Some packagesfrom these repositories

may conflict with the fedora.us packages. If you use these

repositories, you may wish to disable the fedora.us and

livna.org repositories.

[freshrpms]
name=FreshRPMs
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=0
#gpgcheck=1

[dag]
name=Dag APT Repository
baseurl=http://dag.freshrpms.net/fedora/$releasever/en/$basearch/dag/
http://dag.atrpms.net/fedora/$releasever/en/$basearch/dag/
http://ftp.heanet.ie/pub/freshrpms/pub/dag/fedora/$releasever/en/$basearch/dag/
enabled=0
#gpgcheck=1

[dries]
name=Dries APT/YUM Repository
baseurl=http://ftp.freshrpms.net/pub/dag/dries/fedora/linux/$releasever/$basearch/dries/RPMS/
http://mirrors.ircam.fr/pub/dag/dries/fedora/linux/$releasever/$basearch/dries/RPMS/
http://apt.sw.be/dries/fedora/linux/$releasever/$basearch/dries/RPMS/
http://dries.studentenweb.org/yum/fedora/linux/$releasever/$basearch/dries/RPMS/
enabled=0
#gpgcheck=1
[newrpms]
name=NewRPMs
baseurl=http://newrpms.sunsite.dk/apt/redhat/en/$basearch/fc$releasever
http://newrpms.atrpms.net/apt/redhat/en/$basearch/fc$releasever
enabled=0
#gpgcheck=1

[atrpms]
name=ATrpms - Stable
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-stable
http://ftp-stud.fht-esslingen.de/atrpms/download.atrpms.net/fedora/$releasever/en/$basearch/at-stable
http://wftp.tu-chemnitz.de/pub/linux/ATrpms/fedora/$releasever/en/$basearch/at-stable
enabled=0
#gpgcheck=1

[atrpms-testing]
name=ATrpms - Testing
baseurl=http://wftp.tu-chemnitz.de/pub/linux/ATrpms/fedora/$releasever/en/$basearch/at-testing
http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-testing
http://ftp-stud.fht-esslingen.de/atrpms/download.atrpms.net/fedora/$releasever/en/$basearch/at-testing
enabled=0
#gpgcheck=1

Warning: Don’t enable this “bleeding” repo if you want stable software!

[atrpms-bleeding]
name=ATrpms - Bleeding
baseurl=http://apt.atrpms.net/fedora/$releasever/en/$basearch/at-bleeding
http://ftp-stud.fht-esslingen.de/atrpms/download.atrpms.net/fedora/$releasever/en/$basearch/at-bleeding
http://wftp.tu-chemnitz.de/pub/linux/ATrpms/fedora/$releasever/en/$basearch/at-bleeding
enabled=0
#gpgcheck=1

###################

Miscellaneous

###################

Semi-official Macromedia repository containing the flash-plugin rpm.

[flash]
name=macromedia.mplug.org - Flash Plugin
baseurl=http://macromedia.mplug.org/apt/fedora/$releasever
http://sluglug.ucsc.edu/macromedia/apt/fedora/$releasever
http://ruslug.rutgers.edu/macromedia/apt/fedora/$releasever
http://macromedia.rediris.es/apt/fedora/$releasever
enabled=0
#gpgcheck=1
[/cpp]

Normalement c’est cette ligne qui me permet d’avoir une clé public ?.
Donc je passe gpgcheck à 1
yum update toujours le même message.

[cpp]
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras

###############

Livna.org

###############
[/cpp]

A savoir que je suis bien sur une Fedora 3

Possible effectivement.

juste un copier/coller de l’excellent http://people.via.ecp.fr/~alexis/formation-linux/serveur-web.html
qui doit devenir ta bible de l’utilisation linux.

merci, je pensais que j’etais different car je suis sur une distribution fedora…
:slight_smile:

Suite de cette exemple. j’ai aplliqué celui-ci mais ça ne fonctionne pas .
[cpp]mkdir public_html
vi index.html

  • droite chmod xxx
    [/cpp]

test de nav sur :
[cpp] http://hostname/~betav1 or
http://hostname/~betav1/ or
http://hostname/~betav1/index.html or
http://hostname/betav1 or
http://hostname/betav1/index.html
*[/cpp]

[i][#002ad4]
Not Found

The requested URL /betav1/ was not found on this server.
Apache/2.0.52 (Fedora) Server at Hostname Port 80[/#002ad4][/i]

re , apres plusieurs test et recherche je n’ai toujours pas pu trouver solution.
je remets a plat mon probleme.

Sur distribution fedora 3 / serveur /all modules selection lors de l’installation apache, modules php etc…

apres fin installation complement du system… création des comptes user puis pour chaque compte création des dossier public_html en utilisant lors compte repectif…

création d’une page index.html and htm via vim.

test de nav sur navigator mozilla or IE …

Forbidden

You don’t have permission to access /~patrice/ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.52 (Fedora) Server at 192.123.58.155 Port 80

suite a ça verification du fichier httpd.conf… avec divers conseiller FAQ AND IRC… mais toujours le meme probleme…

voici l’url de mon fichier httpd.conf apres modification…

http://voilecontact.no-ip.info/index.html

veyron: chmod uog+r ~/public_html

[cpp]<Directory /home//public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

Order allow,deny
Allow from all


Order deny,allow
Deny from all

[/cpp]
il y a ca dans ton httpd.conf
en gros tu autorises “GET POST OPTIONS” puis tu interdis “GET POST OPTIONS” 2 lignes apres.
moi jai ca [cpp]
<Directory /home/
/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

Order allow,deny
Allow from all


Order deny,allow
Deny from all

[/cpp]