欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

How to Install LEMP Server in Slackware 14.1_MySQL

程序员文章站 2022-06-16 18:37:46
...
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.

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.

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...

How to Install LEMP Server in Slackware 14.1_MySQL

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

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

Edit/etc/nginx/nginx.conf,

and index.php to the standard location:

 location / {root /var/www/unixmen;indexindex.php index.html index.htm;}

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;}

Make phpinfo page.

vi/var/www/unixmen/info.php

Restart apache

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

checkhttp://ip/info.php.

How to Install LEMP Server in Slackware 14.1_MySQL

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
 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/

Restart apache

Load the page http://ip/phpmyadmin.

How to Install LEMP Server in Slackware 14.1_MySQLHow to Install LEMP Server in Slackware 14.1_MySQL

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:How to Install LEMP Server in Slackware 14.1_MySQL0How to Install LEMP Server in Slackware 14.1_MySQL000How to Install LEMP Server in Slackware 14.1_MySQL0How to Install LEMP Server in Slackware 14.1_MySQL00How to Install LEMP Server in Slackware 14.1_MySQL

相关标签: Linux