Home Database Mysql Tutorial How to Install LEMP Server in Slackware 14.1_MySQL

How to Install LEMP Server in Slackware 14.1_MySQL

Jun 01, 2016 pm 01:16 PM
linux

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.
Copy after login

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.
Copy after login

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...
Copy after login

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
Copy after login

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
Copy after login

Edit/etc/nginx/nginx.conf,

and  index.php to   the  standard location:

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

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;}
Copy after login

Make phpinfo page.

vi/var/www/unixmen/info.php
Copy after login
<?phpphpinfo (); ?>
Copy after login

Restart apache

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

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
Copy after login
 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/
Copy after login

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

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1243
24
Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

vscode Previous Next Shortcut Key vscode Previous Next Shortcut Key Apr 15, 2025 pm 10:51 PM

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

See all articles