LNMH: Leistungsstarke VPS-Hosting-Umgebung

LNMH: Leistungsstarke VPS-Hosting-Umgebung

LNMH ist eine auf Nginx kombiniert mit HHVM basierende Architektur und zeichnet sich durch hohe Effizienz aus. Nachfolgend wird der Konstruktionsprozess beschrieben.

Offizielle HHVM-Website (gesperrt): http://www.hhvm.com
HHVM Github: https://github.com/facebook/hhvm

1. Installieren Sie HHVM
1. CentOS
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
cd /etc/yum.repos.d
wget http://www.hop5.in/yum/el6/hop5.repo
lecker, alles sauber machen
yum -y entferne libevent-devel libevent
yum -y install hhvm –setopt=protected_multilib=false
2. debianxia
sudo apt-get update
wget http://dl.hhvm.com/conf/hhvm.gpg.key
sudo apt-key füge hhvm.gpg.key hinzu
echo "deb http://dl.hhvm.com/debian wheezy main" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y hhvm

2. Installieren Sie Fastcgi
sudo /usr/share/hhvm/install_fastcgi.sh #Fastcgi installieren
sudo update-rc.d hhvm defaults #Zum Booten hinzufügen
sudo service hhvm restart #HHVM neu starten

3. LNMP installieren (optional)
wget http://blog.linuxeye.com/lnmp.tar.gz

wget http://blog.linuxeye.com/lnmp-full.tar.gz # Enthält Quellcode (offizieller Download ist zu langsam)

tar xzf lnmp.tar.gz
CD lnmp

Wenn Sie das Verzeichnis (Installation, Datenspeicherung, Nginx-Protokoll) ändern müssen, ändern Sie bitte die Datei options.conf

./install.sh
Es sind nur Nginx und Memcached installiert.

4. Ändern Sie die Datei vhost.sh, um nginx beim Hinzufügen einer virtuellen Maschine das Hinzufügen von Fastcgi zu ermöglichen.
Gefunden (um Zeile 314)
[ ! -d $web_install_dir/conf/vhost ] && mkdir $web_install_dir/conf/vhost
cat > $web_install_dir/conf/vhost/$domain.conf << EOF-Server { listen 80; Servername $domain$moredomainame; $N_log Index index.html index.htm index.jsp index.php; include $rewrite.conf; root $vhostdir; #Fehlerseite 404 /404.html; wenn ( \$query_string ~ “. [;'&lt;&gt;].*” ){

 return 404; }

$anti_hotlinking
echo -e $ngx_pagespeed
Standort ~ .*.(php|php5)?$ {

 #fastcgi_pass remote_php_ip:9000; fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }


Wechseln zu
[ ! -d $web_install_dir/conf/vhost ] && mkdir $web_install_dir/conf/vhost
cat > $web_install_dir/conf/vhost/$domain.conf << EOF-Server { listen 80; Servername $domain$moredomainame; $N_log Index index.html index.htm index.jsp index.php; include $rewrite.conf; root $vhostdir; #Fehlerseite 404 /404.html; wenn ( \$query_string ~ “. [;'&lt;&gt;].*” ){

 return 404; }

$anti_hotlinking
echo -e $ngx_pagespeed
Standort ~ .*.(php|php5)?$ {

 fastcgi_pass 127.0.0.1:9000; #fastcgi_pass unix:/var/run/hhvm/hhvm.sock; fastcgi_index index.php; include fastcgi.conf; }

5. Ändern Sie die Datei nginx.conf, um zu finden

pureftpd UND phpmyadmin

 location ~ .*\.(php|php5)?$ { #fastcgi_pass remote_php_ip:9000; fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }


Wechseln zu

pureftpd UND phpmyadmin

 location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; #fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; }

Starten Sie Nginx neu:
Dienst Nginx neu starten

6. MySQL-Datenbank installieren
apt-get installiere MySQL-Server

über:deamwork

<<:  Inländischer Browser, internationale Version

>>:  vpsGOD: 25 $/Jahr/256 MB Speicher/10 GB Speicherplatz/100 GB Datenverkehr/KVM

Artikel empfehlen

TrunkSpace 1 GB RAM KVM VPS Los Angeles Bewertung

Details: TrunkSpace: 3,96 $/Monat/1 GB Speicher/2...

39 $/Monat/8 GB Speicher/2 T Speicherplatz dedizierter Server——OVH.COM

OVH.COM ist ein bekanntes französisches Hosting-U...

VPSHostingDEAL: 12 $/Jahr/128 MB/20 GB Speicherplatz/500 GB Datenverkehr/OpenVZ

VPSHostingDEAL ist eine Website von Reprise Hosti...

WootHosting: 19 $/Jahr/1 GB RAM/30 GB Speicher/3 TB Bandbreite/KVM/New York

WootHosting, ein amerikanischer Hosting-Anbieter,...