How Apache Server works and How Install Apache Server.
Apache is the web server
Most widely used version 2.2
By default, 2.2
Around 75% apache webserver are used
A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files that form Web pages to users, in response to their requests, which are forwarded by their computers’ HTTP clients. Dedicated computers and appliances may be referred to as Web servers as well.
Apache installation in Ubuntu
Install tasksel to download multiple related packages .
Select lamp , samba and openssh server package
Also install – python-software-properties for other dependence
Add repository – add-apt-repository ppa:wedupd8team/java
Sudo apt-get update
Install java package from repository created – install oracle-java8-installer
Install (Ubuntu-resricted-extras) for a software package for the computer operating system Ubuntu that allows the user to install essential software which is not already included due to legal or copyright reasons.
- Update apt-get
- Install phpmyadmin
- Vim /etc/apache/apache.conf – AllowOverride ALL Or
-> directly sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/apache2/apache2.conf
->sed -i ‘s/denied/granted/’ /etc/apache2/apache2.conf
- A3enmod rewirte (it’s a script which is used to enable the specified modules in – /etc/apache2/mods-enabled)
- Restart apache2 services
- Useradd –m –d /home/chiragchirag (-m to create users home directory if it doesn’t exist , -d home directory created from the value of user’s id login)
- Passwd chirag
- vim /etc/……/sites-available/000-default.conf edit – Directory /var/www/ to /home/chirag
- mkdir html log
- apachectl –t (to check en error)
- chown –R chirag:chirag /home/chirag
- restart apache2
- Download .sh from http://netbeans.org
- Chmod –x filename.sh
- curl -sS https://getcomposer.org/installer | php (Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.)
- mv composer.phar /usr/local/bin/composer
install bootup manager
- Boot-Up Manager is a graphical tool to allow easy configuration of init services in user and system runlevels, as far as changing Start/Stop services priority.
- Now clean the cache apt-get autoclean
Speed Up Boot Time By Disabling The Grub Boot Menu
- sudonano /etc/init.d/rc
- Search now for the first instance of this line:
- Replace it with this one if needed:
- Ctrl+OCtrl+X Save and exit.
Speed up the app launch
- sudo apt-get install preload
- sudonano /etc/preload.conf
- temporary changing the swappiness value.
- cat /proc/sys/vm/swappiness
- permanent changing
- sudo vim /etc/sysctl.conf
- vm.swappiness=10 if does not exist create in the last
It will speed up the linux things and it stands for temporary file storage facility
- sudo vim /etc/fstab
- At the end of the file, add these two lines:
- tmpfs /tmptmpfsdefaults,noexec,nosuid 0 0
- sudo mount –a (mount all)
“Increased performance in Linux with zram (virtual swap compressed in ram)
sudo apt install zram-config