Package PHP projects with Installanywhere

Source: Internet
Author: User

Now there is a PHP project, using apache+mysql+php development, after the completion of development, the customer asked to package the installation program, the client machine in the absence of any development environment can also run the project

The packaging steps are as follows:

1. Download Installanywhere

2. Put the installation-free files in a folder (such as Wamp, which has apache2.2+mysql5+php5+www+openoffice4+windows Resource kits+openoffice.bat+ start-up service. bat+ Stop service. Bat)

3. Open Installanywhere and start the key steps for this package

3.1 Select "Create New project", "Basic Project Template", click "Save as" to select the last saved path, and the project name

Configure the name of the product, the name of the installer, and so on

3.2 Add the file, click "AddFiles", open the Wamp folder, click "Add All", ' do ', add all the files to be packaged

Click Add files to add the "User install Folder" file you want to create as a setup program

Select the contents of the prepared folder as the production program, click Add All

Select a main function for the installer, if the installer has the choice, there is no need to control the interface, then click Next will prompt you do not select the main function, do you want to choose? Click No to proceed to the next step

Click Advanced Designer to enter the interface shown

Click Locales, set the installation language, default is English, here to choose Simplified Chinese

3.3 In Install, addaction select "Create alias,link,shortcut", in the Path option select "Shortcut ' Destionation Folder" means to install to the Start menu, Click Choose Target to select "Start service. Bat"

3.4 Same as 3.3 step, do the same for "stop service. Bat".

3.5 in Install, Addaction select "Modify Text file-single file" Click Choose Target "Start service. bat" files, select Prepend, write
net start MySQL
net start Apache

net start Openofficeunoserver

3.6 In Install, addaction select "Modify Text file-single file" Click Choose Target Select "Stop service. Bat" files, select Prepend, write
net stop Apache
net stop MySQL

net stop openofficeunoserver

3.7 In Post-Install, addaction select "Execute Command" and in "command line" enter "cmd/c $USER _install_dir$\openoffice.bat $USER _ install_dir$ ", this command is used to execute the Openoffice.bat file after installation is complete

3.8 in Post-Install, addaction select "Execute script/batch file" in comment named "Register MySQL Service", write in Script

Call "$USER _install_dir$\mysql5\bin\mysqld"-remove MySQL
Call "$USER _install_dir$\mysql5\bin\mysqld"-install MySQL

net start MySQL

3.9 in Post-Install, addaction select "Execute script/batch file" in comment named "Register Apache Service", write in Script
Call "$USER _install_dir$\apache2.2\bin\httpd"-K install-n Apache

net start Apache

3.10 in Pre-uninstall, addaction select "Execute script/batch file" to be named "Logoff MySQL service" in comment and write in Script
Call net stop MySQL
Call "$USER _install_dir$\mysql5\bin\mysqld"-remove MySQL

3.11 in Pre-uninstall, addaction select "Execute script/batch file" to be named "Logout Apache Service" in comment and write in Script

Call net stop Apache
Call "$USER _install_dir$\apache2.2\bin\httpd"-K uninstall-n Apache

3.12 in Pre-uninstall, addaction select "Execute script/batch file" to be named "Logout OpenOffice Service" in comment

Call net stop Openofficeunoserver

Call SC Delete Openofficeunoserver

3.13 Build-->build Project, start packaging, complete

After packaging is complete, the button open in Explorer>, folder Web_installers>instdata>windows>vm>, file Install.exe is the installation file, you can directly double-click to install

Note: No spaces appear on the entire installation path during installation

Once the installation is complete, you can then enter the address of the project in the browser and access the project!

Package PHP projects with Installanywhere

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.