Linux XAMPP FAQ 留在這裡做備忘

來源:互聯網
上載者:User

標籤:

Linux XAMPP FAQ 留在這裡做備忘Linux XAMPP FAQ 留在這裡做備忘1 XAMPP Linux Frequently Asked Questions

How do I install XAMPP?

suod ./xampp-linux-x64-5.6.3-0-installer.run --mode gtk  # 預設是qt,我用的是gnome案頭

How do I start XAMPP?

sudo /opt/lampp/lampp start
XAMPP:   Starting Apache...fail.XAMPP:   Another web server is already running
sudo service apache2 stopsudo sercice mysqld stopsudo sercice httpd stop
sudo /opt/lampp/lampp start

How do I stop XAMPP?
To stop XAMPP simply call this command:

sudo /opt/lampp/lampp stop

How can I test that everything worked?
Type in the following URL at your favourite web browser:
http://localhost/xampp/index.php

開了 goagent,一直打不開,怪不得...

Is XAMPP production ready?

sudo /opt/lampp/lampp security

What is the meaning of the error messages I see when starting XAMPP?

LAMPP-Apache is already running.An Apache daemon is already running.

The LAMPP startup script did not start XAMPP-Apache because there is an Apache instance already running. To start XAMPP properly, first you have to stop this daemon.

LAMPP-MySQL is already running.A MySQL daemon is already running.

Mostly due to the same reasons as the above error, the LAMPP startup script found a MySQL daemon already running on your system. To start LAMPP properly, you have to stop this daemon first.

Apache doesn‘t seems to start. What can I do?

tail -2 /opt/lampp/logs/error_log

If you get any error messages visit our community pages for help.

*What do I do if the error message is "Cannot restore segment prot after reloc: Permission denied?"*

sudo /usr/sbin/setenforce 0

After I rebooted my Linux box XAMPP stopped running! How can I fix this?
Debian, Ubuntu.

sudo ln -s /opt/lampp/lampp /etc/init.d/lamppsudo update-rc.d lampp start 80 2 3 4 5 . stop 30 0 1 6 .

RedHat, Fedora, CentOS. If your Linux distro uses "chkconfig" tool to install the services you can run the following commands:

sudo ln -s /opt/lampp/lampp /etc/init.d/lamppsudo chkconfig --add lampp

SUSE

sudo ln -s /opt/lampp/lampp /etc/init.d/lamppsudo chkconfig lampp 2345

How can I make my XAMPP installation more secure?

sudo /opt/lampp/lampp security

Now you should see the following dialog on your screen:

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] yesXAMPP:   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] yesXAMPP:   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] yesXAMPP:   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] yesXAMPP:   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 more secure.

How do I activate eAccelerator?
To activate eAccelerator simply find the following lines in your /opt/lampp/etc/php.ini:

;extension="eaccelerator.so";eaccelerator.shm_size="16";eaccelerator.cache_dir="/opt/lampp/tmp/eaccelerator";eaccelerator.enable="1";eaccelerator.optimizer="1";eaccelerator.check_mtime="1";eaccelerator.debug="0";eaccelerator.filter="";eaccelerator.shm_max="0";eaccelerator.shm_ttl="0";eaccelerator.shm_prune_period="0";eaccelerator.shm_only="0";eaccelerator.compress="1";eaccelerator.compress_level="9"

How do I activate the OCI8/Oracle extension for PHP?
To activate the OCI8/Oracle extension for PHP please execute the following command:

sudo /opt/lampp/lampp oci8

The following dialog will start:

Please enter the path to your Oracle or Instant Client installation:[/opt/lampp/lib/instantclient-11.2.0.3.0]installing symlinks...patching php.ini...OCI8 add-on activation likely successful.LAMPP:   Stopping Apache with SSL...LAMPP:   Starting Apache with SSL...

Now the extension should be active.

XAMPP runs, but why are none of the images being displayed?
That‘s a special problem with some Linux systems. Please open your /opt/lampp/etc/httpd.conf and look for these two lines:

#EnableMMAP off#EnableSendfile off

Remove the # in both lines and restart your Apache. Your images should be back.

How do I backup/restore my XAMPP system?
Warning: The backup and restore functionality is still under development and may not work correctly.
You can create the backup by calling:

sudo /opt/lampp/lampp backup

or

sudo /opt/lampp/lampp backup secret

Where "secret" is your MySQL root password. This command will create the following output:

Backing up databases...Backing up configuration, log and htdocs files...Calculating checksums...Building final backup file...Backup finished.Take care of /opt/lampp/backup/xampp-backup-22-01-14.sh

The file /opt/lampp/backup/xampp-backup-22-01-14.sh (in the example above) contains your backup data. Store this file in a safe place.
On the new machine you need the same version of XAMPP as on your original/source machine.

sudo sh xampp-backup-22-01-14.sh

You should see something like this:

Checking integrity of files...Restoring configuration, log and htdocs files...Checking versions...Installed: XAMPP 1.4.2Backup from: XAMPP 1.4.2Restoring MySQL databases...Restoring MySQL user databases...Backup complete. Have fun!You may need to restart XAMPP to complete the restore.

Date: 2015-01-20 12:19:56

Author: sunx

Created: 2015-01-20 Tue 12:57

Emacs 24.4.2 (Org mode 8.2.10)

Validate

Linux XAMPP FAQ 留在這裡做備忘

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.