- Install via chocolately
choco install nginx -y** The-yargument is to skip any confirmation messages...just install it. It's fine ;)
- Install via chocolately
choco install php
- Install via chocolately
choco install mysql
- Install via chocolately
choco install mysql.workbench
C:\tools\nginx-1.17.0\confor whichever is the latest version installed
C:\tools\php72or whichever is the latest version installed
- Make sure to enable the following extensions
extension=curl
extension=odbc
extension=pdo_mysql
extension=pdo_mysql
We use this .bat file to run PHP-FPM. You can name this file anything you'd like, i.e.: start-php-fcgi.bat.
Copy the following into that file:
@ECHO OFF
ECHO Starting PHP FastCGI...
set PATH=C:\tools\php73\;%PATH%
C:\tools\php73\php-cgi.exe -b 127.0.0.1:9000
Download the following code snippet that will run PHP in the background without needing to have a console/terminal opened.
Read more on why we want this tool.
Now open a new terminal/prompt and run the following command c:\tools\php73\start-php-fcgi.bat
This will run the required PHP CGI on windows :)
- This is our default nginx configuration. I like to put all servers into a dedicated folder, e.g.:
/servers
# user nobody;
worker_processes 1;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
include C:/nginx-1.17.3/conf/servers/*.conf;
}
server {
listen 80;
server_name php.kanebridge;
index index.php;
error_log C:/nginx-1.17.3/php-test/error.log;
access_log C:/nginx-1.17.3/php-test/access.log;
root C:/web-projects/php-test;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
}
}
- I use CMDer but you can use any terminal. I'd use cmder. It's less suckage.
- Nginx should be running at this point. You can check by visiting http://localhost in your browser of choice.
- Next, let's add nginx to Windows' PATH variables. To do this, open "System Properties" and visit the "Advanced Tab" and click on "Environment Variables" on the bottom right of the window (http://drops.cavscout.us/TSdFDY).
- Next, you'll need to find "Path" variable under "System variables" (http://drops.cavscout.us/vtP5bo) and enter the nginx path which is:
C:\tools\nginx-1.17.0. - Click 'OK' and you should be all set to use nginx in your terminal.
- You now have the following options to run in the terminal:
- nginx -s stop fast shutdown
- nginx -s quit graceful shutdown
- nginx -s reload changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
- nginx -s reopen re-opening log files
- Next, you'll need to create an entry in Windows' hosts file which is located in
C:\Windows\System32\drivers\etc.
choco upgrade chocolatey
choco install vscode
choco install git
choco install smartgit
choco install vlc
choco install 7zip.install
To generate an SSH key in Windows 7, you'll need to download a console/terminal emulator that has SSH built-in. One of the most widely used emulators for Windows is either Cygwin or Cmder. Let's go with Cmder.
- Download Cmder
- Extract the zip file into your desired directory (I'd keep it at the root of your C: drive - i.e.: C:/Cmder)
This is a mandatory security step from GitHub.
-
Open PowerShell (as admin) and type the following command:
ssh-keygen.exeYou'll be prompted several times. There is no need to do anything other than hitting the enter key until you see ASCII art (a picture of sorts) in the terminal (powershell in this case).
(Make sure vscode is installed)
-
Copy the path generated by ssh-keygen and open it with vscode
code C:\Users\YOUR_USER_PROFILE_NAME\.ssh\id_rsa.pub.Open the file named
id_rsa.pubcopy the value from the file.Hint: The ssh key should begin with:
ssh-rsa -
Log into https://github.com/settings/key and click "New SSH Key".
-
Paste your rsa key and click submit/save.
Now you are able to successfully clone any respository from GitHub.
Please make sure you're in the target directory you want the repository to be cloned into: i.e.: C:/web-projects (this can be any directory you wish.
git clone [email protected]:kanebridge-corp/kanebridge.com.git
$connection_string = 'Driver={Attunity Connect Driver};BindUrl=attconnect://192.168.0.168:5330/Navigator;DefTdpName=KANERMS;OneTdpMode=1;misc/language=enus;queryProcessor/noThreads=true;debug/logFile=ODBC_MYDSN_%p.log;';