部署PaaS应用(Part3)Drupal CMS & Magento电子商务系统
部署PaaS应用(Part3)Drupal CMS & Magento电子商务系统1、部署Drupal CMS应用部署PaaS应用(Part3)Drupal CMS & Magento电子商务系统,这两个PaaS应用也是基于Openshift的PHP+MySQL+phpMyAdmin套件搭建的。 Drupal是使用PHP语言编写的开源内容管理框架(CMF),它由内容管理系统(CMS)和PHP开发框架(Framework)共同构成。 (1)在Openshift应用标签创建新应用,点击PHP 5.3。 (2)在公共URL处输入drupal,点击Create Application。 (3)点击查看应用程序。 (4)点击Add MySQL 5.1,添加MySQL应用套件。 (5)点击添加套件。 (6)点击Add phpMyAdmin 4.0,添加phpMyAdmin套件。 (7)点击添加套件。以下为添加完成的套件。 l记下phpMyAdmin的URL: https://drupal-sdcet.example.com/phpmyadmin/l记下用户名adminTthrzqP,密码in6uigtQlPK3。l复制右侧的SourceCode:ssh://55656b2913db8c3e25000001@drupal-sdcet.example.com/~/git/drupal.git/。 (8)在Node节点,git clone源文件# cd /root/sourcegit/# git clone ssh://55656b2913db8c3e25000001@drupal-sdcet.example.com/~/git/drupal.git/Initialized empty Git repository in/root/sourcegit/drupal/.git/The authenticity of host'drupal-sdcet.example.com (192.168.200.102)' can't be established.RSA key fingerprint is90:b6:9e:d0:3e:76:27:ce:34:3b:d6:b4:41:5d:e7:31.Are you sure you want to continueconnecting (yes/no)? yesWarning: Permanently added'drupal-sdcet.example.com' (RSA) to the list of known hosts.remote: Counting objects: 20, done.remote: Compressing objects: 100% (15/15),done.Receiving objects: 100% (20/20), 18.23 KiB,done.remote: Total 20 (delta 0), reused 20(delta 0) (9)将drupal-7.34.tar.gz解压到Node节点的/root/mygit目录。使用SFTP将PaaS v1.2光盘paas-xiandian目录中的drupal-7.34.tar.gz传到Node节点的/root/mygit目录。 # cd /root/mygit/# tar -zxfdrupal-7.34.tar.gz # lsdolibarr-3.6.2dolibarr-3.6.2.zipdrupal-7.34drupal-7.34.tar.gzsugarcrm-example-mastersugarcrm-example-master.zip (10)修改源文件# cd /root/sourcegit/drupal/php/# lshealth_check.phpindex.php # cp -Rf/root/mygit/drupal-7.34/* .cp: overwrite `./index.php'? y # lsauthorize.phphealth_check.php INSTALL.pgsql.txt LICENSE.txt profiles sites web.configCHANGELOG.txtincludes install.php MAINTAINERS.txtREADME.txt themes xmlrpc.phpCOPYRIGHT.txtindex.php INSTALL.sqlite.txtmisc robots.txtupdate.phpcron.php INSTALL.mysql.txtINSTALL.txt modules scripts UPGRADE.txt (11)提交更改# git add . # git commit -am "mychanges" # git pushCounting objects: 1188, done.Compressing objects: 100% (1160/1160),done.Writing objects: 100% (1185/1185), 3.27 MiB| 4.53 MiB/s, done.Total 1185 (delta 143), reused 0 (delta 0)remote: Stopping PHP cartridgeremote: PassEnv variable SHELL was undefinedremote: PassEnv variable USER was undefinedremote: PassEnv variable LOGNAME was undefinedremote: Waiting for stop to finishremote: Stopping MySQL cartridgeremote: Stopping PHPMyAdmin cartridgeremote: PassEnv variable SHELL was undefinedremote: PassEnv variable USER was undefinedremote: PassEnv variable LOGNAME was undefinedremote: Waiting for stop to finishremote: Building git ref 'master', commit382ae13remote: Building PHP cartridgeremote: Preparing build for deploymentremote: Deployment id is 65b3c79aremote: Activating deploymentremote: Starting MySQL cartridgeremote: Starting PHPMyAdmin cartridgeremote: Starting PHP cartridgeremote: Result: successremote: Activation status: successremote: Deployment completed with status:successTossh://55656b2913db8c3e25000001@drupal-sdcet.example.com/~/git/drupal.git/a883e10..382ae13master ->master (12)在新标签页打开drupal-sdcet.example.com,开始安装Drupal,选择Standard。 (13)选择语言。 (14)在新的标签页打开phpMyAdmin的网址https://drupal-sdcet.example.com/phpmyadmin/,输入之前记下来的用户名adminTthrzqP,密码in6uigtQlPK3。 l如果数据库drupal已经存在,则只需要查看数据库服务器的IP地址和端口127.1.246.2:3306即可。l如果数据库drupal不存在,则按照以下步骤创建数据库。 (15)点击“数据库”,新建数据库drupal。 (16)以下为创建好的数据库。记下数据库服务器的IP地址和端口:127.1.246.2:3306。 (17)继续安装Drupal,数据库名输入drupal,数据库用户名为之前记下来的用户名adminTthrzqP,密码为in6uigtQlPK3。 点击Advanced Options,输入数据库服务器的IP地址127.1.246.2,端口3306,点击Save and continue。 (18)输入站点邮箱地址,站点管理员账户名称和密码。 选择国家、时区,取消选择自动检查更新,点击Save and continue。 (19)Drupal安装完成,点击Visit your new site。 (20)以下为Drupal主页。 2、部署Magento电子商务系统 Magento (麦进斗) 是一套专业开源的电子商务系统。 (1)在Openshift应用标签创建新应用,点击PHP 5.3。 (2)在公共URL处输入magento,点击Create Application。 (3)点击查看应用程序。 (4)点击Add MySQL 5.1,添加MySQL应用套件。 (5)点击添加套件。 (6)点击Add phpMyAdmin 4.0,添加phpMyAdmin套件。 (7)点击添加套件。以下为添加完成的套件。 l记下phpMyAdmin的URL: https://magento-sdcet.example.com/phpmyadmin/l记下用户名adminz1rsbHM,密码Tffs-2XZNJKx。l复制右侧的SourceCode:ssh://556579b713db8c3e2500002b@magento-sdcet.example.com/~/git/magento.git/。 (8)在Node节点,git clone源文件# cd /root/sourcegit/# git clone ssh://556579b713db8c3e2500002b@magento-sdcet.example.com/~/git/magento.git/Initialized empty Git repository in/root/sourcegit/magento/.git/The authenticity of host'magento-sdcet.example.com (192.168.200.102)' can't be established.RSA key fingerprint is90:b6:9e:d0:3e:76:27:ce:34:3b:d6:b4:41:5d:e7:31.Are you sure you want to continue connecting(yes/no)? yesWarning: Permanently added'magento-sdcet.example.com' (RSA) to the list of known hosts.remote: Counting objects: 20, done.remote: Compressing objects: 100% (15/15),done.remote: Total 20 (delta 0), reused 20(delta 0)Receiving objects: 100% (20/20), 18.23 KiB,done. # lsdolibarr drupalmagentosugarcrm (9)将magento-example-master.zip解压到Node节点的/root/mygit目录。使用SFTP将PaaS v1.2光盘paas-xiandian目录中的magento-example-master.zip传到Node节点的/root/mygit目录。 # cd /root/mygit/ # unzipmagento-example-master.zip # lsdolibarr-3.6.2 drupal-7.34 magento-example-master sugarcrm-example-masterdolibarr-3.6.2.zipdrupal-7.34.tar.gzmagento-example-master.zipsugarcrm-example-master.zip (10)修改源文件# cd /root/sourcegit/magento/ # cp -Rf/root/mygit/magento-example-master/* .cp: overwrite `./libs/.gitkeep'? ycp: overwrite `./misc/.gitkeep'? ycp: overwrite `./php/index.php'? ycp: overwrite `./README.md'? y # lsdeplist.txt libsmiscphp READMEREADME.md (11)提交更改# git add . # git commit -am"my changes" # git pushCounting objects: 16160, done.Compressing objects: 100% (14159/14159),done.Writing objects: 100% (16155/16155), 29.71MiB | 7.13 MiB/s, done.Total 16155 (delta 6659), reused 0 (delta0)remote: Stopping PHP cartridgeremote: PassEnv variable SHELL was undefinedremote: PassEnv variable USER was undefinedremote: PassEnv variable LOGNAME was undefinedremote: Waiting for stop to finishremote: Stopping MySQL cartridgeremote: Stopping PHPMyAdmin cartridgeremote: PassEnv variable SHELL was undefinedremote: PassEnv variable USER was undefinedremote: PassEnv variable LOGNAME was undefinedremote: Waiting for stop to finishremote: Building git ref 'master', commit8cecabaremote: Building PHP cartridgeremote: Preparing build for deploymentremote: Deployment id is c1284a02remote: Activating deploymentremote: Starting MySQL cartridgeremote: Starting PHPMyAdmin cartridgeremote: Starting PHP cartridgeremote: Result: successremote: Activation status: successremote: Deployment completed with status:successTossh://556579b713db8c3e2500002b@magento-sdcet.example.com/~/git/magento.git/e224839..8cecabamaster ->master (12)在新标签页打开magento-sdcet.example.com,开始安装Magento。 (13)设置位置、时区、货币。 (14)在新的标签页打开phpMyAdmin的网址https://magento-sdcet.example.com/phpmyadmin/,输入之前记下来的用户名adminz1rsbHM,密码Tffs-2XZNJKx。 l如果数据库magento已经存在,则只需要查看数据库服务器的IP地址和端口127.1.246.130:3306即可。l如果数据库magento不存在,则按照以下步骤创建数据库。 (15)点击“数据库”,新建数据库magento。 (16)以下为创建好的数据库。记下数据库服务器的IP地址和端口:127.1.246.130:3306。 (17)继续安装magento,输入数据库服务器IP地址为127.1.246.130,数据库名为magento,数据库用户名为之前记下来的用户名adminz1rsbHM,密码Tffs-2XZNJKx。 选中“跳过基本URL验证”、“使用安全URLs (SSL) ”和“跳过安全URL验证”。 点击Continue。 (18)创建管理员用户的姓名、邮箱地址、用户名和密码。 (19)Magento安装完成。 (20)点击Go to Frontend,进入Magento网站主页。 (21)点击My Account,选择Create an Account。 (22)注册新用户。 (23)以下为Magento普通用户的Dashboard。图文详情,请查看附件。
页:
[1]