Aroturukihia he kaiwhakarato Nginx me te Linux-dash

linux-pihono

Linux tu mo kaiwhakarato tukutuku, ana ko waenga Apache me Nginx he pai ta raatau waahanga o tenei maakete e tino rangatira ana, a e mohiotia ana ehara tenei na te kaha noa o nga huarahi e rua engari ko nga mea pai katoa kei a tatou. aroturukihia ta maatau paetukutuku ki tetahi o ratou. He mea nui tonu tenei mahi ma te hunga e mahi ana hei kaiwhakahaere punaha me te hiahia ki te mohio i nga wa katoa mena kei te mahi nga kaituku, me te aha hoki o raatau mahi.

Engari i te taha o nga rongoa pai-whakamahia me te whakamahi-pai penei i a Zenoss me Nagios, he maha nga taputapu maamaa ka taea hei whakamahi ma tatou aroturukihia ta maatau kaituku Linux he maama noa ake, he waatea ki nga kaiwhakamahi o raro. Na inaianei ka arotakehia e maatau tetahi piiraa linux-pihono, tino oti me te ngawari ki te whakauru me te tiimata ki te whakamahi.

Kia kite a, me pehea te whakauru i te linux-dash ki Ubuntu me Nginx hei kaiwhakarato paetukutuku (I tangohia e maatau tenei waahanga mo Apache na te mea koinei te mea kua tino tipu ake i roto i nga marama kua pahure ake nei). Hei tiimata, i nga wa katoa ka toro atu tatou ki te raina whakahau ki te whakauru i nga mea e whai ake nei:

sudo apt-tiki whakauru git nginx php5-json php5-fpm php5-curl

Na ka whakaweto e matou te whirihoranga taunoa i Nginx:

sudo rm / etc / nginx / pae-whakahohe / taunoa

Na me whakatika e matou te konae /etc/ngingx/conf.d/linuxdash.conf, a ka whakapumautia e maatau kei te whakamahi a Nginx i te tauranga 8080, na ko nga korero o te konae me penei:

tūmau {
server_name $ domain_name;
whakarongo 8080;
pakiaka / var / www;
taupū taupū.html taupū.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

wāhi ~ * \. (?: xml | ogg |mp3| mp4 | ogv | svg | svgz | eot | otf | woff | ttf | css | js | jpg | jpeg | gif | png | ico) $ {
try_files $ uri = 404;
mutu te max;
access_log atu;
add_header Whakawhitinga a-iwi;
add_header Keteroki-Mana "iwi whanui, me-whakahou, takawaenga-whakahou";
}

tauwāhi / linux-taia {
taupū taupū.html taupū.php;
}

# PHP-FPM ma nga turanga
tauwāhi ~ \ .php (/ | $) {
fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
fastcgi_split_path_info ^ (. +? \. php) (/.*) $;
fastcgi_pass unix: /var/run/php5-fpm.sock;
mena (! -f $ tuhinga_root $ fastcgi_script_name) {
hoki 404;
}
try_files $ uri $ uri / /index.php?$args;
whakauru i te fastcgi_params;
}
}

Na me mahi taatau whirihora php-fpm, tetahi o nga kohinga i whakauruhia e maatau i te waahanga tuatahi, ka mahia ma te whakatika i te konae /etc/php5/fpm/pool.d/www.conf, ki te taapiri i nga waahanga 'kaiwhakamahi', 'roopu' me te 'whakarongo (ka waiho nga toenga o te konae kia kore e rereke.

kaiwhakamahi = www-raraunga
roopu = www-raraunga
whakarongo = /var/run/php5-fpm.sock

Kei te rite matou ki te mutunga tāuta linux-dash, kaore nei he PPA engari ka whakauruhia mai i te github:

git clone https://github.com/afaqurk/linux-dash.git
sudo cp -r linux-dash / / var / www /
sudo chown -R www-raraunga: www-raraunga / var / www

Hei whakaoti me timata ano te kaituku Nginx me php5-fpm:

Ratonga ratonga php5-fpm tīmata
suo service nginx tīmata anō

Na kua whakauruhia e maatau tenei taputapu, ka haere tonu taatau e whai ake nei, kia kite me pehea te whakamahi kia pai ai aroturukihia ta maatau kaituku Linux, a mo tenei me tiimata e taatau te tirotiro paetukutuku, whakatuwhera ripa ka uru ki te URL o ta maatau kaituku whai muri i te tauranga 8080 me te taatai ​​linux-dash, i te mea kua whai i nga kaupae e whakaaturia ana i runga ake nei, me penei:

http://<linux-IP-address>:8080/linux-dash/

Ka rite ki ta tatou e kite nei, he maamaa tonu te atanga taatai-Linux ana he papa poari e taea ai e taatau te tiro i nga waahanga maha me nga taonga punaha, nga widget kei tetahi atu ringa ka taea e taatau te whakarite kia pai ake o taatau hiahia ka taea hoki te whakamahi i nga kaupapa hei whakarereke i te ahua o te linux- kopikopiko ki to punaha. I roto i nga waahanga rereke ka taea e taatau te tirotiro me te linux-dash kei a maatau nga korero whanui mo te punaha (punaha whakahaere, maumahara hipi, maha o nga waahanga), te whakamahinga o te kōpae me ia waahanga whakauru o te punaha, te monomai kua whakauruhia (MySQL, OpenSL, Python, me etahi atu), ka mutu ko nga korero katoa e pa ana ki te hononga: Atanga hohe (me nga korero mo ia takitahi) ping, nga kaiwhakamahi hono me nga mahinga kaha i roto i etahi atu mea.

Kei te kite taatau, he otinga tino tika me te mea pai rawa, he maamaa noa ki te whakauru me te tiimata ki te whakamahi, no reira kaore e tika kia waiho tatou hei kaiwhakamahi matatau hei painga ki a ia. Ko te tumanako i pai enei huarahi ki a maatau kaipanui kia akiaki ki te whakamatau, na te mea i te maha atu o nga keehi ka tino miharo ratou


Ko nga korero o te tuhinga e piri ana ki o maatau kaupapa o matatika whakatika. Ki te ripoata i tetahi paatene paato Here.

Hei tuatahi ki te korero

Waiho to korero

Ka kore e whakaputaina tō wāhitau īmēra.

*

*

  1. He kawenga mo nga raraunga: Miguel Ángel Gatón
  2. Te kaupapa o te raraunga: Whakahaerehia te SPAM, te whakahaere korero.
  3. Ture: To whakaae
  4. Whakawhitinga korero: Kaore nga korero e tukuna ki nga taha tuatoru engari ma te ture herenga.
  5. Rokiroki raraunga: Paetukutuku e whakahaerehia ana e Occentus Networks (EU)
  6. Tika: I nga wa katoa ka taea e koe te whakaiti, te whakaora me te muku i o korero.