免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Ubuntu下構(gòu)建LAMP服務(wù)器

Build Your Own Debian/Ubuntu LAMP Server - Quick & Easy Do it Yourself Installation

  • Apache 2 - Linux Web server
  • MySQL 5 - MySQL Database Server
  • PHP4/5 - PHP Scripting Language
  • phpMyAdmin - Web-based database admin software.

Note: Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.

First, let us prepare a system that has a minimum requirement of Debian/Ubuntu version of linux with atleast 256MB of RAM available. Anythingless than this minimum ram will cause lot of problems since we arerunning a server along especially mysql and webmin requires lot of RAMto run properly. Mysql will give you this nasty error "cannot connectto mysql.sock" if you dont have enough memory in your server.

I love debian/ubuntu based linux because of my enormous affinitytowards this command apt-get. As a starter knowing this one command, Itis so easy to install packages and you dont need to worry about packagedependency and configuration. You need to buy a dedicated server or aVPS package if you want to setup your own server. If you want toexperiment with the server and installation it is recommended to buy avps package from various hosts. I prefer vpslinkbecause of their pricing. Believe it or not it is so easy to installand configure your server yourself eventhough you are new are to linuxand dedicated/vps hosting.

First download PuTTyif you are accessing your server through SSH. Just enter the IP of yourserver with root login to access your host. As you probably know, Webminis a freely available server control panel and we will setup this oncewe have completed the LAMP server and Mail Server. Webmin makes moreeasier for us to fine tune our linux box.

Before proceeding to install, update the necessary packages with debian with this command.

apt-get install update

 

1. Installing Apache + PHP

Apache is one of the most famous web server which runs on most linuxbased servers. With just few commands you can configure apache to runwith PHP 4 or PHP 5.

If you want to install PHP 4, just apt-get

apt-get install apache2 php4 libapache2-mod-php4

To install PHP5, just run the following on linux shell. Note that ifyou dont specify packages with ‘4‘, PHP5 will be automaticallyinstalled.

apt-get install apache2 php5 libapache2-mod-php5

Apache configuration file is located at: /etc/apache2/apache2.conf and your web folder is /var/www.

To check whether php is installed and running properly, just create a test.php in your /var/www folder with phpinfo() function exactly as shown below.

nano /var/www/test.php

# test.php

<?php phpinfo(); ?>

Point your browser to http://ip.address/test.php or http://domain/test.php and this should show all your php configuration and default settings.

You can edit necessary values or setup virtual domains using apache configuration file.

 

2. Installing MySQL Database Server

Installing mysql database server is always necessary if you arerunning a database driven ecommerce site. Remember running mysql serverto a fair extend requires atleast 256mb of RAM in your server. Sounless you are running database driven sites you dont absolutely needmysql. The following commands will install mysql 5 server and mysql 5client.

apt-get install mysql-server mysql-client php5-mysql

Note: If you have already installed php4, you should make a slight change like this.

apt-get install mysql-server mysql-client php4-mysql

The configuration file of mysql is located at: /etc/mysql/my.cnf

 

Creating users to use MySQL and Changing Root Password

By default mysql creates user as root and runs with no passport. You might need to change the root password.

To change Root Password

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(‘new-password‘) WHERE user=‘root‘;
mysql> FLUSH PRIVILEGES;

You must never use root password, so you might need to createa user to connect to mysql database for a PHP script. Alternatively youcan add users to mysql database by using a control panel like webmin or phpMyAdminto easily create or assign database permission to users. We willinstall Webmin and phpmyadmin during later once we complete basicinstallation.

 

3. PhpMyAdmin Installation

PhpMyAdmin is a nice web based database management andadministration software and easy to install and configure under apache.Managing databases with tables couldnt be much simpler by usingphpmyadmin.

All you need to do is:

apt-get install phpmyadmin

The phpmyadmin configuration file is located at: /etc/phpmyadmin folder.

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf:

Include /etc/phpmyadmin/apache.conf 

Now restart Apache:

/etc/init.d/apache2 restart

Point your browser to: http://domain/phpmyadmin

That‘s it! MySQL and phpMyAdmin are ready. Log in with your mysqlroot password and create users to connect to database from your phpscript.

This tutorial was written and contributed to HowToForge by Scott  who currently runs MySQL-Apache-PHP.com.Permission is fully granted to copy/republish this tutorial in anyform, provided a source is mentioned with a live link back to theauthors site.

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
windows環(huán)境下wampserver的配置教程——超級(jí)詳細(xì)
ubuntu install php-apache-mysql官方教程
Ubuntu 11.0下搭建Web服務(wù)器
Ubuntu18.04下搭建LAMP環(huán)境
centos6.5下Zabbix系列之Zabbix安裝搭建及漢化
Ubuntu18.04搭建個(gè)人網(wǎng)盤(pán)owncloud
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服