i try to install Apache 2 on my Ubuntu system version is 14.04 LTS,
installation was success full but when i try to restart the Apache its showing unrecognized service , please help me to solve this problem.
Thanks in advance.
To start the apache server, you can use this command:
$ sudo service httpd start
Other available commands are as follows:
$ sudo service httpd restart ## restart the apache server
$ sudo service httpd stop ## stop the server
To list all httpd commands:
$ sudo service httpd
sudo apt-get remove --purge apache2 apache2-utils
sudo apt-get install --reinstall apache2 apache2-utils
sudo service apache2 start
and then check by:
sudo service apache2 status
I faced same problem and solved it by running the following command:
sudo apt-get purge apache2 apache2-utils apache2.2-bin
sudo apt-get autoremove
sudo apt-get install apache2 apache2-utils apache2.2-bin
Related
Actually, with the new release of Xdebug 3, I have to investigate more why its not working. I don't have much time for that.
The problem was I had this command for vagrant box creation but it does not have any version number.
sudo apt-get install -y php-xdebug
Is there a way to specify the version number to install version 2.9.3
this worked for me. Thank you #LazyOne for help. :-)
sudo apt-get install -y php-pear php7.3-dev
sudo apt install -y php7.3-xdebug
sudo pecl install xdebug-2.9.3
Here what I have done:
1/ Use Google cloud as a server (Ubuntu 18) for admin page.
2/ Have a project react-js app, ex: abc
3/ Encrypt website www.sub.abc.com successfully, point to IP (Godday domain) on Google cloud successfully. (Source: https://linuxhint.com/redirecting_http_https/).
Problem: My app can not run on port 80, nginx took it! I have search many instructions but they
are not clear.
What I have done to fix this:
1/ Edit config file of nginx (https://www.tecmint.com/change-nginx-port-in-linux/).
2/ Export port 80 in my app. (export port=80 npm start).
Can not run my app on port 80 because something has taken that port?!
If I kill port 80 ===> nginx turn off.
Please give me the right way to change config file or replace nginx default folder to my app folder. Thank you!
I have deployed successfully. If you have the same problem. Can follow this.
DEPLOY
NPM + NODEJS
$ sudo apt-get install curl
$ curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
$ sudo apt-get install nodejs
NGINX
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install nginx
CONFIG
cd /
sudo mkdir app
sudo mkdir api
sudo mkdir html <=== git clone ...
cd /etc/nginx/conf.d
sudo touch api.conf
sudo vi api.conf
you can use the nginx as reverse proxy and change the port of you app for another like 8000 for example and configue in nginx:
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
I have deployed successfully.
If you have the same problem. Can follow this.
DEPLOY
`$ sudo apt-get install curl
$ curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
$ sudo apt-get install nodejs`
NGINX
`$ sudo apt update
$ sudo apt upgrade
$ sudo apt install nginx`
CONFIG
`cd /
sudo mkdir app
sudo mkdir api
sudo mkdir html <=== git clone ...
cd /etc/nginx/conf.d
sudo touch api.conf
sudo vi api.conf`
Does anyone successfully install pdo_sqlsrv in ubuntu php 7.2.9 environment? I only see sqlsrv on phpinfo(), pdo_sqlsrv always installed fail. Thank you very much.
I found an afternoon and finally found a solution.
The file 30-pdo_sqlsrv.ini in /etc/php/7.2/cli/conf.d ,
copy to /etc/php/7.2/apache2 , it work !!
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17 mssql-tools
sudo apt-get -y install unixodbc-dev
sudo apt-get -y install gcc g++ make autoconf libc-dev pkg-config
sudo apt-get install php-pear php7.2-dev
sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/7.2/mods-available/sqlsrv.ini
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/7.2/mods-available/pdo_sqlsrv.ini
phpenmod -v 7.2 sqlsrv pdo_sqlsrv
a2enmod mpm_prefork
a2enmod php7.2
service apache2 restart
when i want to update or install any package i got this error:
for example : whealln i exec this sudo apt upgrade or sudo apt install zsh
dpkg: error processing package linux-image-4.15.0-20-generic (--remove):
installed linux-image-4.15.0-20-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
how to fix it?
These commands should hopefully work. They will do a full clean and reinstall.
sudo apt-get autoremove
sudo apt-get --purge remove && sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo dpkg-reconfigure -a
sudo dpkg --configure -a
Can you tell me how can i uninstall nagios and NRPE.
I have tried this command to uninstall NRPE:
sudo apt-get remove nagios-nrpe-server
but when I execute this command it's display to me the version of Nrpe installed
./check_nrpe -H localhost
Thank you in advance
Follow these steps in given order.
1. sudo apt-get remove nagios-nrpe-server
2. sudo apt-get remove --auto-remove nagios-nrpe-server
3. sudo apt-get purge nagios-nrpe-server
4. sudo apt-get purge --auto-remove nagios-nrpe-server
Reboot your machine ,hope this solves your issue.
Simply remove all the nagios packages by:
sudo apt-get remove nagios*