การสร้างโปรแกรมประยุกต์เว็บ > PEAR 
         คำสั่งของ PEAR Installer
      
	    ตัวติดตั้ง PEAR มีคำสั่งในการกระจายแพ็คเกจ เช่น การติดตั้ง ถอนการติดตั้ง อัพเกรด ดาวน์โหลด เป็นต้น การดูรายการคำสั่งทั้งหมดเรียกคำสั่ง help  
   		C:\APPSERV\PHP>pear help  
   		คำสั่งนี้จะแสดงผลรายการคำสั่งทั้งหมด  
   		
          
            | Command | 
              | 
           
          
            | build | 
            Build the extension from source. | 
           
          
            | bundle | 
            Download and unpack a PECL extension. | 
           
          
            | channel-add | 
            Add a Channel. (PEAR 1.4+) | 
           
          
            | channel-alias | 
            Specify an alias to a channel name. (PEAR 1.4+) | 
           
          
            | channel-delete | 
            Remove a channel from the list. (PEAR 1.4+)  | 
           
          
            | channel-discover | 
            Initialize a channel from its server name. (PEAR 1.4+) | 
           
          
            | channel-info | 
            Retrieve information on a channel. (PEAR 1.4+) | 
           
          
            | channel-update | 
            Update an existing channel. (PEAR 1.4+) | 
           
          
            | clear-cache | 
            Clear the XML-RPC cache. | 
           
          
            | config-create | 
            Create a default configuration file. (PEAR 1.4+) | 
           
          
            | config-get | 
            Echo a specific configuration setting. | 
           
          
            | config-help | 
            Show information about a setting. | 
           
          
            | config-set | 
            Set a specific configuration setting value. | 
           
          
            | config-show | 
            Show all configuration setting values. | 
           
          
            | convert | 
            Convert a package.xml 1.0 format to package.xml 2.0 format. (PEAR 1.4+) | 
           
          
            | download | 
            Download a package but not install it. | 
           
          
            | download-all | 
            Downloads every available package. | 
           
          
            | info | 
            Display information about a package. | 
           
          
            | install | 
            Install a package, will report with success or failure. | 
           
          
            | list | 
            List installed packages. | 
           
          
            | list-all | 
            List all packages, packaged and/or available. | 
           
          
            | list-channels | 
            List available channels. (PEAR 1.4+) | 
           
          
            | list-files | 
            List files in an installed package. (PEAR 1.4+) | 
           
          
            | list-upgrades | 
            List available upgrades for the installed packages. | 
           
          
            | login | 
            Connects and authenticates to the remote PEAR server. | 
           
          
            | logout | 
            Logs out from the remote PEAR server. | 
           
          
            | makerpm | 
            Builds a RPM spec file from a PEAR package. | 
           
          
            | package | 
            Build a package. | 
           
          
            | package-dependencies | 
            Show package dependencies. | 
           
          
            | package-validate | 
            Validate package consistency. | 
           
          
            | remote-info | 
            Information about remote packages. | 
           
          
            | remote-list | 
            List remote packages. | 
           
          
            | run-scripts | 
            Run post-install scripts bundled with a package. (PEAR 1.4+) | 
           
          
            | run-tests | 
            Run regression tests. | 
           
          
            | search | 
            Search the remote package database. | 
           
          
            | shell-test | 
            Do a shell script test. | 
           
          
            | sign | 
            Sign a package distribution file. | 
           
          
            | uninstall | 
            Uninstall and remove a package. | 
           
          
            | update-channels | 
            Update the channel list. (PEAR 1.4+) | 
           
          
            | upgrade | 
            Upgrade a package to the current version (see also: preferred_state) | 
           
          
            | upgrade-all | 
            Upgrade all packages. (see also: list-upgrades) | 
           
            		
   		Usage: pear [options] command [comanad-options] <parameter>  
	    Type "pear help options" to list all options. 
	    Type "pear help shortcuts" to list all command shortcuts. 
	    Type "pear help <command>" to get the help for the specificed command.     		
        การเรียกคำสั่งใช้ไวยากรณ์  
        pear [options] command [comanad-options] <parameter>  
   		การแสดงตัวเลือกทั้งหมด 
	    pear help options  
   		การแสดง shortcuts ของคำสั่ง 
	    pear help shortcuts  
   		การแสดงรายละเอียดการใช้คำสั่ง 
	    pear help <command>  
   		ตัวอย่าง การดูวิธีเขียนคำสั่ง channel-add  
   		C:\APPSERV\PHP>pear help channel-add  
	    pear channel-add <channel.xml> 
	    Add a private channel to the channel list. Note that all public channels 
	    should be synced using "update-channels". Parameter may be 
	    either a local file or remote URL to channel.xml.  
   		Channel เป็นช่องทางการติดต่อโดยตรงระหว่าง pear กับแม่ข่าย เช่น pear.php.net โดยสามารถเพิ่ม ลบ ปรับปรุง channel ดูสารสนเทศได้จาก channel-info  
   		Config เป็นการบริหารคอนฟิก เช่น การตั้งค่า ดูรายละเอียดค่าคอนฟิกใช้คำสั่ง config-help  
   		การติดตั้ง 
   		การติดตั้งแพ็คเกจสามารถติดตั้งได้ 2 วิธี คือ แบบอัตโนมัติ และกึ่งอัตโนมัติ  
   		การติดตั้งอัตโนมัติ 
   		การติดตั้งอัตโนมัติเรียกคำสั่ง install และระบุชื่อแพ็คเกจที่ต้องการติดตั้ง ไวยากรณ์นี้จะดาวน์โหลดเวอร์ชันล่าสุดจาก pear.php.net แล้วทำการติดตั้งอย่างอัตโนมัติ  
   		C:\APPSERV\PHP>pear install date  
	    downloading Date-1.4.6.tgz ... 
	    Starting to download Date-1.4.6.tgz (53,535 bytes) 
	    .....done: 53,535 bytes  
   		install ok: channel://pear.php.net/Date-1.4.6  
   		บางแพ็คเกจเป็นแพ็คเกจที่ขึ้นต่ออีกแพ็คเกจ เช่น XML_RSS เป็นแพ็คเกจที่ทำให้สามารถกระจาย Resource Description Framework (RDF) ของเอกสารในไซต์ การติดตั้งต้องพบแพ็คเกจ XML_Tree มิฉะนั้นจะเกิดความผิดพลาด การหลีกเลี่ยงปัญหาแพ็คเกจขึ้นต่อ ให้ใช้ตัวเลือก a เพื่อทำการดาวน์โหลดและติดตั้งแพ็คเกจชุดที่ขึ้นต่อพร้อมกัน  
   		C:\APPSERV\PHP>pear install a xml_rss  
	    downloading XML_RSS-0.9.2.tgz ... 
	    Starting to download XML_RSS-0.9.2.tgz (3,515 bytes) 
	    .....done: 3,515 bytes  
   		downloading XML_Tree-1.1.tgz ...  
   		  Starting to download XML_Tree-1.1.tgz (4,826 bytes) 
	    .....done: 4,826 bytes  
   		install ok: channel://pear.php.net/XML_Tree-1.1  
	    install ok: channel://pear.php.net/XML_RSS-0.9.2  
   		แพ็คเกจที่ติดตั้งเป็นเวอร์ชันเดียวกับแพ็คเกจที่ติดตั้งอยู่ก่อนแล้ว คำสั่งนี้จะถูกยกเลิก  
   		การติดตั้งกึ่งอัตโนมัติ 
   		การติดตั้งกึ่งอัตโนมัติช่วยให้สามารถติดตั้งแพ็คเกจด้วยชุดที่ต้องการได้ โดยขั้นตอนมีการดาวน์โหลดและติดตั้งที่ต้องระบุเอง  
   		C:\APPSERV\PHP>pear download xml_rss  
	    downloading XML_RSS-0.9.2.tgz (3,515 bytes) 
	    .....done: 3,515 bytes 
	    File C:\APPSERV\PHP5\XML_RSS-0.9.2.tgz downloaded  
   		การติดตั้งต้องระบุเป็นชื่อไฟล์นามสกุล .tgz ตามที่ได้รับการดาวน์โหลด เช่น XML_RSS-0.9.2.tgz  
   		C:\APPSERV\PHP>pear download xml_rss  
   		install ok: channel://pear.php.net/XML_RSS-0.9.2  
   		การอัพเกรดแพ็คเกจ 
   		การอัพเกรดแพ็คเกจเพื่อปรับให้เป็นเวอร์ชันล่าสุดของ PEAR เรียกคำสั่ง upgrade  
   		C:\APPSERV\PHP>pear upgrade date  
   		upgrade ok: channel://pear.php.net/Date-1.4.6  
   		ถ้าเป็นเวอร์ชันล่าสุดจะไม่มีการอัพเกรด  
   		ถ้าต้องการอัพเกรดทั้งหมด  
   		C:\APPSERV\PHP>pear upgrade-all  
   		การถอนการติดตั้ง 
   		การถอนการติดตั้ง เรียกคำสั่ง uninstall  
   		C:\APPSERV\PHP>pear uninstall date  
   		uninstall ok: channel://pear.php.net/Date-1.4.6 
   		  	
		
         
			
	  			 |