首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

LAMPP 装配配置

2012-10-27 
LAMPP 安装配置?1.LAMPP ?1.1.Download???? a)Offical web site: http://www.apachefriends.org/en/xampp.

LAMPP 安装配置

?1.LAMPP
?1.1.Download
???? a)Offical web site: http://www.apachefriends.org/en/xampp.html
???? b)Download link: http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/xampp-linux-1.7.3a.tar.gz/download

?1.2.Installation
???? a)Go to linux shell and login as? administrator root
??? su / sudo
???? b)Extract the download archive file to /opt
??? tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
??? That's all. XAMPP is now installed below the /opt/lampp directory.
?1.3.Start
???? a) To start XAMPP simply call this command:
??? /opt/lampp/lampp start
?1.4.Test
???? a)http://localhost
?1.5.A matter of security
???? a)/opt/lampp/lampp security
???
??? Now you should see the following dialog on your screen (user input is highlighted):
??? XAMPP: Quick security check...
??? XAMPP: Your XAMPP pages are NOT secured by a password.
??? XAMPP: Do you want to set a password? [yes] yes (1)
??? XAMPP: Password: ******
??? XAMPP: Password (again): ******
??? XAMPP: Password protection active. Please use 'lampp' as user name!
??? XAMPP: MySQL is accessable via network.
??? XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
??? XAMPP: Turned off.
??? XAMPP: Stopping MySQL...
??? XAMPP: Starting MySQL...
??? XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
??? XAMPP: Do you want to set a password? [yes] yes
??? XAMPP: Password: ******
??? XAMPP: Password (again): ******
??? XAMPP: Setting new MySQL pma password.
??? XAMPP: Setting phpMyAdmin's pma password to the new one.
??? XAMPP: MySQL has no root passwort set!!!
??? XAMPP: Do you want to set a password? [yes] yes
??? XAMPP: Write the passworde somewhere down to make sure you won't forget it!!!
??? XAMPP: Password: ******
??? XAMPP: Password (again): ******
??? XAMPP: Setting new MySQL root password.
??? XAMPP: Setting phpMyAdmin's root password to the new one.
??? XAMPP: The FTP password for user 'nobody' is still set to 'lampp'.
??? XAMPP: Do you want to change the password? [yes] yes
??? XAMPP: Password: ******
??? XAMPP: Password (again): ******
??? XAMPP: Reload ProFTPD...
??? XAMPP: Done.


??? (1) Setting a password will protect the XAMPP demo pages (http://localhost/xampp/) using this password. The user name is 'lampp'!
??? After calling this command your XAMPP installation should be "secure". For my part I've no idea what else could be insecure.


?1.6.Automatically start XAMPP at login
??? ?a)First, find out your default runlevel.Simply type:
??? ??? egrep :initdefault: /etc/inittab
??? You should now see a line containing a number between two colons.
??? In most cases 3 or 5 (2 if you're using Debian).
??? ?b)Go into the directory which configures this runlevel. If for example your runlevel is 3, then you have to change into the /etc/rc.d/rc3.d directory:
??? cd /etc/rc.d/rc3.d
??? If your system didn't provide /etc/rc.d/rc3.d please try also /etc/init.d/rc3.d and /etc/rc3.d.
??? ?c)Now carry out the actual configuration by typing:
??? ln -s /opt/lampp/lampp S99lampp
??? ln -s /opt/lampp/lampp K01lampp
??? Now XAMPP should start and stop automatically if you boot or shutdown your machine.

?1.7.Important files and directory

??? File/Directory
??? Purpose
??? /opt/lampp/bin/
??? The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.
??? /opt/lampp/htdocs/
??? The Apache DocumentRoot directory.
??? /opt/lampp/etc/httpd.conf
??? The Apache configuration file.
??? /opt/lampp/etc/my.cnf
??? The MySQL configuration file.
??? /opt/lampp/etc/php.ini
??? The PHP configuration file.
??? /opt/lampp/etc/proftpd.conf
??? The ProFTPD configuration file. (since 0.9.5)
??? /opt/lampp/phpmyadmin/config.inc.php
??? The phpMyAdmin configuration file.
?1.8 To uninstall XAMPP just type in this command:
??? rm -rf /opt/lampp


???


?2.Apache
?2.1.Disable directory listing
?a)Open the Apache configuration file
??? vi /opt/lampp/etc/httpd.conf
?b)Change setting
??? fine out "Options Indexes FollowSymLinks ExecCGI Includes" line in <Directory "/opt/lampp/htdocs">
??????? replace with "Options Indexes FollowSymLinks ExecCGI Includes"
?2.2.Add new virtualhost
?a)Open the httpd.conf add below at end line
??? "Include etc/extra/httpd-fengjun.conf"
?b)Create a new file
??? touch extra/httpd-fengjun.conf
?? Edit this file
??????? sudo vi extra/httpd-fengjun.conf
?? The content is
??? Listen 8080

??? <VirtualHost *:8080>
??? ServerAdmin fengjunoo@sina.com
??? DocumentRoot /home/fengjun/workspace
??? ServerName localhost
??? ErrorLog logs/workspace_log
??? CustomLog logs/workspace_log common
??? </VirtualHost>

??? <Directory "/home/fengjun/workspace">
??? ??? Options FollowSymLinks ExecCGI Includes
??? ??? AllowOverride All
??? ??? Order allow,deny
??? ??? Allow from all
??? </Directory>


?3.MySql
??? 1.Set character to utf8
??????? open /opt/lmapp/etc/my.cnf
??????? add "default-character-set = utf8" in [client] and [mysqld] section
??????? 2.Set Password for root
??????? SET PASSWORD FOR 'root'@'localhost' = PASSWORD( '123' );
?4.PHP

?????? open /opt/lampp/etc/php.ini

?????? disable the xdebug will make the php server faster


?5.PhpMyAdmin

热点排行