If port 8000 is already taken, use another port, e.g.: To see a list of the contents in the directory, go to the server from your web browser’s address bar enter “ localhost:8000” # In windows as an alternative enter “python” to substitute “py -3”, or “python3”.# If the Python version displayed is more than 3.X.Now to start the server in the directory, enter the following commands: # use two dots to go up a directory level if necessary.# add the directory name to enter, e.g.If the number is correct, type in the following “cd” command, then at the directory where your example resides: # Or you may have command py available,.Access the command prompt and enter this command to check for successful installation:.Select “Install”, then “Close” when completed.From the first page, be sure to select the “Add Python 3.xxx to PATH” check box. Towards the bottom of the screen, select the “Windows x86” exe file for downloading.At the “Download” section, select the Python ”3.xxx” link.For a Python installation on Windows, do the following: Now we’ll show you how to set up a local web server for testing. Adding files to Public folders and switch on “Public Folder Sharing” via the Network and Sharing Centre.Right-clicking on files or folders > “Share with…”.the devices you wish to connect to the network.We’ll now show you how to set up a LAN network via Windows that connects to the internet. The Apache’s default welcome page should display “It Works”.To confirm the installation was successful enter “ localhost” or “ 127.0.0.1” into your web browser.For CentOS and Red Hat, enter the command:.Access a terminal for Debian and Ubuntu/Ubuntu-based distro and enter the command:. How to Set Up a Local Web Server on a Linux Device In the web browser, you should see the Apache2 Ubuntu Default Page.To confirm that the installation has been successful, enter the following into a web browser’s address bar:.Confirm the installation, then sit back whilst Apache is installed.Access a terminal and enter the command:.To install Apache Web Server on Ubuntu Linux 18.04, do the following: stop.How to Set Up a Local Web Server on Ubuntu? start.sh & terminal-notifier -title "Terminal" -message "MAMP Servers Started"'Īlias stopm='cd /Applications/MAMP/bin &. See below: alias openmamp='open -j /Applications/MAMP/MAMP.app/ & terminal-notifier -title "Terminal" -message "MAMP Opened"'Īlias startm='cd /Applications/MAMP/bin &. **I decided to take this one step further by including an alias that will open the MAMP app in a minimised state, as well as adding Terminal Notifier into the mix, which will display a native system notification when each command has been successfully executed. – the double ampersands are to ensure that the next command will execute only if the previous command was successful. We’ll then tell Terminal to run start.sh by adding &. The two scripts we want to run are start.sh & stop.sh. The alias issues two commands: cd /Applications/MAMP/bin tells Terminal to change directory into the MAMP app’s ‘bin’ folder, which contain shell scripts that MAMP uses to initialise its services. …and that’s it! Now, whenever you enter startm into the Terminal, MAMP will turn its servers on, while stopm will turn them off. **Finally, we need to ‘activate’ our changes, enter: source ~/.bash_profile **Save your changes by pressing ctrl+o and hitting enter, then exit Nano by pressing ctrl+x. start.sh'Īlias stopm='cd /Applications/MAMP/bin &. You can now start editing your file, so drop this in there: alias startm='cd /Applications/MAMP/bin &. bash_profile does exist, then it will simply open the existing file in Terminals text editor – Nano. bash_profile, this command will create one – if. Type the following into Terminal and press enter: cd **We then need to navigate to our home directory. Launch Terminal from the **/Applications/** Utilities folder. bash_profile , so I thought I’d share with the world how to do it! Turns out, this can easily be done by creating an alias in. I’m always looking for more ways to streamline my development process, and recently I’ve found myself getting mildly annoyed with having to launch the MAMP GUI anytime I wanted to begin building – so why not stop & start the servers via Terminal?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |