Cài đặt Apache, Mysql, PHP, PhpMyadmin Trên CentOS - HOSTVN
1. Cài đặt Apache:
yum -y install httpd
+ Chỉnh sửa file cấu hình:
vi /etc/httpd/conf/httpd.conf
Dòng 402: Thêm index.php
DirectoryIndex index.php index.html index.html.var
Dòng 990: Bỏ dấu #
NameVirtualHost *:80
Thêm dòng sau vào cuối file:
Include /etc/httpd/conf/domains/*.conf
+ Tạo thư mục domains chứa file cấu hình của vhost:
mkdir /etc/httpd/conf/domains
+ Tạo vhost: user demo, domain demo.com
Thêm user demo:
useradd demo
passwd demo
mkdir -p /home/demo/public_html
chmod 755 -R /home/demo
chown demo:demo -R /home/demo
Thêm file cấu hình cho domain demo.com
vi /etc/httpd/conf/domains/demo.com.conf
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /home/demo/public_html ServerName demo.com
<Directory "/home/demo/public_html"> Option FollowSymLinks AllowOverride All </Directory>
ErrorLog /home/demo/error_log # CustomLog /home/demo/access_log common </VirtualHost>
2. Cài đặt Mysql:
Thêm repo:
32bit:
rpm -Uvh http://repo.webtatic.com/yum/el6/i386/webtatic-release-6-5.noarch.rpm
64bit:
rpm -Uvh http://repo.webtatic.com/yum/el6/x86_64/webtatic-release-6-5.noarch.rpm
Cài đặt mysql 5.5:
yum install mysql55w-server
service mysqld start
mysql_secure_installation
3. Cài đặt PHP:
+ PHP 5.3:
yum install php php-mysqlnd php-mbstring php-mcrypt php-gd php-xml
+ PHP 5.4:
yum --enablerepo=webtatic install php54w php54w-mysqlnd php54w-mbstring php54w-mcrypt php54w-gd php54w-xml
+ Chỉnh sửa file cấu hình:
vi /etc/php.ini
post_max_size 200M upload_max_filesize = 200M4. Cài đặt PhpMyadmin:
+ Cài đặt repo:
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
+ Cài đặt phpMyAdmin:
yum --enablerepo=remi install phpMyAdmin
+ Chỉnh sửa file phpmyadmin.conf:
vi /etc/httpd/conf.d/phpmyadmin.conf
<Directory /usr/share/phpMyAdmin/> <IfModule !mod_authz_core.c> Order Deny,Allow Allow from All Allow from ::1 </IfModule> </Directory>5. Khởi động lại các dịch vụ:
service httpd restart
service mysqld restart
chkconfig httpd on
chkconfig mysqld on
Từ khóa » Tải Centos 5.3
-
Vault./5.3/isos/x86_64/
-
Download - CentOS Wiki
-
Downloading File /mojax/latest/CentOS-5.3-x86_64-bin-o
-
Release ISO Images Of CentOS 5.3 - Internet Archive
-
CentOS > CentOS 5.3 - LQ ISO
-
Distribution Release: CentOS 5.3 ( News)
-
The Perfect Server - CentOS 5.3 X86_64 [ISPConfig 2] - HowtoForge
-
Hướng Dẫn Cài đặt CentOS 5 - Install CentOS 5 - Quản Trị Mạng Linux
-
Libreoffice-5.3.6.1-24.el7.x86_64.rpm - CentOS Repositories
-
CentOS 5.3 Released
-
Index Of /pub/linux/centos-vault/5.3/isos/x86_64
-
Cách Cài đặt Phpunit Trên Centos 6.5 & Php 5.3 - Kipalog
-
CentOS - Wikiwand
-
Download ISO - Chanshue's Blog