Xem mẫu
- Cài đặt Web Server XAMPP trên Linux
Thursday, 24 May 2007 13:56
Thông thường khi cài đặt Server với một hệ điều hành họ Linux (VD: CentOS, Fedora, SuSE,
Redhat Linux, Ubuntu...) chúng ta có thể chọn cài đặt phần mềm Apache (dùng làm Web Server)
và MySQL (dùng làm hệ quản trị CSDL) trong gói phần mềm kèm theo. Tuy nhiên rất có thể bạn
đã quên hoặc không thích cài chúng hoặc cảm thấy khó khăn khi cấu hình để chúng làm việc với
nhau và chạy được PHP, bạn có thể chọn một giải pháp khác: Cài đặt gói phần mềm XAMPP
(gồm Apache + MySQL + PHP + PHPMyAdmin).
Các bước tiến hành như sau:
Bước 1: Download
Download link: http://www.apachefriends.org/
Bước 2: Cài đặt
- Mở Linux shell và đăng nhập bằng tài khoản root
su
- Giải nén file cài đặt vào thư mục /opt
tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt
Bước 3: Khởi động XAMPP
/opt/lampp/lampp start
Bước 4: Kiểm tra
Mở trình duyệt và gõ: http://localhost
- Các chú ý khác
[1]. Sau khi cài đặt XAMPP khi gõ http://localhost trình duyệt sẽ tự động chuyển hướng tới
http://localhost/xampp. Để thay đổi mặc định ban đầu này: Vào thư mục xampp/htdocs thay đổi
(hoặc đổi tên hoặc xóa) file index.php cho phù hợp với mục đích của mình.
[2]. Để tạo site dạng http://localhost/Joomla cần thêm đoạn code sau vào file
xampp/apache/conf/httpd.conf
Alias /Joomla/ "/www/Joomla/"
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
Trong đó /www/Joomla/ là đường dẫn tới thư mục Joomla của bạn
[3]. Để tăng cường bảo mật mở Linux Shell và chay dòng lệnh sau:
/opt/lampp/lampp security
[4]. Để XAMPP tự chạy sau khi Reboot (giống như một service trong Windows chạy ở chế độ
Automatic). Xem hướng dẫn sau: http://www.apachefriends.org/en/faq-xampp-linux.html#fsl
- 1. Install and upgrade XAMPP
How to upgrade XAMPP?
An error occurred during the upgrade! What now?
2. Starting XAMPP
What's the meaning of the messages while starting XAMPP?
I got the error "/lib/libc.so.6: version `GLIBC_2.2' not found". What now?
What's the secret about "Error 1"?
Apache doesn't seems to start. What can I do?
What do I do if the error message is "Invalid argument: Could not set permissions on ssl_mutex"?
What do I do if the error message is "Invalid argument: Unable to create scoreboard"?
What do I do if the error message is »Invalid argument: Configuration failed«?
What do I do if the error message is »The configuration file now needs a secret passphrase
(blowfish_secret)« shows up?
What do I do if the error message is »cannot restore segment prot after reloc: Permission denied«?
3. Running XAMPP
After I rebooted my Linux box XAMPP stopped running! How can I fix this?
How can I make my XAMPP installation more secure?
How do I activate eAccelerator?
How do I activate the OCI8/Oracle extension for PHP?
XAMPP runs, but none of the images are shown?
How do I backup/restore my XAMPP system?
4. Stopping XAMPP
5. Deinstall XAMPP
6. XAMPP's future
- How to upgrade XAMPP?
If an upgrade exists, you should use it: a) it's much smaller than the full XAMPP package and b) your
configuration and HTML files won't be overwritten.
Step 1: Download
Okay, the first step is very obvious. Please download the upgrade packages from the XAMPP section of our
website. Please take note that only matching upgrade packages can upgrade your XAMPP version.
If you donwloaded a wrong version you will get an error message if you try to
upgrade.
Step 2: Extracting the archive
Now extract the downloaded package:
tar xvfz xampp-linux-upgrade-x.x.x-y.y.y.tar.gz
By the way: It doesn't matter where in the filesystem you extract the packet. Just make sure it's on the
same machine as your XAMPP installation.
Step 3: Start upgrade
After unpacking the archive you can start the upgrade process. First, get root access to your system, for
example by using the 'su' command:
su
And now start the upgrade process:
xampp-upgrade/start
Now you should see something like this on your screen:
Stopping XAMPP for Linux 0.9.6...
XAMPP: Stopping Apache...
XAMPP: Stopping MySQL...
XAMPP for Linux stopped.
Upgrading 0.9.6 to 0.9.7...
Installing new files...
Upgrading existing files...
patching file lampp/etc/httpd.conf
Successfully upgraded XAMPP.
XAMPP: Starting Apache...
XAMPP: Starting MySQL...
XAMPP started.
Ready. You successfuly upgraded XAMPP.
By the way: the upgrade will stop a running XAMPP and will start XAMPP as soon
as the upgrade is finished. XAMPP will be started after an upgrade even if it was
not running before.
nguon tai.lieu . vn