Manual installation of WAMP

Of course, this is not the famous wamp installation package.

LAMP (linux, apache, mysql, php), this is a very old development group, the old one can remind many people of his green years. It is not cool to mention LAMP now, and it is still fashionable to talk about MEAN (mongo, express, angular, nodejs).

But many times people are more pragmatic. As long as LAMP can solve problems in the field, why not use it? Besides, the php framework that has emerged one after another, coupled with the php component management tool composer, makes php development like a dirt road. Just like going to the Whampoa Military Academy, you can also conduct business development.

For deployment, of course, LAMP is more suitable, but when developing, everyone basically uses windows. In fact, the installation is not very accurate, because this blog does not intend to use the installation package, it is the compressed version used, which is the legendary green version.

Because I prefer a software to be in one place, rather than putting things everywhere, of course, if you know the rules, it is easy to find, but I usually can't remember.

 

[PHP articles, version: 7.0.11]

PHP installation is relatively simple,

Go to http://windows.php.net/download to download the [Thread Safe] version of the PHP zip package, unzip it to a directory, and then perform a simple configuration on php.ini.

For development, if there are no special requirements, the default configuration is almost the same. Sometimes, to combine the needs, load several extension packs.

For example, for laravel development, the following conditions are required

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension (php has built-in)
  • XML PHP Extension (php has built-in)

Then make sure the following comment is released

wrote
extension=php_mbstring.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll

 

In addition, you need to debug the development, so you need the extension package php_xdebug

Go to https://xdebug.org/download.php to download the [PHP 7.0 VC14 TS] version, put it in the ext directory of php, and then configure php.ini

wrote
zend_extension=php_xdebug-2.4.1-7.0-vc14.dll

[xdebug]
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

 

[mysql articles, version: 5.7.15]

Go to the website http://dev.mysql.com/downloads/mysql/ to download the zip package of the community version of mysql, decompress it in a directory, and then perform a simple configuration on my.ini.

wrote
[mysqld] #Configure
the directory path of mysql
basedir=D:/apps/mysql-5.7.15-win32 #Configure
the location of the database file
datadir=D:/apps/mysql-5.7.15-win32/data #Data

storage now Basically, they are all UTF8, so set
character-set-server=utf8 #To
prevent TIMESTAMP warning
explicit_defaults_for_timestamp=true #To
keep mysql's behavior consistent with oracle
sql_mode='ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_C NO_ENGINE_SUBSTITUTION, PIPES_AS_CONCAT, ANSI_QUOTES'
#Do not use LOAD_FILE, LOAD DATA and SELECT ... , data interaction between INTO OUTFILE and external files, so close this path
secure-file-priv=NULL #Development
does not use ssl connection
skip-ssl

 

Since it is a zip version, there is no default data generation yet. It needs to be initialized. Go to the bin directory of the mysql directory and execute the command

wrote
mysqld --initialize-insecure

 mysql startup

wrote
mysqld --console

 

Login as root user (no password), then create database and user

wrote
create database mydb default character set utf8 default collate utf8_general_ci;

create user 'myuser'@'localhost' identified by 'mypass';

grant select,insert,update,delete,create,drop on mydb .* to 'myuser'@'localhost';

 

 In this way, you can log in with the user myuser, the password mypass, and use the database mydb.

 

[apache articles, version: 2.4.17]

Go to the website http://www.apachelounge.com/download/ to download the apache compiled by VC14, extract it to a directory, and then perform a simple configuration on httpd.conf.

wrote
ServerRoot "D:/apps/httpd-2.4.17-win32-VC14/Apache24"
LoadModule php7_module "D:/apps/php-7.0.11-Win32-VC14-x86/php7apache2_4.dll"
PHPIniDir D:/apps/php-7.0.11-Win32-VC14-x86/
DocumentRoot "D:/apps/httpd-2.4.17-win32-VC14/Apache24/htdocs"

<Directory "D:/apps/httpd-2.4.17-win32-VC14/Apache24/htdocs">
#默认不动
</Directory>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "D:/apps/httpd-2.4.17-win32-VC14/Apache24/cgi-bin/"
</IfModule>

<Directory "D:/apps/httpd-2.4.17-win32-VC14/Apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory> Include "D:/apps/alias/*"

#Use the form of Include, call each virtual service to set

 For example, the settings of D:/apps/alias/myapp.conf

wrote
Alias /myapp "D:/php/myapp/public"

<Directory "D:/php/myapp/public">
Options Indexes FollowSymLinks
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
</Directory>

 To execute, you can directly execute httpd in the bin directory of apache.

 

In this way, the green version of the suit is completed.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326615088&siteId=291194637