2009年4月22日

快速安裝Apache+Mysql+PHP環境

Install Apache, PHP (with related modules) and MySQL by issuing the following commands as the root user: yum install httpd yum install mysql mysql-server yum install php php-mysql php-gd php-xmlrpc php-mbstring php-mcrypt php-gettext Start
  

Install Apache, PHP (with related modules) and MySQL by issuing the following commands as the root user:

yum install httpd
yum install mysql mysql-server
yum install php php-mysql php-gd php-xmlrpc php-mbstring php-mcrypt php-gettext

Start Apache and MySQL by issuing the following commands as the root user:

service httpd start
service mysqld start


Install and start the postfix mail server by issuing the following commands as the root user:

yum remove sendmail
yum install postfix

You'll need to edit postfix's default main.cf, to change the interfaces it listens on. This file is located in

/etc/postfix/main.cf

Change the line that reads

inet_interfaces = localhost

to read

inet_interfaces = all

This will ensure that outbound mail traffic can make it into the system. Start the postfix mail server like so:

service postfix start

Update Apache Configuration

This documentation assumes you are familiar with the process for configuring an Apache virtual host. If you are not, you can find more information at the Apache Software Foundation website, specifically the section on virtual hosts. Ensure that the Ubersmith .htaccess file has the required permissions by enabling the 'AllowOverride All' directive for the directory your Ubersmith installation is located under. This is typically done in the virtual host configuration file for the domain/subdomain where you are installing Ubersmith. For example:


ServerAdmin webmaster@my.ubersmith.instance.com
DocumentRoot /var/www/html
ServerName my.ubersmith.instance.com
ErrorLog my.ubersmith.instance.com-error_log
CustomLog my.ubersmith.instance.com-access_log common



AllowOverride All


Restart Apache to reload the virtual host configuration:

service httpd restart

MySQL Configuration

You'll want to create a MySQL database and user for Ubersmith to use. Since your newly installed MySQL database server likely does not have a root password, you can access MySQL by running

mysql

as root.

You can then execute:

mysql> CREATE DATABASE ubersmith;

to create the Ubersmith database, and

mysql> GRANT ALL PRIVILEGES ON ubersmith.* to 'ubersmith'@'localhost' IDENTIFIED BY 'somepassword';

where 'somepassword' is a password you've chosen. These commands will create a user 'ubersmith' that has the appropriate access to the database 'ubersmith'.

You'll use these details (the database name, user name, and password) later on in the Ubersmith setup wizard, so keep them handy.

0 回應:

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.