显示标签为“Wordpress”的博文。显示所有博文
显示标签为“Wordpress”的博文。显示所有博文

2011年12月6日星期二

WordPress on Amazon Web Services (AWS) Linux EC2 Micro Instance, For Free








WordPress on Amazon Web Services (AWS) Linux EC2 Micro Instance, For Free


I’ve been wanting to get a write up done for WordPress on AWS, the fact that it is free for a year, since they’ve released the free-tier many months ago. Well I finally got around to it, however it isn’t a write up. I went ahead and put the work in to produce a video of the steps for setup & configuration. Enjoy.
The commands to install php, mysql, httpd (apache), and manipulate the config files are included below for copy and paste needs.

Create a Linux Instance on AWS – create & assign an IP Address
Login with ‘ec2-user’
sudo -i
lsof -i
yum -y install httpd
service httpd start
yum -y install php mysql
yum install mysql-server
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install phpmyadmin
vi /etc/httpd/conf.d/phpmyadmin.conf
Hit insert hey to make changes to the conf file.
————————————————————————————
# Web application to manage MySQL
# Order Deny,Allow
# Deny from all
Allow from all
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
————————————————————————————
service httpd restart
service mysqld start
/usr/bin/mysqladmin -u root password 'somepassword’
vi /usr/share/phpmyadmin/config.inc.php
————————————————————————————
[...] /* Authentication type */
$cfg['Servers'][$i]['auth_type'] = ‘http’;
[...]
————————————————————————————
Watch the video for the WordPress Database creation in mysql w/ phpmyadmin.
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz -C /var/www/html/
cp -avr /var/www/html/wordpress/* /var/www/html/
rm -rf /var/www/html/wordpress/
cd /etc/httpd/conf
vi httpd.conf
Find the user here… it should be ‘apache’
cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
vi /var/www/html/wp-config.php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');


/** MySQL database username */
define('DB_USER', 'wordpressuser');
/** MySQL database password */
define('DB_PASSWORD', 'password_here');
/** MySQL hostname */
define('DB_HOST', 'localhost');




Add the database settings.
chown -R apache /var/www/html
chmod -R 755 /var/www/html