How to reinstall apache server again if deleted? - macos

Here is a challenge.
If apache server is deleted from mac, how will you reinstall it ?

You can try to install Apache web server with Homebrew, by executing the following command:
brew install httpd

Related

How can I install brew httpd on MacOS 11 Big Sur?

I've upgraded macOS version to 11 Big Sur and unable to use brew's apache instead of build in version.
What I did:
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
brew intall httpd
When I'm trying to start the installed httpd it says that apache is started
==> Successfully started httpd (label: homebrew.mxcl.httpd)
but when I run brew services command I see that httpd is not started (and http://localhost:8080 is not working).
sergeylyskov#MacBook-Pro-Sergey ~ % brew services
Name Status User Plist
httpd error sergeylyskov /Users/sergeylyskov/Library/LaunchAgents/homebrew.mxcl.httpd.plist
php#7.3 stopped
php#7.4 stopped
postgresql#12 stopped
P.S. I want to use brew's version because seems like build in apache is not properly work with php modules (it don't show xdebug and imagick extensions in phpinfo())
Any advice?
I tried uninstalling and then reinstalling httpd, but that didn't work initially. When you uninstall, brew does NOT remove the /usr/local/etc/httpd config directory (which is sensible because you might have a lot of things configured in there and not backed up). However, these configuration files might well be outdated (or customized) in a way that makes them incompatible with the latest version of httpd, causing it to fail. So I did the following:
brew services stop httpd
brew uninstall httpd
mv /usr/local/etc/httpd /usr/local/etc/httpd-old
brew install httpd
brew services start httpd
This got it running again with fresh config files; I can now copy over any specific configuration details from httpd-old into the new httpd dir.
Also note: by default, httpd serves from /usr/local/var/www. This dir is not affected by the uninstall-reinstall process, so only your config files need re-doing.

MacOS cannot run nginx

When I run nginx on my MacOS.
➜ nginx nginx
dyld: Library not loaded: /usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
Referenced from: /usr/local/bin/nginx
Reason: image not found
[1] 10170 abort nginx
Please start by installing HomeBrew http://brew.sh/. It is a package manager for MacOS that allows to easily install various Unix applications.
MacOS will prompt you to first install Xcode Command Line Tools (unless you have them already).
After installation, the following command, if necessary, will tell you how to complete the installation:
brew doctor
//Then updates all packages with:
brew update
brew upgrade
//Then Install Nginx
brew install nginx
// Then automatically launch Nginx at startup with:
sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
Good luck!
I had that problem for a bit, but when I ran
brew uninstall nginx
and then
brew install nginx
It reinstalled properly and I was able to run it without getting that error.

How do I install ejabberd 14.05 in ubuntu 10.04?

I want to install latest ejabberd 14.05, XMPP server in Ubuntu 10.04.
when i run command
apt-get -y install ejabberd
it installed ejabberd 2.1.2 but I'd like the latest one to be installed.
How do I get the latest ejabberd version installed? If it's not possible, then due to what reasons exactly?
To install latest ejabberd on Ubuntu, you should check ejabberd Download page. It offers different packaging, either binary installer or .deb package files.

How to install and configure LAMP on ubuntu 12.04

Could somebody please tell me how to install and configure LAMP on ubuntu 12.04 ? Is there a package similar to WAMP Server that is all-in-one ? I have tried to install from command line ,PHP,MySQL work but apache gives me this after sudo service apache2 restart
* Restarting web server apache2
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
And I think probably I did something wrong when installing !
Thank you !
From this tutorial,
Run this commands in Ubuntu Terminal-
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
For Checking-
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
If u get-
Your PHP installation is working fine.
Then you are done.
You can follow tutorial from below link to setup LAMP on your Ubuntu 12,
http://technarco.com/ubuntu-linux/how-install-lamp-ubuntu-12
Enjoy, :)
To resolve this error, you need to stop other process using this port.
In some of cases it is nginx. you can stop it
sudo /etc/init.d/nginx stop
you can install lamp server using Tasksel (Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. This program is used during the installation process, but users can also use tasksel at any time)
check this post http://wiki.workassis.com/ubuntu-install-lamp-using-tasksel/

install the apache module for passenger (ruby)

I am trying to install the apache module for passenger using the instructions provided at http://modrails.com/install.html
passenger-install-apache2-module
I installed apache using macports:
sudo port install apache2
When I run passenger-install-apache2-module it fails, I also tried installing apache from source. Downloaded it from http://httpd.apache.org/ then ran the commands below:
./configure --enable-so
make
make install
I am using Mac OS X 10.6.8
Please help. My objective is to get started with ruby. Thanks.
Turns out that I had to define the apache path variable in .bash_profile

Resources