while searching for installing apache web server in linux ubuntu lucid ,I found that some articles use the name apache2 while others use httpd..Is apt-get install apache2 the correct way to install?
I want to remove all of my current apache2 installation ,and install everything fresh. Should I use
sudo apt-get remove --purge apache2
I currently have apache in /etc/apache2
apache2 is Ubuntu's name for the Apache httpd version 2 branch (currently using 2.2, I think). The best source for information on Ubuntu packages is probably its own documentation; see https://help.ubuntu.com/10.04/serverguide/httpd.html. But yes, those two commands are correct.
Related
I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).
I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.
I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I'm new to Linux so I'm a bit confused when applying the same on Amazon EC2 instance.
That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.
After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:
Login to your Linux instance and perform the regular system updates first
$ sudo yum update
Stop the running web server
$ sudo service httpd stop
Create backup of the existing httpd by using command:
$ sudo cp -a /etc/httpd /etc/httpd.bak
Remove any existing PHP packages
$ sudo yum remove php*
Remove old web server installs
$ sudo yum remove httpd*
Update yum package repository
$ sudo yum clean all
$ sudo yum upgrade -y
Install Apache 2.4
$ sudo yum install httpd24
Install PHP 7 packages
$ sudo yum install php70 php70-mysqlnd php70-imap php70-pecl-memcache php70-pecl-apcu php70-gd
Install a new version of mod_ssl
$ sudo yum install mod24_ssl
I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.
Finally all I needed to do is start my web server
$ service httpd start
That's it.
Do retain that the solution by MrGoogle will reset any configuration in existence in the hpptd service.
You will probably need to reconfigure some settings...
I had to reconfigure mod_rewrite and .htaccess File for apache:
https://devops.ionos.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/
Can I ask that are there any scripts in Linux that similar to reset-server-realms.command on Mac that can delete all realms on server. Actually I need to reset the server and clean it before use the application officially. I try to uninstall regarding to the guides on Realm website but somehow the old data still comes up.
Thanks
Uninstalling the package doesn't remove any data. This is done on purpose, so that the upgrade process of RPMs and debs works properly.
We don't provide a script, but the easiest way to wipe everything is simply to run:
sudo rm -rf /var/lib/realm
# CentOS
sudo yum remove realm-object-server-de
sudo yum install realm-object-server-de
# Ubuntu
sudo apt-get install --reinstall realm-object-server-de
Please note that this will preserve your configuration, still. The configuration is stored in /etc/realm.
Hello im using Ubuntu and for example i installed nginx via apt-get and via passenger, now i have two nginx.conf location (/opt/nginx/conf/nginx.conf and /etc/nginx/nginx.conf) (but i removed first nginx installation with apt-get remove nginx) where i can ensure what configuration file (nginx.conf) /etc/init.d/nginx start will use ? It si more general linux question than nginx related.
One approach is to rename one of these configuration files and see whether the service can still start.
In Debian-based Linux, you can use dpkg to find the package to which a file belongs:
dpkg -S /etc/nginx/nginx.conf
Note that this will only work for files installed by dpkg (and therefore apt-get, Synaptic, USC, etc.). In this particular case, I'd wager that passenger installs into /opt, since an alternate package manager installing into /etc would be borderline evil.
I never used CentOS, I only used Ubuntu, and I'm really new in web server matters. I couldn't find any easy way to install Lighttpd in CentOS 6.0. Could anyone please instruct me how to install Lighttpd in CentOS 6.0? Waiting for help.
Run the following to add the proper repo and install it.
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
rpm -Uhv rpmforge-release-0.5.3-1.el6.rf.i686.rpm
yum install lighttpd
Or for 64bit
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install lighttpd
This guide is very easy and just works:
http://www.howtoforge.com/installing-lighttpd-with-php5-and-mysql-support-on-centos-6.0
sudo yum list available 'lighttpd*'
this should tell you which lighttpd package are available for your arch and you can then do
yum install package.
I install mint on a virtual machine workstation
What command is used to install Apache web server ?
I have tried
admin> apt-get install Apache
but no such files are found on any server. Thank you.
Use this:
sudo apt-get install apache2
Try apt-cache search apache to find out the name of the relevant packages.
Try this:
First you have to open up Terminal
Applications > Accessories > Terminal
Copy paste the following command
sudo apt-get install apache2