• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

How to Install LEMP Server in Slackware 14.1_MySQL

mysql 搞代码 4年前 (2022-01-09) 29次浏览 已收录 0个评论

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.t<strong>本文来源gao@daima#com搞(%代@#码网</strong>gz. 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...

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
<?phpphpinfo(); ?>

Restart apache

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

checkhttp://ip/info.php.

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.

Enjoy!

For questions please refer to our Q/A forum at :http://ask.unixmen.com/

Share this Article:0000000


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:How to Install LEMP Server in Slackware 14.1_MySQL

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址