Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Use PaaS service to host your web - with pagodabox

LucienLee
December 04, 2013

Use PaaS service to host your web - with pagodabox

Fundamental PHP & Web Development

LucienLee

December 04, 2013
Tweet

More Decks by LucienLee

Other Decks in Programming

Transcript

  1. Use PaaS service to host your web - with pagodabox

    Fundamental PHP & Web Development ! lecturer : Lucien Lee 李柏緯 Lecture 10
  2. Paas •Provide API to deploy your service •You don’t set

    up a really remote environment. • Just use platform and set configuration. •Pay on demand
  3. Basic outline 1. Register With Pagoda Box 2. Create Your

    Application 3. Set Up Git 4. Create Your SSH Key 5. Deploy Your Code 6. Set Your Domain
  4. Git

  5. Set Up SSH Keys 1. cd ~/.ssh 2. ssh-keygen -t

    rsa -C "[email protected]" 3. cat ~/.ssh/id_rsa.pub 4. copy and paste
  6. Copy sql and query $sql_album = "CREATE TABLE IF NOT

    EXISTS `Album` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(128) NOT NULL, `Owner` varchar(32) NOT NULL, `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;"; ! mysql_query($sql_album);
  7. Copy sql and query $sql_photo = "CREATE TABLE IF NOT

    EXISTS `Photo` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(128) NOT NULL, `Filename` varchar(64) NOT NULL, `Comment` text, `AlbumID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ;"; ! mysql_query($sql_photo);
  8. Copy sql and query $sql_user ="CREATE TABLE IF NOT EXISTS

    `User` ( `Account` varchar(32) NOT NULL, `Password` varchar(32) NOT NULL, `Name` varchar(32) NOT NULL, PRIMARY KEY (`Account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; ! mysql_query($sql_user);