Heim > Datenbank > MySQL-Tutorial > How to Install LEMP Server in Slackware 14.1_MySQL

How to Install LEMP Server in Slackware 14.1_MySQL

WBOY
Freigeben: 2016-06-01 13:16:46
Original
1195 Leute haben es durchsucht

In this tutorial, I will show you how to install LEMP( Linux/ Nginx/Mysql/Php) server

Please prepare your machine and follow the steps bellow.

Please download nginx fromhttp://slackbuilds.org/repository/14.1/network/nginx/.

Source Downloads:
nginx-1.6.0.tar.gz

Download SlackBuild
nginx.tar.gz

Extract:

nginx.tar.gz

put nginx-1.6.0.tar.gz in nginx folder.

cdnginx root@slack1:~/Install/nginx# chmod +x nginx.SlackBuildroot@slack1:~/Install/nginx# ./nginx.SlackBuildusr/man/man8/usr/man/man8/nginx.8.gzSlackware package /tmp/nginx-1.6.0-i486-1_SBo.tgz created.
Nach dem Login kopieren

Start Install Nginx

 installpkg /tmp/nginx-1.6.0-i486-1_SBo.tgz Verifying package nginx-1.6.0-i486-1_SBo.tgz. Installing package nginx-1.6.0-i486-1_SBo.tgz: PACKAGE DESCRIPTION: # nginx (http/imap/pop3 proxy) # # Nginx [engine x] is a high-performance HTTP server and reverse proxy, # as well as an IMAP/POP3 proxy server. # # Nginx was written by Igor Sysoev. # # Homepage: http://nginx.net/ # Executing install script for nginx-1.6.0-i486-1_SBo.tgz. Package nginx-1.6.0-i486-1_SBo.tgz installed.
Nach dem Login kopieren

make nginx’s startup script executable, and start it.

chmod +x /etc/rc.d/rc.nginx/etc/rc.d/rc.nginx startStarting Nginx server daemon...
Nach dem Login kopieren

2014-04-29 08_03_52-Welcome to nginx!

Mysql

The Slackware 14.1 is using Mariadb by default.

cd /usr/share/mysqlcp my-medium.cnfmy.cnfchmod +x /etc/rc.d/rc.mysqld mysql_install_dbchown -R mysql:mysql /var/lib/mysql/etc/rc.d/rc.mysqld startmysql_secure_installation
Nach dem Login kopieren

PHP

chmod +x /etc/rc.d/rc.php-fpm/etc/rc.d/rc.php-fpm startStarting php-fpm Created directory: /var/lib/net-snmp/mib_indexesdone
Nach dem Login kopieren

Edit/etc/nginx/nginx.conf,

and  index.php to   the  standard location:

 location / {root /var/www/unixmen;indexindex.php index.html index.htm;}
Nach dem Login kopieren

Uncomment the php section.

location ~ /.php$ {	root		 /var/www/unixmen;	fastcgi_pass 127.0.0.1:9000;	fastcgi_indexindex.php;	fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;	include		fastcgi_params;}
Nach dem Login kopieren

Make phpinfo page.

vi/var/www/unixmen/info.php
Nach dem Login kopieren
<?phpphpinfo (); ?>
Nach dem Login kopieren

Restart apache

/etc/rc.d/rc.nginx restartShutdown Nginx gracefully...Starting Nginx server daemon...root@slack1:/usr/share/mysql#
Nach dem Login kopieren

checkhttp://ip/info.php.

2014-04-29 07_22_08-phpinfo()

phpMyadmin

Download the source and slackbuild fromhttp://slackbuilds.org/repository/14.1/network/phpmyadmin/.

Edit phpmyadmin.SlackBuild

DOCROOT=/var/www/ngdocs# you change it to your root web directory PHPGROUP=root =change to othe ownerorleaveit like this
Nach dem Login kopieren
 makethe build ready ./phpmyadmin.SlackBuildSlackware package /tmp/phpmyadmin-4.1.8-noarch-1_SBo.tgz created.Install Now root@slack1:~/Install/phpmy/phpmyadmin# installpkg /tmp/phpmyadmin-4.1.8-noarch-1_SBo.tgzVerifying package phpmyadmin-4.1.8-noarch-1_SBo.tgz.Installing package phpmyadmin-4.1.8-noarch-1_SBo.tgz:PACKAGE DESCRIPTION:# phpmyadmin (MySQL administration over the web)## phpMyAdmin is a free software tool written in PHP intended# to handle the administration of MySQL over the web.# phpMyAdmin supports a wide range of operations with MySQL# and also includes ability to run SQL statements directly.## Homepage: http://www.phpmyadmin.net/#Package phpmyadmin-4.1.8-noarch-1_SBo.tgz installed.root@slack1:~/Install/phpmy/phpmyadmin#cd /var/www/unixmen/phpmyadmincp config.sample.inc.phpconfig.inc.phpchmod 0755/var/www/unixmen/phpmyadmin/
Nach dem Login kopieren

Restart apache  

Load the page http://ip/phpmyadmin.

2014-04-29 07_51_27-phpMyAdmin2014-04-29 07_52_44-144.44.174.135 _ localhost _ phpMyAdmin 4.1.8

Enjoy!

For questions please refer to our Q/A forum at :http://ask.unixmen.com/
How to Install LEMP Server in Slackware 14.1_MySQL

Share this Article:Facebook0Google+000Reddit0Pinterest00Digg

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage