reconfigure bsd-mailx on ubuntu - email

I tried apt-get remove bsd-mailx and apt-get purge bsd-mailx
to see if with apt-get install bsd-mailxI would get the default configuration screen of it, but don't get it. How might I get to completely remove bsd-mailx to get once again the configuration screen, or how to toggle the configuration screen somehow as when it is first installed to apply a different configuration.

Debian bsd-mailx package uses postfix as default agent (service) for outside of localhost mail delivery. If you missed config step or wish to re-configure bsd-mailx, do:
sudo dpkg-reconfigure postfix
Check you running config /etc/postfix/main.cf and service status
sudo service postfix status

sudo dpkg-reconfigure -plow bsd-mailx

Related

How to install apache in ubuntu-16.04?

Earlier I had installed apache without issues. But after formatting my laptop, I am facing this problem.
According to the error messages I search the solution codes and go through those codes. But it is not working.
You can easily install Apache into your Ubuntu 16.04, by the following steps.
In ubuntu first, we need to update and upgrade by using the following commands
sudo apt-get update
sudo apt-get upgrade
then you can install Apache2 by following the command
sudo apt-get install apache2
After the installation you can check in the browser.
http://your_server_ip
there you can see the apache2 page over there.
sudo apt-get install apache2 -y
sudo apt-get install libpcre3 libpcre3-dev libapr1 libapr1-dev libaprutil1 libaprutil1-dev
wget http://mirrors.fibergrid.in/apache//httpd/httpd-2.4.37.tar.gz
tar -xvzf httpd-2.4.37.tar.gz
cd httpd-2.4.37
./configure --prefix=/usr/local/apache
make
make install
Apache will be installed at prefix given i.e. /usr/local/apache/
Install Apache In Ubuntu
sudo apt-get update
sudo apt-get install apache2
sudo ufw app list
sudo ufw allow 'Apache Full'
sudo ufw status // Status will be inactive.
sudo systemctl status apache2 // Apache server will be Active.
Check Apache Server
You can check your apache server is properly working or not via your IP.
Enter in your Browser
http://server_domain_or_IP
You will find the Default page.
Mange Apache Process
sudo systemctl stop apache2 // Stop Apache Server
sudo systemctl start apache2 // Start Apache Server
sudo systemctl restart apache2 // Restart Apache Server
sudo systemctl reload apache2 // Reload Apache Server
sudo systemctl disable apache2 // Disable Auto Start Server
sudo systemctl enable apache2 // Enable Auto Start Server
sudo apt-get update
sudo apt-get install apache2
sudo vim /etc/apache2/apache2.conf
Options Indexes FollowSymLinks
AllowOverride all (Change from none to all)
Require all granted (Change require all to granted)
AccessFileName .htaccess
Require all granted (Change none to all)
sudo chmod -R 777 /var/www/html/
sudo a2enmod rewrite
sudo systemctl restart apache2
Done..
check with your ip (localhost)
http://server_domain_or_IP

Installing kubernetes on localhost using LXD

I am trying to install kubernetes on localhost using LXD but facing issue. I am using conjure-up for this but on proceeding localhost option is not highlighted stating that LXD not found.
[Error]
I have installed LXD as per commands given. Do I need to provide path somewhere so that conjure-up finds the path or is there some other issue?
This worked for me:
sudo apt install snapd
sudo snap install lxd
sudo snap install conjure-up --classic
sudo lxd init --auto
/snap/bin/lxc network create lxdbr0 ipv4.address=auto ipv4.nat=true ipv6.address=none ipv6.nat=false
conjure-up kubernetes
Edit: I had to sudo apt purge lxd first
Then
sudo apt upgrade
After installing lxd as suggested on conjure
sudo snap install lxd
/snap/bin/lxd init
Disabled IPV6 with the wizard
And then conjure-up
Don't forget to logout and login after adding the user to the group
(I actually did a reboot)
You'll also need to create an LXD "dir" storage. Else no pods will launch correctly. This is a known issue with conjure-up. You can specify this when you run lxd init.
https://docs.conjure-up.io/stable/en/spellbooks/kubernetes#limitations

OpenStack: Keystone and nova-network inactive after reboot

After Installing RDO (OpenStack Packstack) on CentOS 7.2 (7.2.1511) I always end up with following:
Once OpenStack is successfully installed I can use OpenStack as intended.
Even that openstack-status returns:
..
openstack-nova-network: inactive (disabled on boot)
openstack-keystone: inactive (disabled on boot)
mysqld: inactive (disabled on boot)
.. (and some more)
After a reboot of the system I cannot access Keystone anymore (since it's disabled on boot) but also if I try to start the service manually with:
service openstack-nova-network restart
or all services with
openstack-service start
end in a timeout. So basically - once I've reboot the VM where I installed OpenStack I cannot use OpenStack anymore..
I installed with following commands:
sudo -i
systemctl disable NetworkManager firewalld
systemctl enable network
vi /etc/selinux/config
SELINUX=permissive
sync;reboot
vi /etc/enviroment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
yum install -y centos-release-openstack-mitaka
yum update -y
yum install -y openstack-packstack
packstack --allinone
I had the some issue with openstack mitaka on centos 7 and this solved the issue:
systemctl restart httpd.service
Since those services are disabled, they will not start when rebooted. You first need to enable the service and then start it. Refer to this.
systemctl enable openstack-keystone.service
systemctl start openstack-keystone.service

Cannot use commands 'postgres' or 'pg_ctl'

I am on Unix. I have got postgresql-9.3 installed.
When I want to start the server using pg_ctl or postgres, the terminal gives me:
The program 'postgres' is currently not installed. You can install it by typing:
sudo apt-get install postgres-xc
Can't I start the server without this postgres-xc?
This must be remnants of the postgres-xc package you had installed previously.
Since you just installed postgresql-9.3 and don't seem to have any databases in use, yet, I suggest to completely purge all postgres packages.
sudo apt-get purge postgresql-9.2
sudo apt-get purge postgresql-xc
...
Until there's nothing left:
dpkg -l | grep postgres
Then start from scratch. Your instance of pg_ctl seems to belong to the package postgres-xc. This should be gone after you've uninstalled the package. Find out with one of these commands:
dpkg -S pg_ctl
dlocate pg_ctl
apt-file search pg_ctl
pg_ctlcluster is provided by the package postgresql-common.
pg_ctl is provided by the package postgresql-9.3.
More about starting Postgres in the manual.
It is possible you might be missing a few things.
Try:
sudo apt-get install postgresql-client and
sudo apt-get install postgresql postgresql-contrib
The message about installing xc is a dud, it's probably suggesting that based on what it scanned inside the xc repositories.
Here's a good reference to this problem and its solution:
https://dba.stackexchange.com/questions/72580/missing-the-pg-ctl-package-in-postgres-9-3-installation
Due to reasons a normal install of postgres will not place the postgres binary file in the path.
Adding the right directory to the path solves the problem (temporarily).
PATH=/usr/lib/postgresql/9.3/bin:$PATH
To make it permanent on my Ubuntu machine I added the line to /etc/environment this makes it work for all users.
The correct way to set the PATH is different for different systems, for more info see see:
How to permanently set $PATH on Linux?
You must install postgresql-client:
sudo install postgresql-client
Try to enter this command to the console:
sudo -u postgres psql

libcurl - easy.h configuration prob

my php installation has got some problem while installing I am getting
following error:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
which version of the libcurl should i use for php-5.2.8 installation
thanks in advance
Try With This
None of these will allow you to compile PHP with cURL enabled.
In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl. They generally are bundled in a separate development package.
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-dev
Then you can just do:
./configure --with-curl # other options...
If you compile cURL manually, you can specify the path to the files without the lib or include suffix. (e.g.: /usr/local if cURL headers are in /usr/local/include/curl).
Hopefully this will help, I had to do some PHP work on one project and the following are the steps I have done and documented for future, hopefully it will be some use to you or some other people.
Setup PHP, MySql on Ubuntu 12.4
1- Install Apache2:
sudo apt-get install apache2
- Open up any web browser and then enter http://localhost/
You should see a folder entitled apache2-default/. Open it and you will see a message saying "It works!" , congrats to you!
2-Install PHP:
sudo apt-get install php5 libapache2-mod-php5
Restart apache2
sudo /etc/init.d/apache2 restart
3- Test PHP
sudo gedit /var/www/testphp.php
This will open up a file called phptest.php.
Copy/Paste this line into the phptest file:
Save and close the file, open you're web browser and type the following into the web address: http://localhost/testphp.php
-you should see a long file opened
4- Install MySQL
sudo apt-get install mysql-server
-In order for other computers on your network to view the server you have created, you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnffile.
gksudo gedit /etc/mysql/my.cnf
-Change the line
bind-address = 127.0.0.1
And change the 127.0.0.1 to your IP address.
-This is where things may start to get tricky. Begin by typing the following into Terminal:
mysql -u root
-Following that copy/paste this line:
mysql> SET PASSWORD FOR 'root'#'localhost' = PASSWORD('yourpassword');
-(Make sure to change yourpassword to a password of your choice.)
- install a program called phpMyAdmin which is an easy tool to edit your databases.
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
-After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:
gksudo gedit /etc/php5/apache2/php.ini
Now we are going to have to uncomment the following line by taking out the semicolon (;).
Change this line:
;extension=mysql.so
To look like this:
extension=mysql.so
Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart